From 4e0e928850c1d23a213033686182c792c59f8b15 Mon Sep 17 00:00:00 2001 From: Gao xiaosong <704041637@qq.com> Date: Mon, 7 Sep 2020 00:24:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A6=96=E9=A1=B5=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/live.js | 17 ++ components/ShoproLiveCard.vue | 306 +++++++++++++++++++++++++++++++++ manifest.json | 218 ++++++++++++----------- pages.json | 8 +- pages/home/components/Live.vue | 255 +++++++++++++++++++++++++++ pages/home/index.vue | 13 +- 6 files changed, 705 insertions(+), 112 deletions(-) create mode 100644 api/live.js create mode 100644 components/ShoproLiveCard.vue create mode 100644 pages/home/components/Live.vue diff --git a/api/live.js b/api/live.js new file mode 100644 index 0000000..33c0d81 --- /dev/null +++ b/api/live.js @@ -0,0 +1,17 @@ + + +import request from "@/utils/request"; + +/** + * 查询所有直播间 + */ +export function yxWechatLive(data) { + return request.get("/yxWechatLive", data, { login: true }); +} + +/** + * 获取直播回放 + */ +export function getLiveReplay(id, data) { + return request.get("/yxWechatLive/getLiveReplay/" + id, data, { login: false }); +} diff --git a/components/ShoproLiveCard.vue b/components/ShoproLiveCard.vue new file mode 100644 index 0000000..25b5b1d --- /dev/null +++ b/components/ShoproLiveCard.vue @@ -0,0 +1,306 @@ + + + + + diff --git a/manifest.json b/manifest.json index 6724313..f286e6e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,32 +1,32 @@ { - "name" : "yshopmall", - "appid" : "__UNI__C7A519E", - "description" : "", - "versionName" : "1.0.0", - "versionCode" : 1, - "transformPx" : false, + "name": "yshopmall", + "appid": "__UNI__C7A519E", + "description": "", + "versionName": "1.0.0", + "versionCode": 1, + "transformPx": false, /* 5+App特有相关 */ - "app-plus" : { - "usingComponents" : true, - "nvueCompiler" : "uni-app", - "compilerVersion" : 3, - "splashscreen" : { - "alwaysShowBeforeRender" : true, - "waiting" : false, - "autoclose" : true, - "delay" : 0 + "app-plus": { + "usingComponents": true, + "nvueCompiler": "uni-app", + "compilerVersion": 3, + "splashscreen": { + "alwaysShowBeforeRender": true, + "waiting": false, + "autoclose": true, + "delay": 0 }, /* 模块配置 */ - "modules" : { - "OAuth" : {}, - "Payment" : {}, - "Share" : {} + "modules": { + "OAuth": {}, + "Payment": {}, + "Share": {} }, /* 应用发布信息 */ - "distribute" : { + "distribute": { /* android打包配置 */ - "android" : { - "permissions" : [ + "android": { + "permissions": [ "", "", "", @@ -52,119 +52,127 @@ ] }, /* ios打包配置 */ - "ios" : {}, + "ios": {}, /* SDK配置 */ - "sdkConfigs" : { - "oauth" : { - "weixin" : { - "appid" : "wx7c84ede33062d1e4", - "appsecret" : "c47ef66d3311194da44e60387d5c1abd", - "UniversalLinks" : "https://yixiang.co/app/" + "sdkConfigs": { + "oauth": { + "weixin": { + "appid": "wx7c84ede33062d1e4", + "appsecret": "c47ef66d3311194da44e60387d5c1abd", + "UniversalLinks": "https://yixiang.co/app/" } }, - "payment" : { - "weixin" : { - "appid" : "wx7c84ede33062d1e4", - "UniversalLinks" : "https://yixiang.co/app/" + "payment": { + "weixin": { + "appid": "wx7c84ede33062d1e4", + "UniversalLinks": "https://yixiang.co/app/" } }, - "share" : { - "weixin" : { - "appid" : "wx7c84ede33062d1e4", - "UniversalLinks" : "https://yixiang.co/app/" + "share": { + "weixin": { + "appid": "wx7c84ede33062d1e4", + "UniversalLinks": "https://yixiang.co/app/" } }, - "ad" : {} + "ad": {} }, - "splashscreen" : { - "ios" : { - "iphone" : { - "portrait-896h@3x" : "unpackage/res/splash/1242+2688.png", - "portrait-896h@2x" : "unpackage/res/splash/828+1792.png", - "iphonex" : "unpackage/res/splash/1125+2436.png", - "retina55" : "unpackage/res/splash/1142+2208.png", - "retina47" : "unpackage/res/splash/750+1334.png", - "retina40" : "unpackage/res/splash/640+1136.png", - "retina35" : "unpackage/res/splash/640+960.png" + "splashscreen": { + "ios": { + "iphone": { + "portrait-896h@3x": "unpackage/res/splash/1242+2688.png", + "portrait-896h@2x": "unpackage/res/splash/828+1792.png", + "iphonex": "unpackage/res/splash/1125+2436.png", + "retina55": "unpackage/res/splash/1142+2208.png", + "retina47": "unpackage/res/splash/750+1334.png", + "retina40": "unpackage/res/splash/640+1136.png", + "retina35": "unpackage/res/splash/640+960.png" } }, - "android" : { - "hdpi" : "unpackage/res/splash/480+762.png", - "xhdpi" : "unpackage/res/splash/720+1242.png", - "xxhdpi" : "unpackage/res/splash/1080+1882.png" + "android": { + "hdpi": "unpackage/res/splash/480+762.png", + "xhdpi": "unpackage/res/splash/720+1242.png", + "xxhdpi": "unpackage/res/splash/1080+1882.png" } }, - "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" + "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" + "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" + "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" : {}, - "mp-weixin" : { - "appid" : "wx604d2ea4702620d2", - "setting" : { - "urlCheck" : false + "quickapp": {}, + "mp-weixin": { + "appid": "wx604d2ea4702620d2", + "setting": { + "urlCheck": false }, - "usingComponents" : true, - "permission" : { - "scope.userLocation" : { - "desc" : "你的位置信息将用于小程序位置接口的效果展示" + "usingComponents": true, + "permission": { + "scope.userLocation": { + "desc": "你的位置信息将用于小程序位置接口的效果展示" + } + }, + "plugins": { + "live-player-plugin": { + // 注意填写该直播组件最新版本号,微信开发者工具调试时可获取最新版本号(复制时请去掉注释) + "version": "1.0.15", + // 必须填该直播组件appid,该示例值即为直播组件appid(复制时请去掉注释) + "provider": "wx2b03c6e691cd7370" } } }, - "mp-alipay" : { - "usingComponents" : true + "mp-alipay": { + "usingComponents": true }, - "mp-baidu" : { - "usingComponents" : true + "mp-baidu": { + "usingComponents": true }, - "mp-toutiao" : { - "usingComponents" : true + "mp-toutiao": { + "usingComponents": true }, - "h5" : { - "title" : "yshop", - "devServer" : { - "disableHostCheck" : true + "h5": { + "title": "yshop", + "devServer": { + "disableHostCheck": true }, - "router" : { - "mode" : "history" + "router": { + "mode": "history" }, - "sdkConfigs" : { - "maps" : { - "qqmap" : { - "key" : "" + "sdkConfigs": { + "maps": { + "qqmap": { + "key": "" } } }, - "domain" : "h5.yixiang.co" + "domain": "h5.yixiang.co" } } diff --git a/pages.json b/pages.json index 4743ed6..ceea9ff 100644 --- a/pages.json +++ b/pages.json @@ -40,9 +40,9 @@ "path": "pages/home/index", "style": { "navigationBarTitleText": "yshop商城", - "navigationBarTextStyle": "white", - // "enablePullDownRefresh": true, - "navigationStyle": "custom" + "navigationBarTextStyle": "white", + // "enablePullDownRefresh": true, + "navigationStyle": "custom" } }, { @@ -411,7 +411,7 @@ "navigationBarTitleText": "Yshop", "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8", - "navigationStyle": "default" + "navigationStyle": "default" }, "tabBar": { "color": "#282828", diff --git a/pages/home/components/Live.vue b/pages/home/components/Live.vue new file mode 100644 index 0000000..44f354f --- /dev/null +++ b/pages/home/components/Live.vue @@ -0,0 +1,255 @@ + + + + + diff --git a/pages/home/index.vue b/pages/home/index.vue index 3fd373c..46e5836 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -55,7 +55,9 @@ - + + + @@ -82,6 +84,7 @@ import HotCommodity from './components/HotCommodity'; import FirstNewProduct from './components/FirstNewProduct'; import ProductsRecommended from './components/ProductsRecommended'; + import Live from './components/Live'; import { getHomeData, @@ -109,7 +112,8 @@ Groupon, HotCommodity, FirstNewProduct, - ProductsRecommended + ProductsRecommended, + Live }, props: {}, data: function () { @@ -141,6 +145,7 @@ bastList: [] }, likeInfo: [], + live: [], lovely: [], benefit: [], couponList: [], @@ -230,6 +235,7 @@ that.$set(that, 'firstList', res.data.firstList); that.$set(that, 'bastList', res.data.bastList); that.$set(that, 'likeInfo', res.data.likeInfo); + that.$set(that, 'live', res.data.live); that.$set(that, 'lovely', res.data.lovely); that.$set(that, 'benefit', res.data.benefit); that.$set(that, 'couponList', res.data.couponList); @@ -531,7 +537,8 @@ font-size: 15px; } } - .home_content_box{ + + .home_content_box { margin-top: -10rpx; }