This commit is contained in:
weipengfei 2024-04-24 18:00:47 +08:00
commit 2297fc0b88
5 changed files with 1093 additions and 936 deletions

1063
App.vue

File diff suppressed because it is too large Load Diff

View File

@ -1,352 +1,352 @@
{ {
"name" : "惠农生活", "name": "惠农生活",
"appid" : "__UNI__3A527D1", "appid": "__UNI__3A527D1",
"description" : "", "description": "",
"versionName" : "2.0.35", "versionName": "2.0.37",
"versionCode" : 2035, "versionCode": 2037,
"transformPx" : false, "transformPx": false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus": {
"titleNView" : true, "titleNView": true,
"usingComponents" : true, "usingComponents": true,
"nvueCompiler" : "uni-app", "nvueCompiler": "uni-app",
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"compatible" : { "compatible": {
"ignoreVersion" : true //trueHBuilderX1.9.0 "ignoreVersion": true //trueHBuilderX1.9.0
}, },
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : false, "alwaysShowBeforeRender": false,
"waiting" : false, "waiting": false,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* */ /* */
"modules" : { "modules": {
"VideoPlayer" : {}, "VideoPlayer": {},
"OAuth" : {}, "OAuth": {},
"Payment" : {}, "Payment": {},
"Share" : {}, "Share": {},
"iBeacon" : {}, "iBeacon": {},
"Maps" : {}, "Maps": {},
"Geolocation" : {}, "Geolocation": {},
"UniMP" : { "UniMP": {
"description" : "uni小程序" "description": "uni小程序"
}, },
"Push" : {}, "Push": {},
"Barcode" : {}, "Barcode": {},
"Camera" : {} "Camera": {}
}, },
"safearea" : { "safearea": {
"bottom" : { "bottom": {
"offset" : "none" "offset": "none"
} }
}, },
/* */ /* */
"distribute" : { "distribute": {
/* android */ /* android */
"android" : { "android": {
"permissions" : [ "permissions": [
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>", "<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>", "<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>", "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>", "<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>" "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
"permissionExternalStorage" : { "permissionExternalStorage": {
"request" : "none", "request": "none",
"prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。" "prompt": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
}, },
"permissionPhoneState" : { "permissionPhoneState": {
"request" : "none" // "request": "none" //
}, },
"minSdkVersion" : 23, "minSdkVersion": 23,
"targetSdkVersion" : 30 "targetSdkVersion": 30
}, },
/* ios */ /* ios */
"ios" : { "ios": {
"privacyDescription" : { "privacyDescription": {
"NSPhotoLibraryUsageDescription" : "上传用户头像保存分享海报", "NSPhotoLibraryUsageDescription": "上传用户头像保存分享海报",
"NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报", "NSPhotoLibraryAddUsageDescription": "上传用户头像保存分享海报",
"NSCameraUsageDescription" : "上传用户头像保存分享海报", "NSCameraUsageDescription": "上传用户头像保存分享海报",
"NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店", "NSLocationWhenInUseUsageDescription": "根据客户地理位置推荐最近门店",
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店" "NSLocationAlwaysUsageDescription": "根据客户地理位置推荐最近门店"
}, },
"idfa" : false, "idfa": false,
"dSYMs" : false "dSYMs": false
}, },
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs": {
"maps" : { "maps": {
"amap" : { "amap": {
"appkey_ios" : "0a3202688624938fd5d2f37b52c30d5d", "appkey_ios": "0a3202688624938fd5d2f37b52c30d5d",
"appkey_android" : "0354f5ddc11e2ea76c5aac647f44d945", "appkey_android": "0354f5ddc11e2ea76c5aac647f44d945",
"name" : "amapIvoVHpJR" "name": "amapIvoVHpJR"
} }
}, },
"payment" : { "payment": {
"weixin" : { "weixin": {
"__platform__" : [ "ios", "android" ], "__platform__": ["ios", "android"],
"appid" : "wx2e8f79ff281284f5", "appid": "wx2e8f79ff281284f5",
"UniversalLinks" : "https://shop.lihaink.cn/" "UniversalLinks": "https://shop.lihaink.cn/"
} }
}, },
"share" : { "share": {
"weixin" : { "weixin": {
"appid" : "wx2e8f79ff281284f5", "appid": "wx2e8f79ff281284f5",
"UniversalLinks" : "https://shop.lihaink.cn/" "UniversalLinks": "https://shop.lihaink.cn/"
} }
}, },
"geolocation" : { "geolocation": {
"amap" : { "amap": {
"name" : "amapIvoVHpJR", "name": "amapIvoVHpJR",
"__platform__" : [ "ios", "android" ], "__platform__": ["ios", "android"],
"appkey_ios" : "0a3202688624938fd5d2f37b52c30d5d", "appkey_ios": "0a3202688624938fd5d2f37b52c30d5d",
"appkey_android" : "0354f5ddc11e2ea76c5aac647f44d945" "appkey_android": "0354f5ddc11e2ea76c5aac647f44d945"
} }
}, },
"push" : {}, "push": {},
"oauth" : { "oauth": {
"weixin" : { "weixin": {
"appid" : "wx2e8f79ff281284f5", "appid": "wx2e8f79ff281284f5",
"UniversalLinks" : "https://shop.lihaink.cn/" "UniversalLinks": "https://shop.lihaink.cn/"
} }
}, },
"ad" : {} "ad": {}
}, },
"icons" : { "icons": {
"android" : { "android": {
"hdpi" : "unpackage/res/icons/72x72.png", "hdpi": "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png", "xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png", "xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png" "xxxhdpi": "unpackage/res/icons/192x192.png"
}, },
"ios" : { "ios": {
"appstore" : "unpackage/res/icons/1024x1024.png", "appstore": "unpackage/res/icons/1024x1024.png",
"ipad" : { "ipad": {
"app" : "unpackage/res/icons/76x76.png", "app": "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png", "app@2x": "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png", "notification": "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png", "notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png", "proapp@2x": "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png", "settings": "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png", "settings@2x": "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png", "spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png" "spotlight@2x": "unpackage/res/icons/80x80.png"
}, },
"iphone" : { "iphone": {
"app@2x" : "unpackage/res/icons/120x120.png", "app@2x": "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png", "app@3x": "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png", "notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png", "notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png", "settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png", "settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png", "spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png" "spotlight@3x": "unpackage/res/icons/120x120.png"
} }
} }
}, },
"splashscreen" : { "splashscreen": {
"useOriginalMsgbox" : true, "useOriginalMsgbox": true,
"androidStyle" : "common" "androidStyle": "common"
} }
}, },
"nativePlugins" : { "nativePlugins": {
"JG-JCore" : { "JG-JCore": {
"JPUSH_APPKEY_IOS" : "8a5efd65cda14fafa6e64ad3", "JPUSH_APPKEY_IOS": "8a5efd65cda14fafa6e64ad3",
"JPUSH_CHANNEL_IOS" : "8a5efd65cda14fafa6e64ad3", "JPUSH_CHANNEL_IOS": "8a5efd65cda14fafa6e64ad3",
"JPUSH_APPKEY_ANDROID" : "b5f679f4357018605ea6fd2e", "JPUSH_APPKEY_ANDROID": "b5f679f4357018605ea6fd2e",
"JPUSH_CHANNEL_ANDROID" : "", "JPUSH_CHANNEL_ANDROID": "",
"__plugin_info__" : { "__plugin_info__": {
"name" : "JG-JCore", "name": "JG-JCore",
"description" : "极光推送JCore插件", "description": "极光推送JCore插件",
"platforms" : "Android,iOS", "platforms": "Android,iOS",
"url" : "", "url": "",
"android_package_name" : "uni.UNI3A527D1", "android_package_name": "uni.UNI3A527D1",
"ios_bundle_id" : "", "ios_bundle_id": "",
"isCloud" : false, "isCloud": false,
"bought" : -1, "bought": -1,
"pid" : "", "pid": "",
"parameters" : { "parameters": {
"JPUSH_APPKEY_IOS" : { "JPUSH_APPKEY_IOS": {
"des" : "[iOS]极光portal配置应用信息时分配的AppKey", "des": "[iOS]极光portal配置应用信息时分配的AppKey",
"key" : "JCore:APP_KEY", "key": "JCore:APP_KEY",
"value" : "daebe19b547c43128796a078" "value": "daebe19b547c43128796a078"
}, },
"JPUSH_CHANNEL_IOS" : { "JPUSH_CHANNEL_IOS": {
"des" : "[iOS]用于统计分发渠道不需要可填默认值developer-default", "des": "[iOS]用于统计分发渠道不需要可填默认值developer-default",
"key" : "JCore:CHANNEL", "key": "JCore:CHANNEL",
"value" : "" "value": ""
}, },
"JPUSH_APPKEY_ANDROID" : { "JPUSH_APPKEY_ANDROID": {
"des" : "[Android]极光portal配置应用信息时分配的AppKey", "des": "[Android]极光portal配置应用信息时分配的AppKey",
"key" : "JPUSH_APPKEY", "key": "JPUSH_APPKEY",
"value" : "" "value": ""
}, },
"JPUSH_CHANNEL_ANDROID" : { "JPUSH_CHANNEL_ANDROID": {
"des" : "[Android]用于统计分发渠道不需要可填默认值developer-default", "des": "[Android]用于统计分发渠道不需要可填默认值developer-default",
"key" : "JPUSH_CHANNEL", "key": "JPUSH_CHANNEL",
"value" : "" "value": ""
} }
} }
} }
}, },
"JG-JPush" : { "JG-JPush": {
"JPUSH_ISPRODUCTION_IOS" : "true", "JPUSH_ISPRODUCTION_IOS": "true",
"JPUSH_ADVERTISINGID_IOS" : "", "JPUSH_ADVERTISINGID_IOS": "",
"JPUSH_DEFAULTINITJPUSH_IOS" : "true", "JPUSH_DEFAULTINITJPUSH_IOS": "true",
"JPUSH_OPPO_APPKEY" : "", "JPUSH_OPPO_APPKEY": "",
"JPUSH_OPPO_APPID" : "", "JPUSH_OPPO_APPID": "",
"JPUSH_OPPO_APPSECRET" : "", "JPUSH_OPPO_APPSECRET": "",
"JPUSH_VIVO_APPKEY" : "", "JPUSH_VIVO_APPKEY": "",
"JPUSH_VIVO_APPID" : "", "JPUSH_VIVO_APPID": "",
"JPUSH_MEIZU_APPKEY" : "", "JPUSH_MEIZU_APPKEY": "",
"JPUSH_MEIZU_APPID" : "", "JPUSH_MEIZU_APPID": "",
"JPUSH_XIAOMI_APPKEY" : "", "JPUSH_XIAOMI_APPKEY": "",
"JPUSH_XIAOMI_APPID" : "", "JPUSH_XIAOMI_APPID": "",
"__plugin_info__" : { "__plugin_info__": {
"name" : "JG-JPush", "name": "JG-JPush",
"description" : "极光推送Hbuilder插件", "description": "极光推送Hbuilder插件",
"platforms" : "Android,iOS", "platforms": "Android,iOS",
"url" : "", "url": "",
"android_package_name" : "uni.UNI3A527D1", "android_package_name": "uni.UNI3A527D1",
"ios_bundle_id" : "", "ios_bundle_id": "",
"isCloud" : false, "isCloud": false,
"bought" : -1, "bought": -1,
"pid" : "", "pid": "",
"parameters" : { "parameters": {
"JPUSH_ISPRODUCTION_IOS" : { "JPUSH_ISPRODUCTION_IOS": {
"des" : "[iOS]是否是生产环境是填true不是填false或者不填", "des": "[iOS]是否是生产环境是填true不是填false或者不填",
"key" : "JPush:ISPRODUCTION", "key": "JPush:ISPRODUCTION",
"value" : "" "value": ""
}, },
"JPUSH_ADVERTISINGID_IOS" : { "JPUSH_ADVERTISINGID_IOS": {
"des" : "[iOS]广告标识符IDFA如果不需要使用IDFA可不填", "des": "[iOS]广告标识符IDFA如果不需要使用IDFA可不填",
"key" : "JPush:ADVERTISINGID", "key": "JPush:ADVERTISINGID",
"value" : "" "value": ""
}, },
"JPUSH_DEFAULTINITJPUSH_IOS" : { "JPUSH_DEFAULTINITJPUSH_IOS": {
"des" : "[iOS]是否默认初始化是填true不是填false或者不填", "des": "[iOS]是否默认初始化是填true不是填false或者不填",
"key" : "JPush:DEFAULTINITJPUSH", "key": "JPush:DEFAULTINITJPUSH",
"value" : "" "value": ""
}, },
"JPUSH_OPPO_APPKEY" : { "JPUSH_OPPO_APPKEY": {
"des" : "厂商OPPO-appkey,示例OP-12345678", "des": "厂商OPPO-appkey,示例OP-12345678",
"key" : "OPPO_APPKEY", "key": "OPPO_APPKEY",
"value" : "" "value": ""
}, },
"JPUSH_OPPO_APPID" : { "JPUSH_OPPO_APPID": {
"des" : "厂商OPPO-appId,示例OP-12345678", "des": "厂商OPPO-appId,示例OP-12345678",
"key" : "OPPO_APPID", "key": "OPPO_APPID",
"value" : "" "value": ""
}, },
"JPUSH_OPPO_APPSECRET" : { "JPUSH_OPPO_APPSECRET": {
"des" : "厂商OPPO-appSecret,示例OP-12345678", "des": "厂商OPPO-appSecret,示例OP-12345678",
"key" : "OPPO_APPSECRET", "key": "OPPO_APPSECRET",
"value" : "" "value": ""
}, },
"JPUSH_VIVO_APPKEY" : { "JPUSH_VIVO_APPKEY": {
"des" : "厂商VIVO-appkey,示例12345678", "des": "厂商VIVO-appkey,示例12345678",
"key" : "com.vivo.push.api_key", "key": "com.vivo.push.api_key",
"value" : "" "value": ""
}, },
"JPUSH_VIVO_APPID" : { "JPUSH_VIVO_APPID": {
"des" : "厂商VIVO-appId,示例12345678", "des": "厂商VIVO-appId,示例12345678",
"key" : "com.vivo.push.app_id", "key": "com.vivo.push.app_id",
"value" : "" "value": ""
}, },
"JPUSH_MEIZU_APPKEY" : { "JPUSH_MEIZU_APPKEY": {
"des" : "厂商MEIZU-appKey,示例MZ-12345678", "des": "厂商MEIZU-appKey,示例MZ-12345678",
"key" : "MEIZU_APPKEY", "key": "MEIZU_APPKEY",
"value" : "" "value": ""
}, },
"JPUSH_MEIZU_APPID" : { "JPUSH_MEIZU_APPID": {
"des" : "厂商MEIZU-appId,示例MZ-12345678", "des": "厂商MEIZU-appId,示例MZ-12345678",
"key" : "MEIZU_APPID", "key": "MEIZU_APPID",
"value" : "" "value": ""
}, },
"JPUSH_XIAOMI_APPKEY" : { "JPUSH_XIAOMI_APPKEY": {
"des" : "厂商XIAOMI-appKey,示例MI-12345678", "des": "厂商XIAOMI-appKey,示例MI-12345678",
"key" : "XIAOMI_APPKEY", "key": "XIAOMI_APPKEY",
"value" : "" "value": ""
}, },
"JPUSH_XIAOMI_APPID" : { "JPUSH_XIAOMI_APPID": {
"des" : "厂商XIAOMI-appId,示例MI-12345678", "des": "厂商XIAOMI-appId,示例MI-12345678",
"key" : "XIAOMI_APPID", "key": "XIAOMI_APPID",
"value" : "" "value": ""
} }
} }
} }
} }
} }
}, },
/* */ /* */
"quickapp" : {}, "quickapp": {},
/* */ /* */
"mp-weixin" : { "mp-weixin": {
"appid" : "wx5fb1cc8edb3f8baa", "appid": "wx5fb1cc8edb3f8baa",
"setting" : { "setting": {
"urlCheck" : false, "urlCheck": false,
"minified" : true, "minified": true,
"postcss" : true, "postcss": true,
"es6" : true "es6": true
}, },
"permission" : { "permission": {
"scope.userLocation" : { "scope.userLocation": {
"desc" : "获取您的位置" "desc": "获取您的位置"
} }
}, },
"requiredPrivateInfos" : [ "getLocation", "chooseAddress" ], "requiredPrivateInfos": ["getLocation", "chooseAddress"],
"usingComponents" : true, "usingComponents": true,
"__usePrivacyCheck__" : true "__usePrivacyCheck__": true
}, },
"mp-alipay" : { "mp-alipay": {
"usingComponents" : true "usingComponents": true
}, },
"mp-baidu" : { "mp-baidu": {
"usingComponents" : true "usingComponents": true
}, },
"mp-toutiao" : { "mp-toutiao": {
"usingComponents" : true "usingComponents": true
}, },
"h5" : { "h5": {
"devServer" : { "devServer": {
"https" : false "https": false
}, },
"router" : { "router": {
"mode" : "history", "mode": "history",
"base" : "" "base": ""
}, },
"domain" : "", "domain": "",
"sdkConfigs" : { "sdkConfigs": {
"maps" : { "maps": {
"qqmap" : { "qqmap": {
"key" : "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7" "key": "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
} }
} }
}, },
"title" : "加载中...", "title": "加载中...",
"template" : "template.h5.html", "template": "template.h5.html",
"optimization" : { "optimization": {
"treeShaking" : { "treeShaking": {
"enable" : true "enable": true
} }
} }
} }
} }

View File

@ -522,18 +522,26 @@
diyId: 0, diyId: 0,
preview: false, preview: false,
isSupport: true, isSupport: true,
isIndexClick: true,
scrollTop: 0
}; };
}, },
onTabItemTap(e) { onTabItemTap(e) {
uni.pageScrollTo({ if (this.isIndexClick) {
scrollTop: 0, uni.pageScrollTo({
duration: 300 scrollTop: 0,
}); duration: 300
});
} else {
this.isIndexClick = true;
}
}, },
// //
onPageScroll(e) { onPageScroll(e) {
this.isIndexClick = true;
this.scrollTop = e.scrollTop;
this.isFixed = e.scrollTop > 40; this.isFixed = e.scrollTop > 40;
if (this.isHeaderSerch) { if (this.isHeaderSerch) {
let isScroll = false let isScroll = false
@ -545,7 +553,6 @@
// scrollTopeasy-loadimage // scrollTopeasy-loadimage
uni.$emit('scroll'); uni.$emit('scroll');
if (e.scrollTop >= 100) { if (e.scrollTop >= 100) {
uni.setTabBarItem({ uni.setTabBarItem({
index: 0, index: 0,
@ -612,7 +619,8 @@
this.activeRouter = '/' + curRoute this.activeRouter = '/' + curRoute
}, },
onShow() { onShow() {
let that = this let that = this;
that.isIntegral = uni.getStorageSync('isIntegral') that.isIntegral = uni.getStorageSync('isIntegral')
// #ifdef APP-PLUS // #ifdef APP-PLUS
if (that.appUpdate.openUpgrade == '1') { if (that.appUpdate.openUpgrade == '1') {
@ -628,6 +636,8 @@
that.isScrolled = res[0].top <= -60 that.isScrolled = res[0].top <= -60
}) })
}) })
this.isIndexClick = false;
if (this.isLogin) { if (this.isLogin) {
this.getUserInfo(); this.getUserInfo();
} }

View File

@ -2,7 +2,6 @@
<view class="store-home"> <view class="store-home">
<view class="header"> <view class="header">
<view style="height: var(--status-bar-height);"></view> <view style="height: var(--status-bar-height);"></view>
<view class="head-menu"> <view class="head-menu">
<view class="iconfont icon-xiangzuo" @click="goback" style="color: #fff;"></view> <view class="iconfont icon-xiangzuo" @click="goback" style="color: #fff;"></view>
<navigator :url="'/pages/store/list/index?mer_id='+id" hover-class="none" <navigator :url="'/pages/store/list/index?mer_id='+id" hover-class="none"
@ -86,10 +85,10 @@
</view> </view>
<scroll-view class="main" scroll-y="true" @scroll="scrollHome" catchtouchmove :style="viewColor"> <scroll-view class="main" scroll-y="true" @scroll="scrollHome" catchtouchmove :style="viewColor">
<!-- nav的占位 -->
<view class="tab-cont" <view class="tab-cont"
:style="viewColor,{'height':'calc(100vh - '+listHeight + (tabActive == 2?' + 84rpx':'')+' )'}" :style="viewColor,{'height':'calc(100vh - '+(listHeight) + (tabActive == 2?' + 84rpx':'')+' )'}"
:class="{noPointer : preview}"> :class="{noPointer : preview}">
<!-- 占位 --> <!-- 占位 -->
<view class="aside-left-placeholder" v-if="tabActive != 2"></view> <view class="aside-left-placeholder" v-if="tabActive != 2"></view>
@ -151,11 +150,28 @@
</view> </view>
<!-- 首页 --> <!-- 首页 -->
<view style="margin:0 auto;" <view style="margin:0px auto;"
v-show="(tabActive == 3 || tabActive == 7 || diyActive == 1 || diyActive == 2) && tabActive != 5 && tabActive != 2"> v-show="(tabActive == 3 || tabActive == 7 || diyActive == 1 || diyActive == 2) && tabActive != 5 && tabActive != 2">
<!-- 二级分类 -->
<scroll-view :scroll-x="true" class="small-classify" :style="{'width':'calc(100vw - 152rpx)'}"
v-if="asideCurr">
<view class="second-item-con-wrap">
<view class="second-item-con" :style="{'flex-wrap':isChangeSecTabStyle?'wrap':''}">
<block v-for="item in secondTabList" :key="item.store_category_id">
<view class="small-classify-item"
:class="{'small-classify-item-active':secondTabCurr == item.store_category_id?true:false}"
@click="onSecondTabChange(item.store_category_id)">
{{item.cate_name}}
</view>
</block>
</view>
<view class="sanjiaoxing" @click="onChangeSecTabStyle"></view>
</view>
</scroll-view>
<!-- 商品 --> <!-- 商品 -->
<view v-if="goods.length" class="goods-wrap" id="goods" @touchmove="onTouchmove" <view v-if="goods.length" class="goods-wrap" id="goods" @touchmove="onTouchmove"
:style="{'width':'calc(100vw - 152rpx)'}"> :style="{'width':'calc(100vw - 152rpx)','padding-top':(!!asideCurr?'94rpx' :'')}">
<view v-if="isColumn" class="goods column"> <view v-if="isColumn" class="goods column">
<view v-for="(item,indx) in goods" :key="indx" class="item" @click="goGoodsDetail(item)"> <view v-for="(item,indx) in goods" :key="indx" class="item" @click="goGoodsDetail(item)">
<view class="image" style="width: 180rpx;height: 180rpx;"> <view class="image" style="width: 180rpx;height: 180rpx;">
@ -197,7 +213,8 @@
<WaterfallsFlow :wfList='goods' @itemTap="goGoodsDetail" :type="1" :isStore="1" /> <WaterfallsFlow :wfList='goods' @itemTap="goGoodsDetail" :type="1" :isStore="1" />
</view> </view>
</view> </view>
<view v-if="goodsLoading" class="acea-row row-center-wrapper loadingicon"> <view v-if="goodsLoading" class="acea-row row-center-wrapper loadingicon"
:style="{'margin-top':!!asideCurr?'94rpx':''}">
<text :hidden="!goodsLoading" class="iconfont icon-jiazai loading"></text> <text :hidden="!goodsLoading" class="iconfont icon-jiazai loading"></text>
{{loadTitle}} {{loadTitle}}
</view> </view>
@ -224,7 +241,8 @@
</view> </view>
</view> </view>
</view> </view>
<view class="acea-row row-center-wrapper loadingicon"> <view class="acea-row row-center-wrapper loadingicon"
:style="{'margin-top':!!asideCurr?'94rpx':''}">
<text :hidden="!categoryLoading" class="iconfont icon-jiazai loading"></text> <text :hidden="!categoryLoading" class="iconfont icon-jiazai loading"></text>
{{loadTitle}} {{loadTitle}}
</view> </view>
@ -373,7 +391,7 @@
navShow: false, navShow: false,
navActive: 0, navActive: 0,
diyActive: 0, diyActive: 0,
tabActive: '', // tabActive: 3, //
isCoupon: 0, isCoupon: 0,
keyword: '', keyword: '',
order: '', order: '',
@ -470,7 +488,11 @@
asideCurr: '', asideCurr: '',
CartCount: 0, CartCount: 0,
navHeight: 0, navHeight: 0,
listTop: 0 listTop: 0,
mer_type: '', //
secondTabList: [],
secondTabCurr: '', //
isChangeSecTabStyle: false
} }
}, },
computed: { computed: {
@ -527,6 +549,7 @@
break; break;
case 7: case 7:
this.resetParmas(); this.resetParmas();
this.getMerClassifly();
this.goods = []; this.goods = [];
this.getGoods(); this.getGoods();
break; break;
@ -557,8 +580,9 @@
} }
} }
// #endif // #endif
//
this.getStore(); this.getStore();
this.diyData(); // this.diyData();
shareScence(this.currSpid, this.isLogin); shareScence(this.currSpid, this.isLogin);
this.initHeight(); this.initHeight();
@ -579,6 +603,8 @@
}) })
this.getMerClassifly(); this.getMerClassifly();
//
this.getCart(); this.getCart();
}, },
@ -617,31 +643,97 @@
getCartCounts({ getCartCounts({
sale_type: this.where.sale_type sale_type: this.where.sale_type
}).then(res => { }).then(res => {
console.log(res)
that.CartCount = res.data[0].count; that.CartCount = res.data[0].count;
}); });
}, },
// //
onChangeAsideMenu(e) { onChangeAsideMenu(e) {
//
this.getMerClassifly(e)
this.asideCurr = e; this.asideCurr = e;
this.resetParmas(); this.resetParmas();
this.goods = []; this.goods = [];
this.loadend = false; this.loadend = false;
//
this.secondTabCurr = '';
this.isChangeSecTabStyle = false;
},
//
getMerClassifly(pid) {
const param = {
mer_type: 2,
sale_type: this.where.sale_type,
mer_id: this.id,
mer_type: '',
pid: pid
};
// ()
if (this.tabActive == 7) {
param.mer_type = 1;
}
//()
if (this.tabActive == 3) {
param.mer_type = 2;
}
getCategoryIndexList(param).then(res => {
//
if (pid) {
this.secondTabList = [{
cate_name: '全部',
store_category_id: ''
}, ...res.data];
} else { //
this.asideMenu = [{
cate_name: '全部',
store_category_id: ''
}, ...res.data];
}
this.getGoods();
})
},
//
onSecondTabChange(e) {
this.isChangeSecTabStyle = false;
this.secondTabCurr = e;
this.resetParmas();
this.goods = [];
this.loadend = false;
this.getGoods(); this.getGoods();
}, },
// //
getMerClassifly() { tab: function(param) {
getCategoryIndexList({ if (param == 9) return uni.switchTab({
mer_type: 2, url: "/pages/order_addcart/order_addcart"
sale_type: this.where.sale_type });
}).then(res => {
this.asideMenu = [{ this.tabActive = param;
cate_name: '全部', this.goodsLoading = this.loadend = this.loading = false;
store_category_id: ''
}, ...res.data]; // tab
}) this.secondTabCurr = '';
this.secondTabList = [];
this.asideCurr = '';
this.asideMenu = [];
this.loadend = false;
this.getMerClassifly();
},
//
onChangeSecTabStyle() {
this.isChangeSecTabStyle = !this.isChangeSecTabStyle;
},
// navbar
scrollHome: function(e) {
// uni.$emit('scroll');
// this.navShow = e.detail.scrollTop >= 50;
}, },
navTo(url) { navTo(url) {
@ -862,7 +954,6 @@
}, },
// //
getGoods: function() { getGoods: function() {
console.log(2)
let that = this; let that = this;
if (that.loadend) return; if (that.loadend) return;
if (that.loading) return; if (that.loading) return;
@ -870,7 +961,11 @@
that.goodsLoading = true; that.goodsLoading = true;
that.loadTitle = ''; that.loadTitle = '';
that.where.cate_pid = that.asideCurr;
if (that.secondTabCurr) //
that.where.cate_pid = that.secondTabCurr;
else //
that.where.cate_pid = that.asideCurr;
if (this.tabActive == 7) getStoreCloudGoods(that.id, that.where).then(res => { if (this.tabActive == 7) getStoreCloudGoods(that.id, that.where).then(res => {
that.goodsLoading = false; that.goodsLoading = false;
@ -1079,11 +1174,6 @@
} }
}) })
}, },
// navbar
scrollHome: function(e) {
// uni.$emit('scroll');
// this.navShow = e.detail.scrollTop >= 50;
},
goback: function() { goback: function() {
uni.navigateBack(); uni.navigateBack();
@ -1095,16 +1185,6 @@
}); });
}, },
//
tab: function(param) {
console.log(param)
if (param == 9) return uni.switchTab({
url: "/pages/order_addcart/order_addcart"
})
this.tabActive = param;
this.goodsLoading = this.loadend = this.loading = false
},
resetParmas() { resetParmas() {
this.navActive = 0; this.navActive = 0;
this.where = { this.where = {
@ -1112,7 +1192,8 @@
keyword: '', keyword: '',
page: 1, page: 1,
limit: 30, limit: 30,
sale_type: this.where.sale_type sale_type: this.where.sale_type,
cate_pid: ''
} }
}, },
@ -1163,6 +1244,7 @@
} }
}, },
onPageScroll() { onPageScroll() {
this.isChangeSecTabStyle = false;
uni.$emit('scroll'); uni.$emit('scroll');
}, },
onPullDownRefresh() { onPullDownRefresh() {
@ -1177,6 +1259,56 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.small-classify {
position: fixed;
left: 152rpx;
min-height: 94rpx;
background: #fff;
z-index: 100;
padding: 20rpx 20rpx 10rpx;
box-sizing: border-box;
.second-item-con-wrap {
position: relative;
display: flex;
align-items: center;
.second-item-con {
display: flex;
width: 95%;
overflow: auto;
}
.sanjiaoxing {
position: absolute;
right: -2rpx;
top: 20rpx;
width: 0;
height: 0;
border: 12rpx solid;
border-color: #333 transparent transparent transparent;
margin-left: 4rpx;
}
}
.small-classify-item {
flex-shrink: 0;
padding: 10rpx 40rpx;
border-radius: 4rpx;
font-size: 24rpx;
color: #999;
background: #F6F6F6;
text-align: center;
margin-right: 10rpx;
margin-bottom: 10rpx;
}
.small-classify-item-active {
background: #ECFFE8;
color: #40AE36;
}
}
.tab-cont { .tab-cont {
background: #f5f5f5; background: #f5f5f5;
min-height: 500rpx; min-height: 500rpx;
@ -1191,8 +1323,6 @@
position: fixed; position: fixed;
left: 0; left: 0;
z-index: 2; z-index: 2;
display: flex;
flex-wrap: wrap;
width: 152rpx; width: 152rpx;
overflow-y: auto; overflow-y: auto;
background-color: #F4F4F4; background-color: #F4F4F4;
@ -2225,7 +2355,7 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-top: 0; margin: 0 auto;
image { image {
width: 414rpx; width: 414rpx;

View File

@ -558,7 +558,8 @@
deduction_rate: '', // deduction_rate: '', //
order: '', // sales, price_asc, price_desc order: '', // sales, price_asc, price_desc
rand: 1, rand: 1,
} },
isIndexClick: true
} }
}, },
computed: { computed: {
@ -573,10 +574,19 @@
}, },
onTabItemTap(e) { onTabItemTap(e) {
uni.pageScrollTo({ if (this.isIndexClick) {
scrollTop: 0, uni.pageScrollTo({
duration: 300 scrollTop: 0,
}); duration: 300
});
} else {
this.isIndexClick = true;
}
},
onShow() {
console.log(this.isIndexClick)
this.isIndexClick = false;
}, },
onPageScroll(e) { onPageScroll(e) {