This commit is contained in:
1154079537 2024-04-27 18:00:01 +08:00
parent 317c575391
commit b6e393cfa0
5 changed files with 684 additions and 649 deletions

View File

@ -1,352 +1,352 @@
{ {
"name": "惠农生活", "name" : "惠农生活",
"appid": "__UNI__3A527D1", "appid" : "__UNI__3A527D1",
"description": "", "description" : "",
"versionName": "2.0.37", "versionName" : "2.0.38",
"versionCode": 2037, "versionCode" : 2038,
"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

@ -578,7 +578,8 @@
"path": "order_list/index", "path": "order_list/index",
"style": { "style": {
"navigationBarTitleText": "我的订单", "navigationBarTitleText": "我的订单",
"navigationStyle": "custom" "navigationStyle": "custom",
"enablePullDownRefresh": true
} }
}, },
{ {

View File

@ -658,9 +658,12 @@
this.reconnect(); this.reconnect();
// #ifdef APP-PLUS // #ifdef APP-PLUS
setTimeout(() => { setTimeout(() => {
uni.reLaunch({ this.hotPage = 1;
url: "/pages/index/index" this.hotScroll = true;
}); let hostList = this.hostProduct;
hostList[this.hostIndex] = [];
this.$set(this, 'hostProduct', hostList);
this.loadGoods(this.hostIndex + 1);
}, 50) }, 50)
// #endif // #endif
}, },
@ -1091,9 +1094,11 @@
let num = that.hotLimit; let num = that.hotLimit;
if (!that.hotScroll) return; if (!that.hotScroll) return;
if (that.hotLoading[e]) return; if (that.hotLoading[e]) return;
that.hotLoading[e] = true; that.hotLoading[e] = true;
that.hotTitle = '加载中'; that.hotTitle = '加载中';
getProductHot(that.hotPage, that.hotLimit, 1, 1).then(res => { getProductHot(that.hotPage, that.hotLimit, 1, 1).then(res => {
console.log(res)
res.data.list = this.shuffleArray(res.data.list); res.data.list = this.shuffleArray(res.data.list);
let list = res.data.list; let list = res.data.list;
let productList = that.hostProduct; let productList = that.hostProduct;

View File

@ -1,27 +1,28 @@
<template> <template>
<div :style="viewColor"> <div :style="viewColor">
<div class="register absolute" v-if="!auth_token"> <div class="register absolute" v-if="!auth_token">
<div class="login" style="background-size: 100% 100%;background-repeat: no-repeat;"> <div class="login" style="background-size: 100% 100%;background-repeat: no-repeat;">
<div class="shading" > <div class="shading">
<div class="pictrue acea-row row-center-wrapper" style="background-color: transparent !important;"> <div class="pictrue acea-row row-center-wrapper" style="background-color: transparent !important;">
<image src="@/static/images/logo1.png" /> <image src="@/static/images/logo1.png" />
</div>
</div>
<div class="whiteBg" v-if="formItem == 0">
<div class="logon" style="display: flex;align-items: center;justify-content: center;"
@click="wxLogin">
<u-icon name="weixin-fill" color="#fff" size="30"></u-icon> 微信一键登录
</div>
<div class="protocol acea-row row-between-wrapper">
<checkbox-group class="checkgroup" @change='isAgree=!isAgree'>
<checkbox class="checkbox" :checked="isAgree ? true : false" />
<text class="protocol_text">我已同意<text @click="userAgree"
class="font_pro">用户协议</text><text @click="userPrivacyAgree"
class="font_pro">隐私政策</text></text>
</checkbox-group>
</div> </div>
</div> </div>
<div class="whiteBg" v-if="formItem == 0">
<div class="logon" style="display: flex;align-items: center;justify-content: center;" @click="wxLogin">
<u-icon name="weixin-fill" color="#fff" size="30"></u-icon> 微信一键登录
</div>
<div class="protocol acea-row row-between-wrapper">
<checkbox-group class="checkgroup" @change='isAgree=!isAgree'>
<checkbox class="checkbox" :checked="isAgree ? true : false" />
<text class="protocol_text">我已同意<text @click="userAgree"
class="font_pro">用户协议</text><text @click="userPrivacyAgree"
class="font_pro">隐私政策</text></text>
</checkbox-group>
</div>
</div>
<div class="whiteBg" v-else-if="formItem === 1" style="po"> <div class="whiteBg" v-else-if="formItem === 1" style="po">
<div class="title acea-row row-center-wrapper"> <div class="title acea-row row-center-wrapper">
<div class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList" <div class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList"
@ -48,7 +49,7 @@
</form> </form>
<div class="tip"> <div class="tip">
<!-- <span @click="formItem = 2" class="font-color-red">立即注册</span> --> <!-- <span @click="formItem = 2" class="font-color-red">立即注册</span> -->
<span> </span> <span> </span>
<navigator class="forgetPwd" hover-class="none" url="/pages/users/retrievePassword/index"> <navigator class="forgetPwd" hover-class="none" url="/pages/users/retrievePassword/index">
忘记密码 忘记密码
</navigator> </navigator>
@ -63,13 +64,13 @@
v-model="account" /> v-model="account" />
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<div class="acea-row row-middle"> <div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image> <image src="/static/images/code_2.png"></image>
<input type="number" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput" <input type="number" placeholder="填写验证码" placeholder-class="placeholder"
v-model="captcha" maxlength="4" /> class="codeIput" v-model="captcha" maxlength="4" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" <button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
@click="handleVerify"> @click="handleVerify">
{{ text }} {{ text }}
@ -79,8 +80,8 @@
<div class="item" v-if="isShowCode"> <div class="item" v-if="isShowCode">
<div class="acea-row row-middle"> <div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image> <image src="/static/images/code_2.png"></image>
<input type="number" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput" <input type="number" placeholder="填写验证码" placeholder-class="placeholder"
v-model="codeVal" maxlength="4" /> class="codeIput" v-model="codeVal" maxlength="4" />
<div class="code" @click="getcaptcha"> <div class="code" @click="getcaptcha">
<image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" /> <image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" />
</div> </div>
@ -112,9 +113,9 @@
<div class="item"> <div class="item">
<div class="acea-row row-middle"> <div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image> <image src="/static/images/code_2.png"></image>
<input type="number" placeholder="填写验证码" maxLength='4' placeholder-class="placeholder" class="codeIput" <input type="number" placeholder="填写验证码" maxLength='4' placeholder-class="placeholder"
v-model="captcha" /> class="codeIput" v-model="captcha" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" <button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
@click="handleVerify"> @click="handleVerify">
{{ text }} {{ text }}
@ -128,12 +129,12 @@
v-model="password" /> v-model="password" />
</div> </div>
</div> </div>
<div class="item" v-if="isShowCode"> <div class="item" v-if="isShowCode">
<div class="acea-row row-middle"> <div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image> <image src="/static/images/code_2.png"></image>
<input type="number" placeholder="填写验证码" maxlength="4" placeholder-class="placeholder" class="codeIput" <input type="number" placeholder="填写验证码" maxlength="4" placeholder-class="placeholder"
v-model="codeVal" /> class="codeIput" v-model="codeVal" />
<div class="code" @click="getcaptcha"> <div class="code" @click="getcaptcha">
<image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" /> <image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" />
</div> </div>
@ -167,37 +168,38 @@
</view> </view>
</view> </view>
</view> </view>
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<div class="protocol acea-row row-between-wrapper" style="position: fixed; bottom: 160rpx;left: 50%;transform: translate(-50%);"> <div class="protocol acea-row row-between-wrapper"
<text class="protocol_text" v-if="formItem==0" @click="formItem = 1 ">其他方式登录</text> style="position: fixed; bottom: 160rpx;left: 50%;transform: translate(-50%);">
<text class="protocol_text" v-else @click="formItem = 0 ">微信快捷登录</text> <text class="protocol_text" v-if="formItem==0" @click="formItem = 1 ">其他方式登录</text>
</div> <text class="protocol_text" v-else @click="formItem = 0 ">微信快捷登录</text>
<!-- #endif --> </div>
<!-- #endif -->
</div> </div>
<form report-submit='true' v-if="auth_token"> <form report-submit='true' v-if="auth_token">
<view class="ChangePassword"> <view class="ChangePassword">
<view class="title"> <view class="title">
<view>首次登录</view> <view>首次登录</view>
<view style="font-size: 36rpx;">需要绑定手机号码</view> <view style="font-size: 36rpx;">需要绑定手机号码</view>
</view> </view>
<view class="list"> <view class="list">
<view class="item"> <view class="item">
<input type='number' placeholder='填写手机号码' placeholder-class='placeholder' <input type='number' placeholder='填写手机号码' placeholder-class='placeholder'
v-model="account"></input> v-model="account"></input>
</view> </view>
<view class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<input type='number' placeholder='填写验证码' maxlength="4" placeholder-class='placeholder' class="codeIput" <input type='number' placeholder='填写验证码' maxlength="4" placeholder-class='placeholder'
v-model="captcha"></input> class="codeIput" v-model="captcha"></input>
<button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled' <button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled'
@click="handleVerify"> @click="handleVerify">
{{ text }} {{ text }}
</button> </button>
</view> </view>
<view class="item"> <view class="item">
<input type='password' placeholder='填写登录密码' placeholder-class='placeholder' <input type='password' placeholder='填写登录密码' placeholder-class='placeholder'
v-model="password"></input> v-model="password"></input>
</view> </view>
<view class="protocol acea-row row-between-wrapper"> <view class="protocol acea-row row-between-wrapper">
@ -219,7 +221,7 @@
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }" <Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }"
ref="verify"></Verify> ref="verify"></Verify>
</div> </div>
</template> </template>
<script> <script>
@ -275,13 +277,15 @@
import parser from "@/components/jyf-parser/jyf-parser"; import parser from "@/components/jyf-parser/jyf-parser";
import { import {
commonAuth, commonAuth,
userMerge userMerge
} from '../../../api/public'; } from '../../../api/public';
import { import {
mapGetters mapGetters
} from "vuex"; } from "vuex";
import Verify from '@/components/verify/verify.vue'; import Verify from '@/components/verify/verify.vue';
import { Toast } from "../../../libs/uniApi"; import {
Toast
} from "../../../libs/uniApi";
const BACK_URL = "login_back_url"; const BACK_URL = "login_back_url";
// #ifdef APP-PLUS // #ifdef APP-PLUS
var jpushModule = uni.requireNativePlugin("JG-JPush"); var jpushModule = uni.requireNativePlugin("JG-JPush");
@ -295,7 +299,7 @@
}, },
data: function() { data: function() {
return { return {
navList: ["快速登录","账号登录"], navList: ["快速登录", "账号登录"],
current: 0, current: 0,
account: "", account: "",
password: "", password: "",
@ -303,9 +307,9 @@
// #ifdef APP-PLUS // #ifdef APP-PLUS
formItem: 0, formItem: 0,
// #endif // #endif
// #ifndef APP-PLUS // #ifndef APP-PLUS
formItem: 1, formItem: 1,
// #endif // #endif
type: "login", type: "login",
keyCode: "", keyCode: "",
codeUrl: "", codeUrl: "",
@ -350,7 +354,7 @@
this.getVersion(); this.getVersion();
}, },
mounted: function() { mounted: function() {
}, },
onReady() { onReady() {
let that = this let that = this
@ -379,7 +383,8 @@
}).then(({ }).then(({
data data
}) => { }) => {
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index"; const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) ||
"/pages/index/index";
that.$Cache.clear(BACK_URL); that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin'); that.$Cache.clear('login_back_url_weixin');
that.$store.commit("LOGIN", { that.$store.commit("LOGIN", {
@ -498,7 +503,8 @@
}).then(res => { }).then(res => {
const data = res.data; const data = res.data;
if (res.data.status == 200) { if (res.data.status == 200) {
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index"; const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) ||
"/pages/index/index";
that.$Cache.clear(BACK_URL); that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin'); that.$Cache.clear('login_back_url_weixin');
that.$store.commit("LOGIN", { that.$store.commit("LOGIN", {
@ -555,13 +561,13 @@
provider: 'weixin', provider: 'weixin',
onlyAuthorize: true, onlyAuthorize: true,
success: function(loginRes) { success: function(loginRes) {
console.log(loginRes); console.log(loginRes);
uni.hideLoading() uni.hideLoading()
self.appUserInfo = loginRes; self.appUserInfo = loginRes;
self.weixinLoginApi() self.weixinLoginApi()
}, },
fail(error) { fail(error) {
console.log(error); console.log(error);
uni.showToast({ uni.showToast({
title: '登录失败', title: '登录失败',
icon: 'none', icon: 'none',
@ -582,16 +588,17 @@
commonAuth({ commonAuth({
auth: { auth: {
type: 'app_wechat', type: 'app_wechat',
auth: { auth: {
code: that.appUserInfo.authResult.access_token, code: that.appUserInfo.authResult.access_token,
openid: that.appUserInfo.authResult.openid, openid: that.appUserInfo.authResult.openid,
phone: this.account, phone: this.account,
} }
} }
}).then(res => { }).then(res => {
const data = res.data; const data = res.data;
if (res.data.status == 200) { if (res.data.status == 200) {
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index"; const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) ||
"/pages/index/index";
that.$Cache.clear(BACK_URL); that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin'); that.$Cache.clear('login_back_url_weixin');
that.$store.commit("LOGIN", { that.$store.commit("LOGIN", {
@ -620,13 +627,71 @@
url: backUrl url: backUrl
}); });
} else { } else {
that.isAgree = false; that.isAgree = false;
that.auth_token = res.data.result.key; that.auth_token = res.data.result.key;
that.bindStatus = true; that.bindStatus = true;
} }
uni.hideLoading(); uni.hideLoading();
}).catch(res => { }).catch(res => {
console.log(res); console.log(res);
uni.hideLoading();
uni.showToast({
title: res.message || res,
icon: 'none',
duration: 2000
});
});
},
weixinLoginApi() {
const that = this
commonAuth({
auth: {
type: 'app_wechat',
auth: {
code: that.appUserInfo.code
}
}
}).then(res => {
console.log('--', res);
const data = res.data;
if (res.data.status == 200) {
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) ||
"/pages/index/index";
that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin');
that.$store.commit("LOGIN", {
'token': data.result.token,
'time': data.result.exp
});
that.$store.commit("SETUID", data.result.user.uid);
that.$store.commit('UPDATE_USERINFO', data.result.user);
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',
'/pages/user/index', '/pages/plant_grass/index'
]
if (indexPat.includes(this.getPath(backUrl))) {
method = 'switchTab'
} else {
method = 'navigateTo'
}
if (this.getPath(backUrl) === '/pages/users/login/index') {
uni.switchTab({
url: '/pages/index/index'
});
return
}
uni[method]({
url: backUrl
});
} else {
that.isAgree = false;
that.auth_token = res.data.result.key;
that.bindStatus = true;
}
uni.hideLoading();
}).catch(res => {
console.log('错误--', res);
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: res.message || res, title: res.message || res,
@ -635,63 +700,6 @@
}); });
}); });
}, },
weixinLoginApi() {
const that = this
commonAuth({
auth: {
type: 'app_wechat',
auth: {
code: that.appUserInfo.code
}
}
}).then(res => {
console.log('--', res);
const data = res.data;
if (res.data.status == 200) {
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin');
that.$store.commit("LOGIN", {
'token': data.result.token,
'time': data.result.exp
});
that.$store.commit("SETUID", data.result.user.uid);
that.$store.commit('UPDATE_USERINFO', data.result.user);
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',
'/pages/user/index', '/pages/plant_grass/index'
]
if (indexPat.includes(this.getPath(backUrl))) {
method = 'switchTab'
} else {
method = 'navigateTo'
}
if (this.getPath(backUrl) === '/pages/users/login/index') {
uni.switchTab({
url: '/pages/index/index'
});
return
}
uni[method]({
url: backUrl
});
} else {
that.isAgree = false;
that.auth_token = res.data.result.key;
that.bindStatus = true;
}
uni.hideLoading();
}).catch(res => {
console.log('错误--', res);
uni.hideLoading();
uni.showToast({
title: res.message || res,
icon: 'none',
duration: 2000
});
});
},
getAgreement() { getAgreement() {
let that = this let that = this
getAgreementApi('sys_user_agree').then(res => { getAgreementApi('sys_user_agree').then(res => {
@ -745,23 +753,24 @@
data data
}) => { }) => {
this.checkOpenId(data.user) this.checkOpenId(data.user)
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index"; const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) ||
"/pages/index/index";
that.$store.commit("LOGIN", { that.$store.commit("LOGIN", {
'token': data.token, 'token': data.token,
'time': data.exp 'time': data.exp
}); });
that.$store.commit("SETUID", data.user.uid); that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user); that.$store.commit('UPDATE_USERINFO', data.user);
if(data.is_new_user && !that.$Cache.get('login_back_url_weixin')){ if (data.is_new_user && !that.$Cache.get('login_back_url_weixin')) {
return uni.navigateTo({ return uni.navigateTo({
url: '/pages/helpPeople/helpPeople' url: '/pages/helpPeople/helpPeople'
}) })
} }
that.$Cache.clear(BACK_URL); that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin'); that.$Cache.clear('login_back_url_weixin');
let method let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart', let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate', '/pages/goods_cate/goods_cate',
@ -831,25 +840,26 @@
}); });
that.$store.commit("SETUID", res.data.user.uid); that.$store.commit("SETUID", res.data.user.uid);
that.$store.commit('UPDATE_USERINFO', res.data.user); that.$store.commit('UPDATE_USERINFO', res.data.user);
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index"; const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) ||
"/pages/index/index";
that.$Cache.clear(BACK_URL); that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin'); that.$Cache.clear('login_back_url_weixin');
let method let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart', let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate', '/pages/goods_cate/goods_cate',
'/pages/user/index' '/pages/user/index'
] ]
if (indexPat.includes(this.getPath(backUrl))) { if (indexPat.includes(this.getPath(backUrl))) {
method = 'switchTab' method = 'switchTab'
} else { } else {
method = 'navigateTo' method = 'navigateTo'
} }
uni[method]({ uni[method]({
url: backUrl, url: backUrl,
success:()=>{ success: () => {
this.auth_token = '' this.auth_token = ''
} }
}); });
}) })
.catch(res => { .catch(res => {
that.$util.Tips({ that.$util.Tips({
@ -857,90 +867,91 @@
}); });
}); });
}, },
async weixinMerge() { async weixinMerge() {
let that = this; let that = this;
if (!that.account) return that.$util.Tips({ if (!that.account) return that.$util.Tips({
title: '请输入手机号码' title: '请输入手机号码'
}); });
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({ if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
title: '请输入正确的手机号码' title: '请输入正确的手机号码'
}); });
if (!that.captcha) return that.$util.Tips({ if (!that.captcha) return that.$util.Tips({
title: '请输入验证码' title: '请输入验证码'
}); });
if (!/^[\w\d]+$/i.test(that.captcha)) return that.$util.Tips({ if (!/^[\w\d]+$/i.test(that.captcha)) return that.$util.Tips({
title: '请输入正确的验证码' title: '请输入正确的验证码'
}); });
if (!that.password) return that.$util.Tips({ if (!that.password) return that.$util.Tips({
title: '请输入密码' title: '请输入密码'
}); });
if (!/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/i.test(that.password)) return that.$util.Tips({ if (!/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/i.test(that.password)) return that.$util.Tips({
title: '请输入6-16位字母加数字组合' title: '请输入6-16位字母加数字组合'
}); });
if (!that.isAgree) return that.$util.Tips({ if (!that.isAgree) return that.$util.Tips({
title: '请勾选用户协议与隐私政策' title: '请勾选用户协议与隐私政策'
}); });
console.log('绑定前', { console.log('绑定前', {
auth_token: this.auth_token || uni.getStorageSync('auth_token'), auth_token: this.auth_token || uni.getStorageSync('auth_token'),
phone: that.account, phone: that.account,
sms_code: that.captcha, sms_code: that.captcha,
pwd: that.password, pwd: that.password,
spread: that.$Cache.get("spread"), spread: that.$Cache.get("spread"),
// #ifdef APP-PLUS // #ifdef APP-PLUS
user_type: 'app', user_type: 'app',
// #endif // #endif
// #ifdef H5 // #ifdef H5
user_type: 'h5', user_type: 'h5',
// #endif // #endif
}); });
userMerge({ userMerge({
auth_token: this.auth_token || uni.getStorageSync('auth_token'), auth_token: this.auth_token || uni.getStorageSync('auth_token'),
phone: that.account, phone: that.account,
sms_code: that.captcha, sms_code: that.captcha,
pwd: that.password, pwd: that.password,
spread: that.$Cache.get("spread"), spread: that.$Cache.get("spread"),
// #ifdef APP-PLUS // #ifdef APP-PLUS
user_type: 'app', user_type: 'app',
// #endif // #endif
// #ifdef H5 // #ifdef H5
user_type: 'h5', user_type: 'h5',
// #endif // #endif
}) })
.then(res => { .then(res => {
console.log(res); console.log(res);
that.$store.commit("LOGIN", { that.$store.commit("LOGIN", {
'token': res.data.token, 'token': res.data.token,
'time': res.data.exp 'time': res.data.exp
}); });
that.$store.commit("SETUID", res.data.user.uid); that.$store.commit("SETUID", res.data.user.uid);
that.$store.commit('UPDATE_USERINFO', res.data.user); that.$store.commit('UPDATE_USERINFO', res.data.user);
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index"; const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) ||
that.$Cache.clear(BACK_URL); "/pages/index/index";
that.$Cache.clear('login_back_url_weixin'); that.$Cache.clear(BACK_URL);
let method that.$Cache.clear('login_back_url_weixin');
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart', let method
'/pages/goods_cate/goods_cate', let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/user/index' '/pages/goods_cate/goods_cate',
] '/pages/user/index'
if (indexPat.includes(this.getPath(backUrl))) { ]
method = 'switchTab' if (indexPat.includes(this.getPath(backUrl))) {
} else { method = 'switchTab'
method = 'navigateTo' } else {
} method = 'navigateTo'
uni[method]({ }
url: backUrl, uni[method]({
success:()=>{ url: backUrl,
this.auth_token = '' success: () => {
} this.auth_token = ''
}); }
}) });
.catch(res => { })
console.log('error', err); .catch(res => {
that.$util.Tips({ console.log('error', err);
title: res that.$util.Tips({
}); title: res
}); });
}, });
},
async code(data) { async code(data) {
let that = this; let that = this;
if (!that.account) return that.$util.Tips({ if (!that.account) return that.$util.Tips({
@ -1003,17 +1014,21 @@
if (!that.isAgree) return that.$util.Tips({ if (!that.isAgree) return that.$util.Tips({
title: '请勾选用户协议与隐私政策' title: '请勾选用户协议与隐私政策'
}); });
console.log(11)
loginH5({ loginH5({
auth_token: uni.getStorageSync('auth_token'), auth_token: uni.getStorageSync('auth_token'),
account: that.account, account: that.account,
password: that.password, password: that.password,
spread: that.$Cache.get("spread") spread: that.$Cache.get("spread")
}) }).then(({
.then(({
data data
}) => { }) => {
console.log(data)
this.checkOpenId(data.user) this.checkOpenId(data.user)
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index"; const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) ||
"/pages/index/index";
that.$store.commit("LOGIN", { that.$store.commit("LOGIN", {
'token': data.token, 'token': data.token,
'time': data.exp 'time': data.exp
@ -1021,15 +1036,15 @@
that.$store.commit("SETUID", data.user.uid); that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user); that.$store.commit('UPDATE_USERINFO', data.user);
if(data.is_new_user && !that.$Cache.get('login_back_url_weixin')){ if (data.is_new_user && !that.$Cache.get('login_back_url_weixin')) {
return uni.navigateTo({ return uni.navigateTo({
url: '/pages/helpPeople/helpPeople' url: '/pages/helpPeople/helpPeople'
}) })
} }
that.$Cache.clear(BACK_URL); that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin'); that.$Cache.clear('login_back_url_weixin');
let method let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart', let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate', '/pages/goods_cate/goods_cate',
@ -1040,7 +1055,7 @@
} else { } else {
method = 'navigateTo' method = 'navigateTo'
} }
if (this.getPath(backUrl) === '/pages/users/login/index') { if (this.getPath(backUrl) === '/pages/users/login/index') {
uni.switchTab({ uni.switchTab({
url: '/pages/index/index' url: '/pages/index/index'
@ -1052,6 +1067,7 @@
}); });
}) })
.catch(e => { .catch(e => {
console.log(e)
that.$util.Tips({ that.$util.Tips({
title: e title: e
}); });
@ -1082,34 +1098,34 @@
checkOpenId(user) { checkOpenId(user) {
if (user.wechat_user_id === 0) { if (user.wechat_user_id === 0) {
let that = this let that = this
try{ try {
wx.getUserInfo({ wx.getUserInfo({
success: function(res) { success: function(res) {
const encryptedData = res.encryptedData const encryptedData = res.encryptedData
const iv = res.iv const iv = res.iv
wx.login({ wx.login({
success(res) { success(res) {
if (res.code) { if (res.code) {
bindMp({ bindMp({
code: res.code, code: res.code,
iv: iv, iv: iv,
encryptedData: encryptedData, encryptedData: encryptedData,
phone: that.account phone: that.account
}).then(res => { }).then(res => {
// console.log(res); // console.log(res);
}) })
} else { } else {
// console.log('' + res.errMsg) // console.log('' + res.errMsg)
} }
} }
}) })
}, },
fail(e) { fail(e) {
// console.log('' + res.errMsg) // console.log('' + res.errMsg)
} }
}) })
}catch(e){ } catch (e) {
console.log(e); console.log(e);
} }
} }
// #ifdef APP-PLUS // #ifdef APP-PLUS
@ -1119,11 +1135,11 @@
bindJG({ bindJG({
phone: this.account, phone: this.account,
jg_register_id: result.registerID jg_register_id: result.registerID
}).then(res=>{ }).then(res => {
console.log("绑定成功", res); console.log("绑定成功", res);
}).catch(err=>{ }).catch(err => {
console.log("绑定失败", err); console.log("绑定失败", err);
}) })
} }
}) })
// #endif // #endif
@ -1140,15 +1156,15 @@
/deep/uni-checkbox .uni-checkbox-input { /deep/uni-checkbox .uni-checkbox-input {
border-radius: 100%; border-radius: 100%;
} }
.ChangePassword{ .ChangePassword {
.title{ .title {
width: 580rpx; width: 580rpx;
margin: 180rpx auto 0 auto; margin: 180rpx auto 0 auto;
font-size: 46rpx; font-size: 46rpx;
color: #7f7f7f; color: #7f7f7f;
} }
} }
.ChangePassword .phone { .ChangePassword .phone {
font-size: 32rpx; font-size: 32rpx;
@ -1450,8 +1466,8 @@
.whiteBg { .whiteBg {
margin-top: 100rpx; margin-top: 100rpx;
transition: 300ms; transition: 300ms;
.list { .list {
border-radius: 16rpx; border-radius: 16rpx;
overflow: hidden; overflow: hidden;

View File

@ -539,6 +539,17 @@
}); });
// #endif // #endif
}, },
//
onPullDownRefresh() {
this.loadend = false;
this.loading = false;
this.page = 1;
this.$set(this, 'orderList', []);
this.getOrderList();
this.getOrderData();
},
methods: { methods: {
// //
handleCopy() { handleCopy() {
@ -826,7 +837,8 @@
that.loadend = loadend; that.loadend = loadend;
that.loading = false; that.loading = false;
that.loadTitle = loadend ? "我也是有底线的" : '加载更多'; that.loadTitle = loadend ? "我也是有底线的" : '加载更多';
that.page = that.page + 1 that.page = that.page + 1;
uni.stopPullDownRefresh();
}) })
} else { } else {
getOrderList({ getOrderList({
@ -846,6 +858,7 @@
that.loadTitle = loadend ? "我也是有底线的" : '加载更多'; that.loadTitle = loadend ? "我也是有底线的" : '加载更多';
that.page = that.page + 1; that.page = that.page + 1;
that.isReady = true; that.isReady = true;
uni.stopPullDownRefresh();
}).catch(err => { }).catch(err => {
that.loading = false; that.loading = false;
that.loadTitle = "加载更多"; that.loadTitle = "加载更多";