diff --git a/components/customTab.vue b/components/customTab.vue index ef96390..3ce94ae 100644 --- a/components/customTab.vue +++ b/components/customTab.vue @@ -3,8 +3,7 @@ - + {{item.name}} @@ -30,7 +29,7 @@ // +---------------------------------------------------------------------- // | Author: CRMEB Team // +---------------------------------------------------------------------- - export default{ + export default { props: { newData: { type: Object, @@ -41,15 +40,15 @@ default: '', } }, - data(){ + data() { return { - + } }, mounted() { - + }, - methods:{ + methods: { goRouter(item) { var pages = getCurrentPages(); var page = (pages[pages.length - 1]).$page.fullPath; @@ -65,7 +64,6 @@ }, } } - + \ No newline at end of file diff --git a/components/easy-loadimage/easy-loadimage.vue b/components/easy-loadimage/easy-loadimage.vue index 508ccbf..10b135f 100644 --- a/components/easy-loadimage/easy-loadimage.vue +++ b/components/easy-loadimage/easy-loadimage.vue @@ -1,56 +1,63 @@ + /* 官方优化图片tips */ + image { + will-change: transform + } + /* 渐变过渡效果处理 */ + image.origin-img { + width: 100%; + height: 100%; + opacity: 0.3; + max-height: 360rpx; + } + + image.origin-img.show-transition { + transition: opacity .5s; + opacity: 1; + } + + image.origin-img.no-transition { + opacity: 1; + } + + /* 加载失败、加载中的占位图样式控制 */ + .loadfail-img { + height: 100%; + background-repeat: no-repeat; + background-size: 50%; + background-position: center; + } + + .loading-img { + height: 100%; + background-position: center; + } + + /* 转圈 */ + .spin-circle { + background-repeat: no-repeat; + background-size: 60%; + } + + /* 动态灰色若隐若现 */ + .looming-gray { + animation: looming-gray 1s infinite linear; + background-color: #e3e3e3; + } + + @keyframes looming-gray { + 0% { + background-color: #e3e3e3aa; + } + + 50% { + background-color: #e3e3e3; + } + + 100% { + background-color: #e3e3e3aa; + } + } + + /* 骨架屏1 */ + .skeleton-1 { + background-color: #e3e3e3; + background-image: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 80%); + background-size: 100rpx 100%; + background-repeat: repeat-y; + background-position: 0 0; + animation: skeleton-1 .6s infinite; + } + + @keyframes skeleton-1 { + to { + background-position: 200% 0; + } + } + + /* 骨架屏2 */ + .skeleton-2 { + background-image: linear-gradient(-90deg, #fefefe 0%, #e6e6e6 50%, #fefefe 100%); + background-size: 400% 400%; + background-position: 0 0; + animation: skeleton-2 1.2s ease-in-out infinite; + } + + @keyframes skeleton-2 { + to { + background-position: -135% 0; + } + } + \ No newline at end of file diff --git a/manifest.json b/manifest.json index 49ba7da..838486c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,352 +1,352 @@ { - "name": "惠农生活", - "appid": "__UNI__3A527D1", - "description": "", - "versionName": "2.0.52", - "versionCode": 2052, - "transformPx": false, - /* 5+App特有相关 */ - "app-plus": { - "titleNView": true, - "usingComponents": true, - "nvueCompiler": "uni-app", - "nvueStyleCompiler": "uni-app", - "compilerVersion": 3, - "compatible": { - "ignoreVersion": true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持 - }, - "splashscreen": { - "alwaysShowBeforeRender": false, - "waiting": false, - "autoclose": true, - "delay": 0 - }, - /* 模块配置 */ - "modules": { - "VideoPlayer": {}, - "OAuth": {}, - "Payment": {}, - "Share": {}, - "iBeacon": {}, - "Maps": {}, - "Geolocation": {}, - "UniMP": { - "description": "uni小程序" - }, - "Push": {}, - "Barcode": {}, - "Camera": {} - }, - "safearea": { - "bottom": { - "offset": "none" - } - }, - /* 应用发布信息 */ - "distribute": { - /* android打包配置 */ - "android": { - "permissions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"], - "permissionExternalStorage": { - "request": "none", - "prompt": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。" - }, - "permissionPhoneState": { - "request": "none" //拨打电话权限关闭 - }, - "minSdkVersion": 23, - "targetSdkVersion": 30 - }, - /* ios打包配置 */ - "ios": { - "privacyDescription": { - "NSPhotoLibraryUsageDescription": "上传用户头像保存分享海报", - "NSPhotoLibraryAddUsageDescription": "上传用户头像保存分享海报", - "NSCameraUsageDescription": "上传用户头像保存分享海报", - "NSLocationWhenInUseUsageDescription": "根据客户地理位置推荐最近门店", - "NSLocationAlwaysUsageDescription": "根据客户地理位置推荐最近门店" - }, - "idfa": false, - "dSYMs": false - }, - /* SDK配置 */ - "sdkConfigs": { - "maps": { - "amap": { - "appkey_ios": "0a3202688624938fd5d2f37b52c30d5d", - "appkey_android": "0354f5ddc11e2ea76c5aac647f44d945", - "name": "amapIvoVHpJR" - } - }, - "payment": { - "weixin": { - "__platform__": ["ios", "android"], - "appid": "wx2e8f79ff281284f5", - "UniversalLinks": "https://shop.lihaink.cn/" - } - }, - "share": { - "weixin": { - "appid": "wx2e8f79ff281284f5", - "UniversalLinks": "https://shop.lihaink.cn/" - } - }, - "geolocation": { - "amap": { - "name": "amapIvoVHpJR", - "__platform__": ["ios", "android"], - "appkey_ios": "0a3202688624938fd5d2f37b52c30d5d", - "appkey_android": "0354f5ddc11e2ea76c5aac647f44d945" - } - }, - "push": {}, - "oauth": { - "weixin": { - "appid": "wx2e8f79ff281284f5", - "UniversalLinks": "https://shop.lihaink.cn/" - } - }, - "ad": {} - }, - "icons": { - "android": { - "hdpi": "unpackage/res/icons/72x72.png", - "xhdpi": "unpackage/res/icons/96x96.png", - "xxhdpi": "unpackage/res/icons/144x144.png", - "xxxhdpi": "unpackage/res/icons/192x192.png" - }, - "ios": { - "appstore": "unpackage/res/icons/1024x1024.png", - "ipad": { - "app": "unpackage/res/icons/76x76.png", - "app@2x": "unpackage/res/icons/152x152.png", - "notification": "unpackage/res/icons/20x20.png", - "notification@2x": "unpackage/res/icons/40x40.png", - "proapp@2x": "unpackage/res/icons/167x167.png", - "settings": "unpackage/res/icons/29x29.png", - "settings@2x": "unpackage/res/icons/58x58.png", - "spotlight": "unpackage/res/icons/40x40.png", - "spotlight@2x": "unpackage/res/icons/80x80.png" - }, - "iphone": { - "app@2x": "unpackage/res/icons/120x120.png", - "app@3x": "unpackage/res/icons/180x180.png", - "notification@2x": "unpackage/res/icons/40x40.png", - "notification@3x": "unpackage/res/icons/60x60.png", - "settings@2x": "unpackage/res/icons/58x58.png", - "settings@3x": "unpackage/res/icons/87x87.png", - "spotlight@2x": "unpackage/res/icons/80x80.png", - "spotlight@3x": "unpackage/res/icons/120x120.png" - } - } - }, - "splashscreen": { - "useOriginalMsgbox": true, - "androidStyle": "common" - } - }, - "nativePlugins": { - "JG-JCore": { - "JPUSH_APPKEY_IOS": "8a5efd65cda14fafa6e64ad3", - "JPUSH_CHANNEL_IOS": "8a5efd65cda14fafa6e64ad3", - "JPUSH_APPKEY_ANDROID": "b5f679f4357018605ea6fd2e", - "JPUSH_CHANNEL_ANDROID": "", - "__plugin_info__": { - "name": "JG-JCore", - "description": "极光推送JCore插件", - "platforms": "Android,iOS", - "url": "", - "android_package_name": "uni.UNI3A527D1", - "ios_bundle_id": "", - "isCloud": false, - "bought": -1, - "pid": "", - "parameters": { - "JPUSH_APPKEY_IOS": { - "des": "[iOS]极光portal配置应用信息时分配的AppKey", - "key": "JCore:APP_KEY", - "value": "daebe19b547c43128796a078" - }, - "JPUSH_CHANNEL_IOS": { - "des": "[iOS]用于统计分发渠道,不需要可填默认值developer-default", - "key": "JCore:CHANNEL", - "value": "" - }, - "JPUSH_APPKEY_ANDROID": { - "des": "[Android]极光portal配置应用信息时分配的AppKey", - "key": "JPUSH_APPKEY", - "value": "" - }, - "JPUSH_CHANNEL_ANDROID": { - "des": "[Android]用于统计分发渠道,不需要可填默认值developer-default", - "key": "JPUSH_CHANNEL", - "value": "" - } - } - } - }, - "JG-JPush": { - "JPUSH_ISPRODUCTION_IOS": "true", - "JPUSH_ADVERTISINGID_IOS": "", - "JPUSH_DEFAULTINITJPUSH_IOS": "true", - "JPUSH_OPPO_APPKEY": "", - "JPUSH_OPPO_APPID": "", - "JPUSH_OPPO_APPSECRET": "", - "JPUSH_VIVO_APPKEY": "", - "JPUSH_VIVO_APPID": "", - "JPUSH_MEIZU_APPKEY": "", - "JPUSH_MEIZU_APPID": "", - "JPUSH_XIAOMI_APPKEY": "", - "JPUSH_XIAOMI_APPID": "", - "__plugin_info__": { - "name": "JG-JPush", - "description": "极光推送Hbuilder插件", - "platforms": "Android,iOS", - "url": "", - "android_package_name": "uni.UNI3A527D1", - "ios_bundle_id": "", - "isCloud": false, - "bought": -1, - "pid": "", - "parameters": { - "JPUSH_ISPRODUCTION_IOS": { - "des": "[iOS]是否是生产环境,是填true,不是填false或者不填", - "key": "JPush:ISPRODUCTION", - "value": "" - }, - "JPUSH_ADVERTISINGID_IOS": { - "des": "[iOS]广告标识符(IDFA)如果不需要使用IDFA,可不填", - "key": "JPush:ADVERTISINGID", - "value": "" - }, - "JPUSH_DEFAULTINITJPUSH_IOS": { - "des": "[iOS]是否默认初始化,是填true,不是填false或者不填", - "key": "JPush:DEFAULTINITJPUSH", - "value": "" - }, - "JPUSH_OPPO_APPKEY": { - "des": "厂商OPPO-appkey,示例:OP-12345678", - "key": "OPPO_APPKEY", - "value": "" - }, - "JPUSH_OPPO_APPID": { - "des": "厂商OPPO-appId,示例:OP-12345678", - "key": "OPPO_APPID", - "value": "" - }, - "JPUSH_OPPO_APPSECRET": { - "des": "厂商OPPO-appSecret,示例:OP-12345678", - "key": "OPPO_APPSECRET", - "value": "" - }, - "JPUSH_VIVO_APPKEY": { - "des": "厂商VIVO-appkey,示例:12345678", - "key": "com.vivo.push.api_key", - "value": "" - }, - "JPUSH_VIVO_APPID": { - "des": "厂商VIVO-appId,示例:12345678", - "key": "com.vivo.push.app_id", - "value": "" - }, - "JPUSH_MEIZU_APPKEY": { - "des": "厂商MEIZU-appKey,示例:MZ-12345678", - "key": "MEIZU_APPKEY", - "value": "" - }, - "JPUSH_MEIZU_APPID": { - "des": "厂商MEIZU-appId,示例:MZ-12345678", - "key": "MEIZU_APPID", - "value": "" - }, - "JPUSH_XIAOMI_APPKEY": { - "des": "厂商XIAOMI-appKey,示例:MI-12345678", - "key": "XIAOMI_APPKEY", - "value": "" - }, - "JPUSH_XIAOMI_APPID": { - "des": "厂商XIAOMI-appId,示例:MI-12345678", - "key": "XIAOMI_APPID", - "value": "" - } - } - } - } - } - }, - /* 快应用特有相关 */ - "quickapp": {}, - /* 小程序特有相关 */ - "mp-weixin": { - "appid": "wx5fb1cc8edb3f8baa", - "setting": { - "urlCheck": false, - "minified": true, - "postcss": true, - "es6": true - }, - "permission": { - "scope.userLocation": { - "desc": "获取您的位置" - } - }, - "requiredPrivateInfos": ["getLocation", "chooseAddress"], - "usingComponents": true, - "__usePrivacyCheck__": true - }, - "mp-alipay": { - "usingComponents": true - }, - "mp-baidu": { - "usingComponents": true - }, - "mp-toutiao": { - "usingComponents": true - }, - "h5": { - "devServer": { - "https": false - }, - "router": { - "mode": "history", - "base": "" - }, - "domain": "", - "sdkConfigs": { - "maps": { - "qqmap": { - "key": "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7" - } - } - }, - "title": "加载中...", - "template": "template.h5.html", - "optimization": { - "treeShaking": { - "enable": true - } - } - } -} \ No newline at end of file + "name" : "惠农生活", + "appid" : "__UNI__3A527D1", + "description" : "", + "versionName" : "2.0.52", + "versionCode" : 2052, + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "titleNView" : true, + "usingComponents" : true, + "nvueCompiler" : "uni-app", + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "compatible" : { + "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持 + }, + "splashscreen" : { + "alwaysShowBeforeRender" : false, + "waiting" : false, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : { + "VideoPlayer" : {}, + "OAuth" : {}, + "Payment" : {}, + "Share" : {}, + "iBeacon" : {}, + "Maps" : {}, + "Geolocation" : {}, + "UniMP" : { + "description" : "uni小程序" + }, + "Push" : {}, + "Barcode" : {}, + "Camera" : {} + }, + "safearea" : { + "bottom" : { + "offset" : "none" + } + }, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], + "permissionExternalStorage" : { + "request" : "none", + "prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。" + }, + "permissionPhoneState" : { + "request" : "none" //拨打电话权限关闭 + }, + "minSdkVersion" : 23, + "targetSdkVersion" : 30 + }, + /* ios打包配置 */ + "ios" : { + "privacyDescription" : { + "NSPhotoLibraryUsageDescription" : "上传用户头像保存分享海报", + "NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报", + "NSCameraUsageDescription" : "上传用户头像保存分享海报", + "NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店", + "NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店" + }, + "idfa" : false, + "dSYMs" : false + }, + /* SDK配置 */ + "sdkConfigs" : { + "maps" : { + "amap" : { + "appkey_ios" : "0a3202688624938fd5d2f37b52c30d5d", + "appkey_android" : "0354f5ddc11e2ea76c5aac647f44d945", + "name" : "amapIvoVHpJR" + } + }, + "payment" : { + "weixin" : { + "__platform__" : [ "ios", "android" ], + "appid" : "wx2e8f79ff281284f5", + "UniversalLinks" : "https://shop.lihaink.cn/" + } + }, + "share" : { + "weixin" : { + "appid" : "wx2e8f79ff281284f5", + "UniversalLinks" : "https://shop.lihaink.cn/" + } + }, + "geolocation" : { + "amap" : { + "name" : "amapIvoVHpJR", + "__platform__" : [ "ios", "android" ], + "appkey_ios" : "0a3202688624938fd5d2f37b52c30d5d", + "appkey_android" : "0354f5ddc11e2ea76c5aac647f44d945" + } + }, + "push" : {}, + "oauth" : { + "weixin" : { + "appid" : "wx2e8f79ff281284f5", + "UniversalLinks" : "https://shop.lihaink.cn/" + } + }, + "ad" : {} + }, + "icons" : { + "android" : { + "hdpi" : "unpackage/res/icons/72x72.png", + "xhdpi" : "unpackage/res/icons/96x96.png", + "xxhdpi" : "unpackage/res/icons/144x144.png", + "xxxhdpi" : "unpackage/res/icons/192x192.png" + }, + "ios" : { + "appstore" : "unpackage/res/icons/1024x1024.png", + "ipad" : { + "app" : "unpackage/res/icons/76x76.png", + "app@2x" : "unpackage/res/icons/152x152.png", + "notification" : "unpackage/res/icons/20x20.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "proapp@2x" : "unpackage/res/icons/167x167.png", + "settings" : "unpackage/res/icons/29x29.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "spotlight" : "unpackage/res/icons/40x40.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png" + }, + "iphone" : { + "app@2x" : "unpackage/res/icons/120x120.png", + "app@3x" : "unpackage/res/icons/180x180.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "notification@3x" : "unpackage/res/icons/60x60.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "settings@3x" : "unpackage/res/icons/87x87.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png", + "spotlight@3x" : "unpackage/res/icons/120x120.png" + } + } + }, + "splashscreen" : { + "useOriginalMsgbox" : true, + "androidStyle" : "common" + } + }, + "nativePlugins" : { + "JG-JCore" : { + "JPUSH_APPKEY_IOS" : "8a5efd65cda14fafa6e64ad3", + "JPUSH_CHANNEL_IOS" : "8a5efd65cda14fafa6e64ad3", + "JPUSH_APPKEY_ANDROID" : "b5f679f4357018605ea6fd2e", + "JPUSH_CHANNEL_ANDROID" : "", + "__plugin_info__" : { + "name" : "JG-JCore", + "description" : "极光推送JCore插件", + "platforms" : "Android,iOS", + "url" : "", + "android_package_name" : "uni.UNI3A527D1", + "ios_bundle_id" : "", + "isCloud" : false, + "bought" : -1, + "pid" : "", + "parameters" : { + "JPUSH_APPKEY_IOS" : { + "des" : "[iOS]极光portal配置应用信息时分配的AppKey", + "key" : "JCore:APP_KEY", + "value" : "daebe19b547c43128796a078" + }, + "JPUSH_CHANNEL_IOS" : { + "des" : "[iOS]用于统计分发渠道,不需要可填默认值developer-default", + "key" : "JCore:CHANNEL", + "value" : "" + }, + "JPUSH_APPKEY_ANDROID" : { + "des" : "[Android]极光portal配置应用信息时分配的AppKey", + "key" : "JPUSH_APPKEY", + "value" : "" + }, + "JPUSH_CHANNEL_ANDROID" : { + "des" : "[Android]用于统计分发渠道,不需要可填默认值developer-default", + "key" : "JPUSH_CHANNEL", + "value" : "" + } + } + } + }, + "JG-JPush" : { + "JPUSH_ISPRODUCTION_IOS" : "true", + "JPUSH_ADVERTISINGID_IOS" : "", + "JPUSH_DEFAULTINITJPUSH_IOS" : "true", + "JPUSH_OPPO_APPKEY" : "", + "JPUSH_OPPO_APPID" : "", + "JPUSH_OPPO_APPSECRET" : "", + "JPUSH_VIVO_APPKEY" : "", + "JPUSH_VIVO_APPID" : "", + "JPUSH_MEIZU_APPKEY" : "", + "JPUSH_MEIZU_APPID" : "", + "JPUSH_XIAOMI_APPKEY" : "", + "JPUSH_XIAOMI_APPID" : "", + "__plugin_info__" : { + "name" : "JG-JPush", + "description" : "极光推送Hbuilder插件", + "platforms" : "Android,iOS", + "url" : "", + "android_package_name" : "uni.UNI3A527D1", + "ios_bundle_id" : "", + "isCloud" : false, + "bought" : -1, + "pid" : "", + "parameters" : { + "JPUSH_ISPRODUCTION_IOS" : { + "des" : "[iOS]是否是生产环境,是填true,不是填false或者不填", + "key" : "JPush:ISPRODUCTION", + "value" : "" + }, + "JPUSH_ADVERTISINGID_IOS" : { + "des" : "[iOS]广告标识符(IDFA)如果不需要使用IDFA,可不填", + "key" : "JPush:ADVERTISINGID", + "value" : "" + }, + "JPUSH_DEFAULTINITJPUSH_IOS" : { + "des" : "[iOS]是否默认初始化,是填true,不是填false或者不填", + "key" : "JPush:DEFAULTINITJPUSH", + "value" : "" + }, + "JPUSH_OPPO_APPKEY" : { + "des" : "厂商OPPO-appkey,示例:OP-12345678", + "key" : "OPPO_APPKEY", + "value" : "" + }, + "JPUSH_OPPO_APPID" : { + "des" : "厂商OPPO-appId,示例:OP-12345678", + "key" : "OPPO_APPID", + "value" : "" + }, + "JPUSH_OPPO_APPSECRET" : { + "des" : "厂商OPPO-appSecret,示例:OP-12345678", + "key" : "OPPO_APPSECRET", + "value" : "" + }, + "JPUSH_VIVO_APPKEY" : { + "des" : "厂商VIVO-appkey,示例:12345678", + "key" : "com.vivo.push.api_key", + "value" : "" + }, + "JPUSH_VIVO_APPID" : { + "des" : "厂商VIVO-appId,示例:12345678", + "key" : "com.vivo.push.app_id", + "value" : "" + }, + "JPUSH_MEIZU_APPKEY" : { + "des" : "厂商MEIZU-appKey,示例:MZ-12345678", + "key" : "MEIZU_APPKEY", + "value" : "" + }, + "JPUSH_MEIZU_APPID" : { + "des" : "厂商MEIZU-appId,示例:MZ-12345678", + "key" : "MEIZU_APPID", + "value" : "" + }, + "JPUSH_XIAOMI_APPKEY" : { + "des" : "厂商XIAOMI-appKey,示例:MI-12345678", + "key" : "XIAOMI_APPKEY", + "value" : "" + }, + "JPUSH_XIAOMI_APPID" : { + "des" : "厂商XIAOMI-appId,示例:MI-12345678", + "key" : "XIAOMI_APPID", + "value" : "" + } + } + } + } + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "wx5fb1cc8edb3f8baa", + "setting" : { + "urlCheck" : false, + "minified" : true, + "postcss" : true, + "es6" : true + }, + "permission" : { + "scope.userLocation" : { + "desc" : "获取您的位置" + } + }, + "requiredPrivateInfos" : [ "getLocation", "chooseAddress" ], + "usingComponents" : true, + "__usePrivacyCheck__" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "h5" : { + "devServer" : { + "https" : false + }, + "router" : { + "mode" : "history", + "base" : "" + }, + "domain" : "", + "sdkConfigs" : { + "maps" : { + "qqmap" : { + "key" : "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7" + } + } + }, + "title" : "加载中...", + "template" : "template.h5.html", + "optimization" : { + "treeShaking" : { + "enable" : true + } + } + } +} diff --git a/pages.json b/pages.json index 0b107fb..8f2929b 100644 --- a/pages.json +++ b/pages.json @@ -25,7 +25,7 @@ }, { "path": "pages/whole_sale/index", "style": { - "enablePullDownRefresh": true, + "enablePullDownRefresh": false, "navigationBarTitleText": "批发", "navigationStyle": "custom" } @@ -341,7 +341,7 @@ "path": "market/market", "style": { "navigationBarTitleText": "供销云市场", - "enablePullDownRefresh": true, + "enablePullDownRefresh": false, "navigationStyle": "custom" } }, @@ -349,7 +349,7 @@ "path": "specialty/specialty", "style": { "navigationBarTitleText": "名优特产", - "enablePullDownRefresh": true, + "enablePullDownRefresh": false, "navigationStyle": "custom" } } diff --git a/pages/chat/customer_list/index.vue b/pages/chat/customer_list/index.vue index cbecb88..0b6ae8e 100644 --- a/pages/chat/customer_list/index.vue +++ b/pages/chat/customer_list/index.vue @@ -12,10 +12,11 @@ [表情] [图片] [商品] - [订单] + [订单] - {{item.last && item.last.create_time.split(' ')[1] || ''}} + {{item.display_time}} {{item.num}} @@ -23,18 +24,21 @@
{{item.user && item.user.nickname}} {{item.last.msn}} [表情] [图片] - [商品] - [订单] + [商品] + [订单] - {{item.last && item.last.create_time.split(' ')[1]}} + {{item.display_time}} {{item.num}}
@@ -57,12 +61,19 @@ // +---------------------------------------------------------------------- import emptyPage from '@/components/emptyPage.vue' - import { serviceList, serviceUserList } from "@/api/user"; - import { toLogin } from '@/libs/login.js'; - import { mapGetters } from "vuex"; + import { + serviceList, + serviceUserList + } from "@/api/user"; + import { + toLogin + } from '@/libs/login.js'; + import { + mapGetters + } from "vuex"; export default { name: "CustomerList", - components:{ + components: { emptyPage, }, data() { @@ -70,125 +81,125 @@ list: [], productId: 0, orderId: "", - type: 0 ,// 0 用户 1客服 + type: 0, // 0 用户 1客服 timer: null, - page:1, - limit:9999, + page: 1, + limit: 9999, mer_id: '', loading: false, clear: false, }; }, - computed: mapGetters(['isLogin','viewColor']), + computed: mapGetters(['isLogin', 'viewColor']), onLoad(optios) { this.type = optios.type; this.mer_id = optios.mer_id; - if(this.isLogin){ + if (this.isLogin) { this.getList(this.mer_id) } else { toLogin() } }, onShow(option) { - if(this.isLogin){ + if (this.isLogin) { this.liveUpdate(); } else { toLogin() } }, - onHide(){ - if(this.timer) { - clearInterval(this.timer); - this.timer = null; - } + onHide() { + if (this.timer) { + clearInterval(this.timer); + this.timer = null; + } this.clear = true; }, onUnload() { - if(this.timer) { - clearInterval(this.timer); - this.timer = null; - } + if (this.timer) { + clearInterval(this.timer); + this.timer = null; + } this.clear = true; }, methods: { - getList(mer_id) { + getList(mer_id) { this.loading = true; - if(this.type == 0){ + if (this.type == 0) { serviceList({ - page:this.page, - limit:this.limit + page: this.page, + limit: this.limit }).then(res => { this.list = res.data.list; - if(res.status == 400){ + if (res.status == 400) { clearInterval(this.timer); - this.timer = null; - return this.$util.Tips({ - title: res.message - }) - } - }).finally(v=>{ - this.loading = false; - return this.$util.Tips({ - title: v - }) - }).catch(err => { - return this.$util.Tips({ - title: err - }) - }); - }else{ - serviceUserList(mer_id,{ - page:this.page, - limit:this.limit - }).then(res =>{ - this.list = res.data.list; - if(res.status == 400){ - clearInterval(this.timer); - this.timer = null; + this.timer = null; return this.$util.Tips({ title: res.message }) } - }).finally(v=>{ + }).finally(v => { + this.loading = false; + return this.$util.Tips({ + title: v + }) + }).catch(err => { + return this.$util.Tips({ + title: err + }) + }); + } else { + serviceUserList(mer_id, { + page: this.page, + limit: this.limit + }).then(res => { + this.list = res.data.list; + if (res.status == 400) { + clearInterval(this.timer); + this.timer = null; + return this.$util.Tips({ + title: res.message + }) + } + }).finally(v => { this.loading = false; clearInterval(this.timer); - this.timer = null; + this.timer = null; return this.$util.Tips({ title: v }) }).catch(err => { clearInterval(this.timer); - this.timer = null; + this.timer = null; return this.$util.Tips({ title: err }) }); - } + } }, //实时刷新列表 - liveUpdate(){ + liveUpdate() { let that = this; this.clear = false; - if(that.timer) { + if (that.timer) { clearInterval(that.timer); - that.timer = null; - } - that.timer = setInterval(function(){ - if(that.clear){ + that.timer = null; + } + that.timer = setInterval(function() { + if (that.clear) { clearInterval(that.timer); - return ; + return; } // 用户 (!that.loading) && that.getList(that.mer_id); - },5000); + }, 5000); }, goPage(item) { item.num = 0; - if(this.type == 0){ + if (this.type == 0) { uni.navigateTo({ url: `/pages/chat/customer_list/chat?mer_id=${item.mer_id}` }) - }else{ + } else { uni.navigateTo({ url: `/pages/chat/customer_list/chat?userId=${item.user.uid}&mer_id=${item.mer_id}` }) @@ -207,7 +218,8 @@ transform: rotate(180deg); font-size: 36rpx; } - .popupn{ + + .popupn { position: fixed; width: 100%; text-align: center; @@ -217,65 +229,78 @@ height: 90rpx; line-height: 90rpx; z-index: 100; - .title{ + + .title { max-width: 560rpx; margin: 0 auto; position: relative; } - .iconfont{ + + .iconfont { display: inline-block; position: relative; top: 4rpx; right: 0; } - .mer_logo{ + + .mer_logo { width: 34rpx; height: 34rpx; position: relative; top: 6rpx; - right: 10px; + right: 10px; } - .mer_name{ + + .mer_name { display: inline-block; max-width: 650rpx; } - .invoice-content{ + + .invoice-content { background-color: #ffffff; } } - .list_count{ + + .list_count { margin-top: 104rpx; } + .item { align-items: center; border-bottom: 1px solid #eee; padding: 20rpx 30rpx; background-color: #fff; - .logo image{ + + .logo image { width: 88rpx; height: 88rpx; border-radius: 50%; } - .info{ + + .info { width: 334rpx; margin-left: 20rpx; - .con{ + + .con { margin-top: 10rpx; color: #999999; font-size: 24rpx; } } - .right-box{ + + .right-box { flex: 1; display: flex; flex-direction: column; align-items: flex-end; font-size: 20rpx; color: #BBBBBB; - .time{ + + .time { margin-bottom: 10rpx; } - .num{ + + .num { min-width: 6px; background-color: var(--view-theme); border-radius: 15px; @@ -287,4 +312,4 @@ } } } - + \ No newline at end of file diff --git a/pages/cloud_warehouse/home/home.vue b/pages/cloud_warehouse/home/home.vue index 02c91a7..8ae559f 100644 --- a/pages/cloud_warehouse/home/home.vue +++ b/pages/cloud_warehouse/home/home.vue @@ -6,278 +6,339 @@ .wholeSale { background-color: #f8fafb !important; - .wholeSale-header-wrap { - background-color: #40AE36; - } - - .wholeSale-header-search-wrap { - padding: 30rpx 20rpx 0; - background-color: #fff; - } - .wholeSale-header { position: sticky; top: 0; - z-index: 100; + z-index: 9; + margin-bottom: 20rpx; + background-color: #40AE36; + } + + .wholeSale-section { + position: sticky; + top: calc(82rpx + var(--status-bar-height)); + padding: 0rpx 20rpx; + background-color: #fff; + transition: height .5s; + overflow: hidden; margin-bottom: 20rpx; - .scrollview { + .wholeSale-nav { display: flex; align-items: center; - height: 98rpx; - padding-left: 32rpx; + padding-bottom: 20rpx; - .scrollview-item { - margin-right: 30rpx; - font-size: 28rpx; - color: #FFFFFF; + .icon { + margin-right: 20rpx; } - .scrollview-active { + .search_content { + flex: 1; + height: 70rpx; + padding: 2px 2px 2px 21.05rpx; + border-radius: 80rpx; + background: #EDEFF2; position: relative; - font-weight: bold; - font-size: 36rpx; - color: #FFFFFF; + box-sizing: border-box; - &::after { - content: ""; - display: inline-block; - position: absolute; - bottom: -6rpx; - left: 50%; - transform: translateX(-50%); + .search_content_wrap { width: 100%; - height: 6rpx; - background-color: #FFFFFF; + + .icon-sousuo { + font-size: 26.32rpx; + font-weight: bold; + color: #c8c7c6; + margin-right: 17.54rpx; + } + + input { + width: 80%; + } + } + + .search_btn { + width: 106rpx; + height: 60rpx; + line-height: 60rpx; + background: #40AE36; + border-radius: 100px; + font-size: 28rpx; + color: #fff; + } + } + } + + .category { + position: relative; + width: 100%; + overflow: auto; + margin-bottom: 20rpx; + padding-right: 70rpx; + + .category-wrap { + display: flex; + padding-bottom: 10rpx; + + .category-item { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + margin-right: 38rpx; + + text { + margin-top: 16rpx; + font-size: 24rpx; + color: #666666; + white-space: nowrap; + } + + .category-item-text { + width: 120rpx; + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + } + + .category-item-active { + position: relative; + + .category-item-img { + border: 2px solid #40AE36; + border-radius: 50%; + } + + text { + background-color: #40AE36; + color: #fff; + padding: 2rpx 10rpx 6rpx 10rpx; + border-radius: 50rpx; + } + } + } + + .category-all { + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); + height: 100%; + background-color: #f3f3f3; + z-index: 10; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + font-size: 24rpx; + border-radius: 4rpx; + width: 70rpx; + color: #919191; + } + } + + .cate { + width: 100%; + overflow: auto; + margin-bottom: 30rpx; + + .cate-wrap { + display: flex; + padding-bottom: 8rpx; + + .cate-item { + + text { + padding: 4rpx 16rpx; + white-space: nowrap; + font-size: 30rpx; + color: #333; + } + } + + .cate-item-active { + text { + color: #40AE36; + font-weight: bold; + } + } + } + } + } + + .popup-wrap { + background-color: #fff; + padding: 20rpx; + + .popup-wrap-title { + font-size: 36rpx; + color: #333; + font-weight: bold; + margin-bottom: 20rpx; + } + + .popup-wrap-category { + width: 100%; + + .popup-wrap-category-wrap { + display: flex; + flex-wrap: wrap; + + .popup-wrap-category-item { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + margin: 0 20rpx 20rpx 0; + + &:nth-child(5n) { + margin-right: 0; + } + + text { + margin-top: 16rpx; + font-size: 24rpx; + color: #666666; + white-space: nowrap; + } + + .popup-wrap-category-item-text { + width: 120rpx; + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + } + + .popup-wrap-category-item-active { + position: relative; + + .popup-wrap-category-item-img { + border: 2px solid #40AE36; + border-radius: 50%; + } + + text { + background-color: #40AE36; + color: #fff; + padding: 2rpx 10rpx 6rpx 10rpx; + border-radius: 50rpx; + } } } } } .wholeSale-con { + height: 100vh; margin: 0 20rpx; padding-bottom: 30rpx; } - - .wholeSale-nav { - display: flex; - align-items: center; - margin-bottom: 40rpx; - - .icon { - margin-right: 20rpx; - } - } - - .search_content { - flex: 1; - height: 70rpx; - padding: 2px 2px 2px 21.05rpx; - border-radius: 80rpx; - background: #EDEFF2; - position: relative; - box-sizing: border-box; - - .search_content_wrap { - width: 100%; - - .icon-sousuo { - font-size: 26.32rpx; - font-weight: bold; - color: #c8c7c6; - margin-right: 17.54rpx; - } - - input { - width: 80%; - } - } - - .search_btn { - width: 106rpx; - height: 60rpx; - line-height: 60rpx; - background: #40AE36; - border-radius: 100px; - font-size: 28rpx; - color: #fff; - } - } - - .category { - width: 100%; - overflow: auto; - margin-bottom: 20rpx; - - .category-wrap { - display: flex; - padding-bottom: 20rpx; - - .category-item { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - margin-right: 38rpx; - - text { - margin-top: 16rpx; - font-size: 24rpx; - color: #666666; - white-space: nowrap; - } - - .category-item-text { - width: 120rpx; - text-align: center; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - } - - .category-item-active { - position: relative; - - .category-item-img { - border: 2px solid #40AE36; - border-radius: 50%; - } - - text { - background-color: #40AE36; - color: #fff; - padding: 2rpx 10rpx 6rpx 10rpx; - border-radius: 50rpx; - } - } - } - } - - .cate { - width: 100%; - overflow: auto; - margin-bottom: 30rpx; - - .cate-wrap { - display: flex; - padding-bottom: 8rpx; - - .cate-item { - - text { - padding: 4rpx 16rpx; - white-space: nowrap; - font-size: 30rpx; - color: #333; - } - } - - .cate-item-active { - text { - color: #40AE36; - font-weight: bold; - } - } - } - } - - .comprehensive { - display: flex; - justify-content: space-between; - align-items: center; - padding: 0 50rpx; - - [class^=comprehensive-] { - display: flex; - align-items: center; - - text { - margin-right: 12rpx; - font-size: 26rpx; - color: #666666; - } - - image { - width: 28rpx; - height: 28rpx; - } - - .loudou { - width: 24rpx; - height: 24rpx; - } - } - } } @@ -310,23 +371,56 @@ keyword: '', deduction_rate: '', //抵扣比例 rand: 1 - } + }, + wrapHeight: 300, + isShowSmall: false, + scrollTop: 0, } }, onLoad(option) { this.getStoreCategory(); this.getProductslist(true); }, - onReachBottom() { - this.getProductslist(); - }, - onPageScroll() { + + onPageScroll(e) { uni.$emit('scroll'); }, - onPullDownRefresh() { - this.getProductslist(true); + + watch: { + 'where.cate_pid'(newVal, oldVal) { + if (newVal && !oldVal) { + this.wrapHeight = 300 + 48; + this.isShowSmall = true; + } + if (!newVal && oldVal) { + this.wrapHeight = 300; + this.isShowSmall = false; + } + } }, methods: { + onAllCategory() { + this.$refs.popup.open(); + }, + + scrolltoupper() { + this.getProductslist(true); + }, + + onScrollBottom(e) { + this.getProductslist(); + }, + + onScroll(e) { + if (this.scrollTop >= e.target.scrollTop) { //上拉 + this.wrapHeight = 300; + if (this.where.cate_pid) this.wrapHeight = this.wrapHeight + 48; + } else { + this.wrapHeight = 0; + } + this.scrollTop = e.target.scrollTop; + }, + navTo(url) { uni.navigateTo({ url: url, @@ -340,12 +434,11 @@ } }) }, + navBack() { uni.navigateBack(); }, - tabsChange(e) { - this.tabsCurr = e; - }, + changeCate(e) { this.cate_change = e; this.store_category_children = []; @@ -357,6 +450,8 @@ this.cate_change_children = 0; this.where.cate_pid = this.store_category[e].store_category_id; this.getProductslist(true); + + this.$refs.popup && this.$refs.popup.close(); }, changeChildrenCate(e) { this.cate_change_children = e; @@ -387,6 +482,7 @@ } if (this.isLoading == -1) return; this.isLoading = 1; + getProductslist(this.where).then(res => { this.where.limit = res.data.limit this.where.page = res.data.page diff --git a/pages/cloud_warehouse/market/market.vue b/pages/cloud_warehouse/market/market.vue index 2539195..9abb926 100644 --- a/pages/cloud_warehouse/market/market.vue +++ b/pages/cloud_warehouse/market/market.vue @@ -1,450 +1,146 @@ - @@ -494,7 +190,9 @@ type_id: '10,12,21,24', merchant_category_id: '', location: '' - } + }, + wrapHeight: 300, + scrollTop: 0, } }, computed: { @@ -522,15 +220,36 @@ this.storeMerchantList(); }, onReachBottom() { - this.storeMerchantList(); + // this.storeMerchantList(); }, onPageScroll() { uni.$emit('scroll'); }, onPullDownRefresh() { - this.storeMerchantList(true); + // this.storeMerchantList(true); }, methods: { + onAllCategory() { + this.$refs.popup.open(); + }, + + scrolltoupper() { + this.storeMerchantList(true); + }, + + onScrollBottom(e) { + this.storeMerchantList(); + }, + + onScroll(e) { + if (this.scrollTop >= e.target.scrollTop) { //上拉 + this.wrapHeight = 300; + } else { + this.wrapHeight = 0; + } + this.scrollTop = e.target.scrollTop; + }, + navTo(url) { uni.navigateTo({ url: url, @@ -547,13 +266,14 @@ navBack() { uni.navigateBack(); }, - tabsChange(e) { - this.tabsCurr = e; - }, + changeCate(e) { this.cate_change = e; this.where.merchant_category_id = this.store_category[e].merchant_category_id; this.storeMerchantList(true); + + this.$refs.popup && this.$refs.popup.close(); + this.$forceUpdate(); }, // 进店 goStore(id) { @@ -682,4 +402,344 @@ }, } } - \ No newline at end of file + + + \ No newline at end of file diff --git a/pages/cloud_warehouse/specialty/specialty.vue b/pages/cloud_warehouse/specialty/specialty.vue index fda28ba..385fe77 100644 --- a/pages/cloud_warehouse/specialty/specialty.vue +++ b/pages/cloud_warehouse/specialty/specialty.vue @@ -1,287 +1,103 @@ - @@ -313,7 +129,9 @@ keyword: '', mer_type: 3, //1-里海云仓, 2-云市场, 3-名优特产 sale_type: 1, //1-零售, 2-批发 - } + }, + wrapHeight: 300, + scrollTop: 0, } }, onLoad(option) { @@ -321,15 +139,36 @@ this.getProductslist(true); }, onReachBottom() { - this.getProductslist(); + // this.getProductslist(); }, onPageScroll() { uni.$emit('scroll'); }, onPullDownRefresh() { - this.getProductslist(true); + // this.getProductslist(true); }, methods: { + onAllCategory() { + this.$refs.popup.open(); + }, + + scrolltoupper() { + this.getProductslist(true); + }, + + onScrollBottom(e) { + this.getProductslist(); + }, + + onScroll(e) { + if (this.scrollTop >= e.target.scrollTop) { //上拉 + this.wrapHeight = 300; + } else { + this.wrapHeight = 0; + } + this.scrollTop = e.target.scrollTop; + }, + navTo(url) { uni.navigateTo({ url: url, @@ -346,9 +185,7 @@ navBack() { uni.navigateBack(); }, - tabsChange(e) { - this.tabsCurr = e; - }, + changeCate(e) { this.cate_change = e; this.store_category_children = [{ @@ -361,6 +198,9 @@ this.cate_change_children = 0; this.where.cate_pid = this.store_category[e].store_category_id; this.getProductslist(true); + + this.$refs.popup && this.$refs.popup.close(); + this.$forceUpdate(); }, changeChildrenCate(e) { this.cate_change_children = e; @@ -369,6 +209,7 @@ .store_category_id; // 如若选中全部, 则取父级id this.getProductslist(true); }, + getCategoryIndexList() { getCategoryIndexList({ mer_type: this.where.mer_type, @@ -426,4 +267,216 @@ } } } - \ No newline at end of file + + + \ No newline at end of file diff --git a/pages/users/order_list/index.vue b/pages/users/order_list/index.vue index 740e170..5ba1eca 100644 --- a/pages/users/order_list/index.vue +++ b/pages/users/order_list/index.vue @@ -41,7 +41,7 @@
退款/售后 - {{(sale_type==1?orderData.refund:orderData.mer_refund) || 0}} + {{(sale_type==1?orderData.elseRefund:orderData.mer_elseRefund) || 0}}
diff --git a/pages/whole_sale/index.vue b/pages/whole_sale/index.vue index 313095b..6abd3ff 100644 --- a/pages/whole_sale/index.vue +++ b/pages/whole_sale/index.vue @@ -19,7 +19,7 @@
- + @@ -38,7 +38,6 @@ - @@ -67,6 +66,10 @@ + + 全部 + + @@ -133,69 +136,110 @@ - - + + + + + - - - - - - - - - - - - - - {{item.mer_name}} - 月销{{item.sales}} + + + + + + + - - - - + + + {{item.mer_name}} + 月销{{item.sales}} + + + + + + - - {{item.service_score}} - {{item.distance}} + {{item.service_score}} + {{item.distance}} - {{item.category_name}} - - - - {{item.service_phone}} - - {{item.mer_take_time[0]}}-{{item.mer_take_time[1]}} - - - - {{item.mer_address}} + {{item.category_name}} + + + + {{item.service_phone}} + + {{item.mer_take_time[0]}}-{{item.mer_take_time[1]}} + + + + {{item.mer_address}} + - - - - - - 暂无商品,看点别的吧 - + + + + + 暂无商品,看点别的吧 + + + + + + + 分类 + + + + + + + + + {{item.cate_name}} + + + + + + {{item.category_name}} + + + + + + + + @@ -276,6 +320,9 @@ bigTypeDomInfo: null, smallTypeDomInfo: null, categoryWrapHeight: 0, + wrapHeight: 332, + isShowSmall: false, + scrollTop: 0, } }, computed: { @@ -321,20 +368,49 @@ }) } }, - onPullDownRefresh() { - this.initData(true, true); - }, - onReachBottom() { - this.initData(false, true); - }, - onReady() { - // 获取dom信息 - // this.$util.getDom(this, '.category', (res) => { - // this.bigTypeDomInfo = res; - // this.categoryWrapHeight = res.height; - // }); + // onPullDownRefresh() { + // this.initData(true, true); + // }, + // onReachBottom() { + // this.initData(false, true); + // }, + + watch: { + 'where.cate_pid'(newVal, oldVal) { + if (newVal && !oldVal) { + this.wrapHeight = this.tabsCurr == 2 ? 400 : (332 + 48); + this.isShowSmall = true; + } + if (!newVal && oldVal) { + this.wrapHeight = this.tabsCurr == 2 ? 400 : 332; + this.isShowSmall = false; + } + } }, + methods: { + onAllCategory() { + this.$refs.popup.open(); + }, + + scrolltoupper() { + this.initData(true, true); + }, + + onScrollBottom(e) { + this.initData(false, true); + }, + + onScroll(e) { + if (this.scrollTop >= e.target.scrollTop) { //上拉 + this.wrapHeight = this.tabsCurr == 2 ? 400 : 332; + if (this.where.cate_pid) this.wrapHeight = this.wrapHeight + 48; + } else { + this.wrapHeight = 0; + } + this.scrollTop = e.target.scrollTop; + }, + initData(re = false, stop = false) { if (!stop) this.getStoreCategory(); if (this.tabsCurr == 2 && this.subCurr == 1) this.storeMerchantList(re, stop); @@ -405,6 +481,7 @@ this.cate_change = 0; this.cate_change_children = 0; if (this.tabsCurr != 2 || (this.tabsCurr == 2 && this.subCurr != 1)) this.where.mer_type = e; + this.wrapHeight = this.tabsCurr == 2 ? 400 : this.where.cate_pid ? (332 + 48) : 332; this.initData(true); }, changeCate(e) { @@ -429,10 +506,8 @@ } this.getProductslist(true); - // 获取小分类高度 为了上下滑动隐藏分类 - // this.$util.getDom(this, '.cate', (res) => { - // if (res) this.smallTypeDomInfo = res.data; - // }) + // 关闭popup + this.$refs.popup && this.$refs.popup.close(); }, changeChildrenCate(e) { this.cate_change_children = e; @@ -551,7 +626,7 @@ .wholeSale-header { position: sticky; top: 0; - z-index: 100; + z-index: 90; margin-bottom: 20rpx; .wholeSale-header-wrap { @@ -559,6 +634,10 @@ } .wholeSale-header-search-wrap { + position: sticky; + top: calc(82rpx + var(--status-bar-height)); + transition: height .5s; + overflow: hidden; padding: 30rpx 20rpx 0; background-color: #fff; } @@ -635,15 +714,11 @@ } } - .category_wrap { - overflow: hidden; - // transition: height 1s; - } - .category { width: 100%; overflow: auto; - margin-bottom: 20rpx; + position: relative; + padding-right: 70rpx; .category-wrap { display: flex; @@ -689,6 +764,24 @@ } } } + + .category-all { + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); + height: 100%; + background-color: #f3f3f3; + z-index: 10; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + font-size: 24rpx; + border-radius: 4rpx; + width: 70rpx; + color: #919191; + } } .cate { @@ -719,6 +812,70 @@ } } + .popup-wrap { + background-color: #fff; + padding: 20rpx; + + .popup-wrap-title { + font-size: 36rpx; + color: #333; + font-weight: bold; + margin-bottom: 20rpx; + } + + .popup-wrap-category { + width: 100%; + + .popup-wrap-category-wrap { + display: flex; + flex-wrap: wrap; + + .popup-wrap-category-item { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + margin: 0 20rpx 20rpx 0; + + &:nth-child(5n) { + margin-right: 0; + } + + text { + margin-top: 16rpx; + font-size: 24rpx; + color: #666666; + white-space: nowrap; + } + + .popup-wrap-category-item-text { + width: 120rpx; + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + } + + .popup-wrap-category-item-active { + position: relative; + + .popup-wrap-category-item-img { + border: 2px solid #40AE36; + border-radius: 50%; + } + + text { + background-color: #40AE36; + color: #fff; + padding: 2rpx 10rpx 6rpx 10rpx; + border-radius: 50rpx; + } + } + } + } + } + .comprehensive { display: flex; justify-content: space-between; @@ -772,7 +929,6 @@ .goods_list { .goods { - // width: 690rpx; height: 200rpx; margin: 20rpx auto; margin-top: 0; diff --git a/static/images/loading.gif b/static/images/loading.gif new file mode 100644 index 0000000..5e1f8fa Binary files /dev/null and b/static/images/loading.gif differ diff --git a/utils/mixin.js b/utils/mixin.js new file mode 100644 index 0000000..949c22e --- /dev/null +++ b/utils/mixin.js @@ -0,0 +1,29 @@ +const mixins = { + data() { + return { + wrapHeight: 'auto', + clientY: 0, + maxHeight: 0, + } + }, + + + methods: { + // 移动 + onTouchMove(e) { + console.log(e); + const moveDistance = e.changedTouches[0].clientY - this.clientY; + if (moveDistance > 5) { + this.wrapHeight = '352rpx'; + } else { + this.wrapHeight = 0; + } + }, + + // 开始触摸屏幕 + onTouchStart(e) { + this.clientY = e.changedTouches[0].clientY; + }, + } +} +export default mixins; \ No newline at end of file