From f80615211619cfbe628707dfb6b912bde27062c5 Mon Sep 17 00:00:00 2001
From: kele <1184860403@qq.com>
Date: Sat, 18 Mar 2023 18:53:12 +0800
Subject: [PATCH 1/8] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E9=97=B4=E8=B7=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sheep/components/s-live-card/s-live-card.vue | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/sheep/components/s-live-card/s-live-card.vue b/sheep/components/s-live-card/s-live-card.vue
index 7f7a760f..caf9c7dc 100644
--- a/sheep/components/s-live-card/s-live-card.vue
+++ b/sheep/components/s-live-card/s-live-card.vue
@@ -11,7 +11,7 @@
{{ data.name }}
-
+
主播:{{ data.anchor_name }}
@@ -27,7 +27,7 @@
{{ data.name }}
-
+
主播:{{ data.anchor_name }}
@@ -153,8 +153,11 @@
}
.md-goods-content {
position: absolute;
- left: 20rpx;
- bottom: 20rpx;
+ left: 0;
+ bottom: 0;
+ padding: 20rpx;
+ width: 100%;
+ background: linear-gradient(360deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.02) 100%);
}
.md-img-box {
@@ -202,8 +205,11 @@
}
.sl-goods-content {
position: absolute;
- left: 20rpx;
- bottom: 20rpx;
+ left: 0;
+ bottom: 0;
+ padding: 20rpx;
+ width: 100%;
+ background: linear-gradient(360deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.02) 100%);
}
.sl-img-box {
From 8aa295b02d784a3ec3dae6896697d99de3f44877 Mon Sep 17 00:00:00 2001
From: kele <1184860403@qq.com>
Date: Mon, 20 Mar 2023 14:35:31 +0800
Subject: [PATCH 2/8] =?UTF-8?q?fix:=E4=BC=98=E5=8C=96=E5=8A=A8=E6=80=81?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9B=B4=E6=92=AD=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
env | 5 +-
manifest.json | 459 ++++++++++++++-------------
modifyManifest.js | 28 --
sheep/libs/mpLive-manifest-plugin.js | 32 ++
vite.config.js | 19 +-
5 files changed, 275 insertions(+), 268 deletions(-)
delete mode 100644 modifyManifest.js
create mode 100644 sheep/libs/mpLive-manifest-plugin.js
diff --git a/env b/env
index f5c81bbc..30465447 100644
--- a/env
+++ b/env
@@ -13,4 +13,7 @@ SHOPRO_API_PATH = /shop/api/
# 客户端静态资源地址 空=默认使用服务端指定的CDN资源地址前缀 | local=本地 | http(s)://xxx.xxx=自定义静态资源地址前缀
SHOPRO_STATIC_URL = https://file.sheepjs.com
-SHOPRO_VERSION = v1.1.15
\ No newline at end of file
+SHOPRO_VERSION = v1.8.1
+
+# 是否开启直播 1 开启直播 | 0 关闭直播
+SHOPRO_MPLIVE_ON = 0
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index fbbd02f5..66dec9bf 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,230 +1,245 @@
{
- "name" : "星品购",
- "appid" : "__UNI__082C0BA",
- "description" : "应用描述",
- "versionName" : "1.0.7",
- "versionCode" : 107,
- "transformPx" : false,
- "app-plus" : {
- "usingComponents" : true,
- "nvueCompiler" : "uni-app",
- "nvueStyleCompiler" : "uni-app",
- "compilerVersion" : 3,
- "nvueLaunchMode" : "fast",
- "splashscreen" : {
- "alwaysShowBeforeRender" : true,
- "waiting" : true,
- "autoclose" : true,
- "delay" : 0
+ "name": "星品购",
+ "appid": "__UNI__082C0BA",
+ "description": "应用描述",
+ "versionName": "1.0.7",
+ "versionCode": 107,
+ "transformPx": false,
+ "app-plus": {
+ "usingComponents": true,
+ "nvueCompiler": "uni-app",
+ "nvueStyleCompiler": "uni-app",
+ "compilerVersion": 3,
+ "nvueLaunchMode": "fast",
+ "splashscreen": {
+ "alwaysShowBeforeRender": true,
+ "waiting": true,
+ "autoclose": true,
+ "delay": 0
+ },
+ "safearea": {
+ "bottom": {
+ "offset": "none"
+ }
+ },
+ "modules": {
+ "Payment": {},
+ "Share": {},
+ "VideoPlayer": {},
+ "OAuth": {}
+ },
+ "distribute": {
+ "android": {
+ "permissions": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "minSdkVersion": 21,
+ "schemes": "shopro"
+ },
+ "ios": {
+ "urlschemewhitelist": [
+ "baidumap",
+ "iosamap"
+ ],
+ "dSYMs": false,
+ "privacyDescription": {
+ "NSPhotoLibraryUsageDescription": "需要同意访问您的相册选取图片才能完善该条目",
+ "NSPhotoLibraryAddUsageDescription": "需要同意访问您的相册才能保存该图片",
+ "NSCameraUsageDescription": "需要同意访问您的摄像头拍摄照片才能完善该条目",
+ "NSUserTrackingUsageDescription": "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验"
},
- "safearea" : {
- "bottom" : {
- "offset" : "none"
- }
+ "urltypes": "shopro",
+ "capabilities": {
+ "entitlements": {
+ "com.apple.developer.associated-domains": [
+ "applinks:shopro.sheepjs.com"
+ ]
+ }
},
- "modules" : {
- "Payment" : {},
- "Share" : {},
- "VideoPlayer" : {},
- "OAuth" : {}
+ "idfa": true
+ },
+ "sdkConfigs": {
+ "speech": {
+ "ifly": {}
},
- "distribute" : {
- "android" : {
- "permissions" : [
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- ""
- ],
- "minSdkVersion" : 21,
- "schemes" : "shopro"
- },
- "ios" : {
- "urlschemewhitelist" : [ "baidumap", "iosamap" ],
- "dSYMs" : false,
- "privacyDescription" : {
- "NSPhotoLibraryUsageDescription" : "需要同意访问您的相册选取图片才能完善该条目",
- "NSPhotoLibraryAddUsageDescription" : "需要同意访问您的相册才能保存该图片",
- "NSCameraUsageDescription" : "需要同意访问您的摄像头拍摄照片才能完善该条目",
- "NSUserTrackingUsageDescription" : "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验"
- },
- "urltypes" : "shopro",
- "capabilities" : {
- "entitlements" : {
- "com.apple.developer.associated-domains" : [ "applinks:shopro.sheepjs.com" ]
- }
- },
- "idfa" : true
- },
- "sdkConfigs" : {
- "speech" : {
- "ifly" : {}
- },
- "ad" : {},
- "oauth" : {
- "apple" : {},
- "weixin" : {
- "appid" : "wxae7a0c156da9383b",
- "UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
- }
- },
- "payment" : {
- "weixin" : {
- "__platform__" : [ "ios", "android" ],
- "appid" : "wxae7a0c156da9383b",
- "UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
- },
- "alipay" : {
- "__platform__" : [ "ios", "android" ]
- }
- },
- "share" : {
- "weixin" : {
- "appid" : "wxae7a0c156da9383b",
- "UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
- }
- }
- },
- "orientation" : [ "portrait-primary" ],
- "splashscreen" : {
- "androidStyle" : "common",
- "iosStyle" : "common",
- "useOriginalMsgbox" : true
- },
- "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"
- }
- }
- }
+ "ad": {},
+ "oauth": {
+ "apple": {},
+ "weixin": {
+ "appid": "wxae7a0c156da9383b",
+ "UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
+ }
+ },
+ "payment": {
+ "weixin": {
+ "__platform__": [
+ "ios",
+ "android"
+ ],
+ "appid": "wxae7a0c156da9383b",
+ "UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
+ },
+ "alipay": {
+ "__platform__": [
+ "ios",
+ "android"
+ ]
+ }
+ },
+ "share": {
+ "weixin": {
+ "appid": "wxae7a0c156da9383b",
+ "UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
+ }
}
- },
- "quickapp" : {},
- "quickapp-native" : {
- "icon" : "/static/logo.png",
- "package" : "com.example.demo",
- "features" : [
- {
- "name" : "system.clipboard"
- }
- ]
- },
- "quickapp-webview" : {
- "icon" : "/static/logo.png",
- "package" : "com.example.demo",
- "minPlatformVersion" : 1070,
- "versionName" : "1.0.0",
- "versionCode" : 100
- },
- "mp-weixin" : {
- "appid" : "wx43051b2afa4ed3d0",
- "setting" : {
- "urlCheck" : false,
- "minified" : true,
- "postcss" : true
+ },
+ "orientation": [
+ "portrait-primary"
+ ],
+ "splashscreen": {
+ "androidStyle": "common",
+ "iosStyle": "common",
+ "useOriginalMsgbox": true
+ },
+ "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"
},
- "optimization" : {
- "subPackages" : true
- },
- "plugins" : {
- "live-player-plugin" : {
- "version" : "1.3.5",
- "provider" : "wx2b03c6e691cd7370"
- }
- },
- "lazyCodeLoading" : "requiredComponents",
- "usingComponents" : {},
- "permission" : {},
- "requiredPrivateInfos" : [ "chooseAddress" ]
- },
- "mp-alipay" : {
- "usingComponents" : true
- },
- "mp-baidu" : {
- "usingComponents" : true
- },
- "mp-toutiao" : {
- "usingComponents" : true
- },
- "mp-jd" : {
- "usingComponents" : true
- },
- "h5" : {
- "template" : "index.html",
- "router" : {
- "mode" : "hash",
- "base" : "./"
- },
- "sdkConfigs" : {
- "maps" : {}
- },
- "async" : {
- "timeout" : 20000
- },
- "title" : "星品购",
- "optimization" : {
- "treeShaking" : {
- "enable" : true
- }
+ "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"
+ }
}
+ }
+ }
+ },
+ "quickapp": {},
+ "quickapp-native": {
+ "icon": "/static/logo.png",
+ "package": "com.example.demo",
+ "features": [
+ {
+ "name": "system.clipboard"
+ }
+ ]
+ },
+ "quickapp-webview": {
+ "icon": "/static/logo.png",
+ "package": "com.example.demo",
+ "minPlatformVersion": 1070,
+ "versionName": "1.0.0",
+ "versionCode": 100
+ },
+ "mp-weixin": {
+ "appid": "wx43051b2afa4ed3d0",
+ "setting": {
+ "urlCheck": false,
+ "minified": true,
+ "postcss": true
},
- "vueVersion" : "3",
- "_spaceID" : "192b4892-5452-4e1d-9f09-eee1ece40639",
- "locale" : "zh-Hans",
- "fallbackLocale" : "zh-Hans"
-}
+ "optimization": {
+ "subPackages": true
+ },
+ "plugins": {
+ "live-player-plugin": {
+ "version": "1.3.5",
+ "provider": "wx2b03c6e691cd7370"
+ }
+ },
+ "lazyCodeLoading": "requiredComponents",
+ "usingComponents": {},
+ "permission": {},
+ "requiredPrivateInfos": [
+ "chooseAddress"
+ ]
+ },
+ "mp-alipay": {
+ "usingComponents": true
+ },
+ "mp-baidu": {
+ "usingComponents": true
+ },
+ "mp-toutiao": {
+ "usingComponents": true
+ },
+ "mp-jd": {
+ "usingComponents": true
+ },
+ "h5": {
+ "template": "index.html",
+ "router": {
+ "mode": "hash",
+ "base": "./"
+ },
+ "sdkConfigs": {
+ "maps": {}
+ },
+ "async": {
+ "timeout": 20000
+ },
+ "title": "星品购",
+ "optimization": {
+ "treeShaking": {
+ "enable": true
+ }
+ }
+ },
+ "vueVersion": "3",
+ "_spaceID": "192b4892-5452-4e1d-9f09-eee1ece40639",
+ "locale": "zh-Hans",
+ "fallbackLocale": "zh-Hans"
+}
\ No newline at end of file
diff --git a/modifyManifest.js b/modifyManifest.js
deleted file mode 100644
index 554fe6d2..00000000
--- a/modifyManifest.js
+++ /dev/null
@@ -1,28 +0,0 @@
-const fs = require('fs');
-
-const manifestPath = process.env.UNI_INPUT_DIR + '/manifest.json';
-
-let Manifest = fs.readFileSync(manifestPath, { encoding: 'utf-8' });
-function replaceManifest(value, remove) {
-
-
- let data = JSON.parse(Manifest)
- let newValue = JSON.parse(value)
- if (remove === 'delete') {
- delete data['mp-weixin'].plugins['live-player-plugin'];
- } else {
- if (data['mp-weixin'].plugins['live-player-plugin']) return;
- data['mp-weixin'].plugins = {
- ...data['mp-weixin'].plugins,
- ...newValue
- }
-
- }
- Manifest = JSON.stringify(data)
-
- fs.writeFileSync(manifestPath, Manifest, {
- "flag": "w"
- })
-}
-
-export default replaceManifest
diff --git a/sheep/libs/mpLive-manifest-plugin.js b/sheep/libs/mpLive-manifest-plugin.js
new file mode 100644
index 00000000..d1df9bfb
--- /dev/null
+++ b/sheep/libs/mpLive-manifest-plugin.js
@@ -0,0 +1,32 @@
+const fs = require('fs');
+
+const manifestPath = process.env.UNI_INPUT_DIR + '/manifest.json';
+
+let Manifest = fs.readFileSync(manifestPath, {
+ encoding: 'utf-8'
+});
+
+function mpliveMainfestPlugin(isOpen) {
+ if (process.env.UNI_PLATFORM !== 'mp-weixin') return;
+
+ const manifestData = JSON.parse(Manifest)
+
+ if (isOpen === '0') {
+ delete manifestData['mp-weixin'].plugins['live-player-plugin'];
+ }
+
+ if (isOpen === '1') {
+ manifestData['mp-weixin'].plugins['live-player-plugin'] = {
+ "version": "1.3.5",
+ "provider": "wx2b03c6e691cd7370"
+ }
+ }
+
+ Manifest = JSON.stringify(manifestData, null, 2)
+
+ fs.writeFileSync(manifestPath, Manifest, {
+ "flag": "w"
+ })
+}
+
+export default mpliveMainfestPlugin
diff --git a/vite.config.js b/vite.config.js
index 1700f515..0331684f 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -3,28 +3,12 @@ import uni from '@dcloudio/vite-plugin-uni';
import path from 'path';
// import viteCompression from 'vite-plugin-compression';
import uniReadPagesV3Plugin from './sheep/router/utils/uni-read-pages-v3';
-// 引入直播组件
-import replaceManifest from './modifyManifest'
+import mpliveMainfestPlugin from './sheep/libs/mpLive-manifest-plugin';
// https://vitejs.dev/config/
export default (command, mode) => {
const env = loadEnv(mode, __dirname, 'SHOPRO_');
- if (env.SHOPRO_MPLIVE_ON === 'true') {
- replaceManifest(`{
- "live-player-plugin": {
- "version": "1.3.5",
- "provider": "wx2b03c6e691cd7370"
- }
- }`, 'push')
- } else {
- replaceManifest(`{
- "live-player-plugin": {
- "version": "1.3.5",
- "provider": "wx2b03c6e691cd7370"
- }
- }`, 'delete')
- }
return {
envPrefix: "SHOPRO_",
plugins: [
@@ -36,6 +20,7 @@ export default (command, mode) => {
pagesJsonDir: path.resolve(__dirname, './pages.json'),
includes: ['path', 'aliasPath', 'name', 'meta'],
}),
+ mpliveMainfestPlugin(env.SHOPRO_MPLIVE_ON)
],
server: {
host: true,
From e6dfc3979a5503c5caac4256ec44b276e38ab7d9 Mon Sep 17 00:00:00 2001
From: kele <1184860403@qq.com>
Date: Mon, 20 Mar 2023 18:37:10 +0800
Subject: [PATCH 3/8] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/pay/index.vue | 5 -----
1 file changed, 5 deletions(-)
diff --git a/pages/pay/index.vue b/pages/pay/index.vue
index 38619fb8..8b11d90e 100644
--- a/pages/pay/index.vue
+++ b/pages/pay/index.vue
@@ -3,7 +3,6 @@
-
-
+
+