Browse Source

获取剧场名称

zqwang 2 years ago
parent
commit
2663cccff2
2 changed files with 15 additions and 1 deletions
  1. 4 0
      common/apis/common.js
  2. 11 1
      pages/index/index.vue

+ 4 - 0
common/apis/common.js

@@ -4,3 +4,7 @@ import http from "../http.js";
 export const getKefu = () => {
 	return http.get('/api/wxapp/getkefu');
 } 
+
+export const getConfigInfo = () => {
+	return http.get('/api/wxapp/config');
+} 

+ 11 - 1
pages/index/index.vue

@@ -96,6 +96,7 @@
 	import {
 		getMiniprogramHall
 	} from '@/common/apis/index.js'
+	import {getConfigInfo} from "@/common/apis/common.js";
 	import cellGroup from '../../uni_modules/uview-ui/libs/config/props/cellGroup';
 	export default {
 		data() {
@@ -143,11 +144,20 @@
 				}
 			}
 		},
-		onLoad(e) {},
+		onLoad(e) {
+			this.settitle();
+			
+		},
 		onShow() {
 			this.getList();
 		},
 		methods: {
+			async settitle(){
+				let config = await getConfigInfo();
+				uni.setNavigationBarTitle({
+					title: config.play_name
+				});
+			},
 			changeIndex(index) {
 				if (this.typetab[index].id) {
 					this.type = this.typetab[index].id