guhongwei hace 2 años
padre
commit
611a6250c2

+ 16 - 5
common/config.js

@@ -1,7 +1,18 @@
 export default {
-  // 接口地址
-  serverUrl: "https://broadcast.waityou24.cn",
-  wechatUrl: "https://broadcast.waityou24.cn", 
-  // 设备信息
-  system: uni.getSystemInfoSync(),
+	// 接口地址
+	serverUrl: "https://broadcast.waityou24.cn",
+	wechatUrl: "https://broadcast.waityou24.cn",
+	// 设备信息
+	system: uni.getSystemInfoSync(),
+	// 节目类型
+	pro_type: [ //
+		{
+			dict_label: '电视节目',
+			dict_value: '0',
+		},
+		{
+			dict_label: '电影节目',
+			dict_value: '1',
+		},
+	]
 };

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "益智游戏",
     "appid" : "__UNI__2080341",
     "description" : "",
-    "versionName" : "1.0.5",
-    "versionCode" : 105,
+    "versionName" : "1.0.7",
+    "versionCode" : 107,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 15 - 3
pagesHome/home/index.vue

@@ -12,6 +12,10 @@
 							<text>{{ item.name }}</text>
 						</view>
 						<view class="other">
+							<view class="other_1">
+								<text>节目类型:</text>
+								<text>{{ getDict(item.type,'typeList') }}</text>
+							</view>
 							<view class="other_1">
 								<text>视频流:</text>
 								<text>{{ item.path||'暂无视频流' }}</text>
@@ -45,7 +49,9 @@
 				limit: 10,
 				// 数据是否触底
 				is_bottom: false,
-				scrollTop: 0
+				scrollTop: 0,
+				// 节目类型
+				typeList: this.$config.pro_type
 			};
 		},
 		onLoad() {
@@ -66,7 +72,7 @@
 					limit: that.limit,
 					is_use: "0"
 				};
-				let res = await that.$api("test", "GET", {
+				let res = await that.$api("program", "GET", {
 					...info,
 					...that.searchInfo
 				});
@@ -118,7 +124,7 @@
 			toPlay(e) {
 				if (e.path) {
 					uni.navigateTo({
-						url: `/pagesHome/home/video?path=${e.path}&&name=${e.name}`,
+						url: `/pagesHome/home/video?id=${e._id}`,
 					});
 				} else {
 					uni.showToast({
@@ -127,6 +133,12 @@
 					});
 				}
 			},
+			getDict(value, model) {
+				const that = this;
+				let data = that[model].find(i => i.dict_value == value);
+				if (data) return data.dict_label
+				else return '暂无'
+			},
 			// 清空列表
 			clearPage() {
 				const that = this;

+ 11 - 10
pagesHome/home/video.vue

@@ -10,25 +10,26 @@
 	export default {
 		data() {
 			return {
+				id: '',
 				info: {},
 			};
 		},
 		onLoad(e) {
 			const that = this;
-			let info = {
-				path: e.path || '',
-				name: e.name || ''
-			}
-			that.$set(that, `info`, info);
+			that.$set(that, `id`, e.id || '63c89e92d4f6e2a2ec22d5c8');
 			that.search()
 		},
 		methods: {
-			search() {
+			async search() {
 				const that = this;
-				if (that.info && that.info.name) {
-					uni.setNavigationBarTitle({
-						title: that.info.name
-					});
+				if (that.id) {
+					let res = await that.$api(`program/${that.id}`, 'GET', {});
+					if (res.errcode == '0') {
+						that.$set(that, `info`, res.data);
+						uni.setNavigationBarTitle({
+							title: res.data.name
+						});
+					}
 				}
 			}
 		}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2 - 2
unpackage/dist/build/app-plus/app-service.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1
unpackage/dist/build/app-plus/app-view.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1
unpackage/dist/build/app-plus/manifest.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 31 - 8
unpackage/dist/dev/app-plus/app-service.js


+ 23 - 7
unpackage/dist/dev/app-plus/app-view.js

@@ -1789,7 +1789,7 @@ var render = function () {
                             },
                             [
                               _c("v-uni-text", { attrs: { _i: "12-" + $30 } }, [
-                                _vm._v("视频流:"),
+                                _vm._v("节目类型:"),
                               ]),
                               _c("v-uni-text", { attrs: { _i: "13-" + $30 } }, [
                                 _vm._v(_vm._$g("13-" + $30, "t0-0")),
@@ -1797,14 +1797,30 @@ var render = function () {
                             ],
                             1
                           ),
+                          _c(
+                            "uni-view",
+                            {
+                              staticClass: _vm._$g("14-" + $30, "sc"),
+                              attrs: { _i: "14-" + $30 },
+                            },
+                            [
+                              _c("v-uni-text", { attrs: { _i: "15-" + $30 } }, [
+                                _vm._v("视频流:"),
+                              ]),
+                              _c("v-uni-text", { attrs: { _i: "16-" + $30 } }, [
+                                _vm._v(_vm._$g("16-" + $30, "t0-0")),
+                              ]),
+                            ],
+                            1
+                          ),
                         ],
                         1
                       ),
                       _c(
                         "uni-view",
                         {
-                          staticClass: _vm._$g("14-" + $30, "sc"),
-                          attrs: { _i: "14-" + $30 },
+                          staticClass: _vm._$g("17-" + $30, "sc"),
+                          attrs: { _i: "17-" + $30 },
                         },
                         [
                           _c(
@@ -1813,7 +1829,7 @@ var render = function () {
                               attrs: {
                                 type: "primary",
                                 size: "mini",
-                                _i: "15-" + $30,
+                                _i: "18-" + $30,
                               },
                               on: {
                                 click: function ($event) {
@@ -1838,12 +1854,12 @@ var render = function () {
         ],
         1
       ),
-      _vm._$g(16, "i")
+      _vm._$g(19, "i")
         ? _c(
             "uni-view",
-            { staticClass: _vm._$g(16, "sc"), attrs: { _i: 16 } },
+            { staticClass: _vm._$g(19, "sc"), attrs: { _i: 19 } },
             [
-              _c("v-uni-text", { attrs: { _i: 17 } }, [
+              _c("v-uni-text", { attrs: { _i: 20 } }, [
                 _vm._v("到底了,嘻嘻!"),
               ]),
             ],

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1
unpackage/dist/dev/app-plus/manifest.json