|
@@ -1,16 +1,31 @@
|
|
|
-import { getClientTypeList } from "@/api/device/version";
|
|
|
+import {
|
|
|
+ getClientTypeList
|
|
|
+} from "@/api/device/version";
|
|
|
|
|
|
-import { audioType, platform } from "@/api/music/platform";
|
|
|
+import {
|
|
|
+ audioType,
|
|
|
+ platform
|
|
|
+} from "@/api/music/platform";
|
|
|
|
|
|
-import { options } from "@/api/music/radio";
|
|
|
+import {
|
|
|
+ options
|
|
|
+} from "@/api/music/radio";
|
|
|
|
|
|
-import { list as categoryList } from "@/api/device/category";
|
|
|
+import {
|
|
|
+ list as categoryList
|
|
|
+} from "@/api/device/category";
|
|
|
|
|
|
-import { list as functionList } from "@/api/device/function";
|
|
|
+import {
|
|
|
+ list as functionList
|
|
|
+} from "@/api/device/function";
|
|
|
|
|
|
-import { options as blogClass } from "@/api/music/blogclass";
|
|
|
+import {
|
|
|
+ options as blogClass
|
|
|
+} from "@/api/music/blogclass";
|
|
|
|
|
|
-import { options as mapList } from "@/api/operation/map";
|
|
|
+import {
|
|
|
+ options as mapList
|
|
|
+} from "@/api/operation/map";
|
|
|
|
|
|
// 设备列表
|
|
|
const devMixin = {
|
|
@@ -22,6 +37,7 @@ const devMixin = {
|
|
|
methods: {
|
|
|
getDevList(e) {
|
|
|
getClientTypeList(e ? e : {}).then((res) => {
|
|
|
+ // console.log("获取设备列表==" + JSON.stringify(res));
|
|
|
if (res.code === 0) {
|
|
|
res.data.map((i) => {
|
|
|
this.devOptions.push({
|
|
@@ -39,8 +55,7 @@ const devMixin = {
|
|
|
const devModeMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- devModeOptions: [
|
|
|
- {
|
|
|
+ devModeOptions: [{
|
|
|
value: 1,
|
|
|
label: "蓝牙",
|
|
|
disabled: false,
|
|
@@ -74,7 +89,9 @@ const devCategoryMixin = {
|
|
|
},
|
|
|
methods: {
|
|
|
getCateGory(status) {
|
|
|
- categoryList({ status: status }).then((res) => {
|
|
|
+ categoryList({
|
|
|
+ status: status
|
|
|
+ }).then((res) => {
|
|
|
res.data.map((i) => {
|
|
|
this.categoryOptions.push({
|
|
|
value: i.id,
|
|
@@ -90,8 +107,7 @@ const devCategoryMixin = {
|
|
|
const devTypeMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- devTypeOptions: [
|
|
|
- {
|
|
|
+ devTypeOptions: [{
|
|
|
value: 0,
|
|
|
label: "音响",
|
|
|
},
|
|
@@ -133,8 +149,7 @@ const devFucMixin = {
|
|
|
const yesOrNoMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- yesOrNoOptions: [
|
|
|
- {
|
|
|
+ yesOrNoOptions: [{
|
|
|
value: 0,
|
|
|
label: "否",
|
|
|
},
|
|
@@ -151,8 +166,7 @@ const yesOrNoMixin = {
|
|
|
const serviceTimeMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- serviceTimeOptions: [
|
|
|
- {
|
|
|
+ serviceTimeOptions: [{
|
|
|
value: -1,
|
|
|
label: "1天",
|
|
|
},
|
|
@@ -205,8 +219,7 @@ const serviceTypeMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
// 服务类型
|
|
|
- serviceTypeOptions: [
|
|
|
- {
|
|
|
+ serviceTypeOptions: [{
|
|
|
value: 0,
|
|
|
label: "签到",
|
|
|
},
|
|
@@ -239,8 +252,7 @@ const serviceTypeMixin = {
|
|
|
const isFreeMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- freeOptions: [
|
|
|
- {
|
|
|
+ freeOptions: [{
|
|
|
value: 0,
|
|
|
label: "付费",
|
|
|
},
|
|
@@ -257,8 +269,7 @@ const isFreeMixin = {
|
|
|
const audioMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- audioOptions: [
|
|
|
- {
|
|
|
+ audioOptions: [{
|
|
|
value: 2,
|
|
|
label: "广播电台",
|
|
|
},
|
|
@@ -318,8 +329,7 @@ const audioMixin = {
|
|
|
const sexMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- sexOptions: [
|
|
|
- {
|
|
|
+ sexOptions: [{
|
|
|
value: 0,
|
|
|
label: "未知",
|
|
|
},
|
|
@@ -340,8 +350,7 @@ const sexMixin = {
|
|
|
const regionMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- regionOptions: [
|
|
|
- {
|
|
|
+ regionOptions: [{
|
|
|
value: 0,
|
|
|
label: "内地",
|
|
|
},
|
|
@@ -374,8 +383,7 @@ const regionMixin = {
|
|
|
const languageMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- languageOptions: [
|
|
|
- {
|
|
|
+ languageOptions: [{
|
|
|
value: 1,
|
|
|
label: "国语",
|
|
|
},
|
|
@@ -456,8 +464,7 @@ const platformMixin = {
|
|
|
const onOrOffMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- onOrOffOptions: [
|
|
|
- {
|
|
|
+ onOrOffOptions: [{
|
|
|
value: 1,
|
|
|
label: "上架",
|
|
|
},
|
|
@@ -474,8 +481,7 @@ const onOrOffMixin = {
|
|
|
const disabledMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- disabledOptions: [
|
|
|
- {
|
|
|
+ disabledOptions: [{
|
|
|
value: 0,
|
|
|
label: "上架",
|
|
|
},
|
|
@@ -492,8 +498,7 @@ const disabledMixin = {
|
|
|
const payTypeMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- payTypeOptions: [
|
|
|
- {
|
|
|
+ payTypeOptions: [{
|
|
|
value: 1,
|
|
|
label: "免费",
|
|
|
},
|
|
@@ -522,8 +527,7 @@ const payTypeMixin = {
|
|
|
const albumTypeMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- albumTypeOptions: [
|
|
|
- {
|
|
|
+ albumTypeOptions: [{
|
|
|
value: 1,
|
|
|
label: "Single",
|
|
|
},
|
|
@@ -560,7 +564,9 @@ const addressMixin = {
|
|
|
},
|
|
|
methods: {
|
|
|
getAddress() {
|
|
|
- options({ type: 2 }).then((res) => {
|
|
|
+ options({
|
|
|
+ type: 2
|
|
|
+ }).then((res) => {
|
|
|
if (res.code === 0) {
|
|
|
res.data.map((i) => {
|
|
|
this.addressOptions.push({
|
|
@@ -622,8 +628,7 @@ const blogClassMixin = {
|
|
|
const currentMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- currentOptions: [
|
|
|
- {
|
|
|
+ currentOptions: [{
|
|
|
value: 0,
|
|
|
label: "已生效",
|
|
|
},
|
|
@@ -644,8 +649,7 @@ const currentMixin = {
|
|
|
const coverMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- coverOptions: [
|
|
|
- {
|
|
|
+ coverOptions: [{
|
|
|
value: 0,
|
|
|
label: "自定义封面",
|
|
|
},
|
|
@@ -663,14 +667,11 @@ const channelMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
channelOptions: {
|
|
|
- 2: [
|
|
|
- {
|
|
|
- value: 2,
|
|
|
- label: "广播电台",
|
|
|
- },
|
|
|
- ],
|
|
|
- 6: [
|
|
|
- {
|
|
|
+ 2: [{
|
|
|
+ value: 2,
|
|
|
+ label: "广播电台",
|
|
|
+ }, ],
|
|
|
+ 6: [{
|
|
|
value: 6,
|
|
|
label: "节目",
|
|
|
},
|
|
@@ -679,8 +680,7 @@ const channelMixin = {
|
|
|
label: "歌曲",
|
|
|
},
|
|
|
],
|
|
|
- 8: [
|
|
|
- {
|
|
|
+ 8: [{
|
|
|
value: 8,
|
|
|
label: "播客专辑",
|
|
|
},
|
|
@@ -693,18 +693,14 @@ const channelMixin = {
|
|
|
label: "音乐专辑",
|
|
|
},
|
|
|
],
|
|
|
- 16: [
|
|
|
- {
|
|
|
- value: 8,
|
|
|
- label: "播客专辑",
|
|
|
- },
|
|
|
- ],
|
|
|
- 17: [
|
|
|
- {
|
|
|
- value: 2,
|
|
|
- label: "广播电台",
|
|
|
- },
|
|
|
- ],
|
|
|
+ 16: [{
|
|
|
+ value: 8,
|
|
|
+ label: "播客专辑",
|
|
|
+ }, ],
|
|
|
+ 17: [{
|
|
|
+ value: 2,
|
|
|
+ label: "广播电台",
|
|
|
+ }, ],
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -714,8 +710,7 @@ const channelMixin = {
|
|
|
const systemMixin = {
|
|
|
data() {
|
|
|
return {
|
|
|
- systemOptions: [
|
|
|
- {
|
|
|
+ systemOptions: [{
|
|
|
value: 1,
|
|
|
label: "Android",
|
|
|
},
|
|
@@ -761,21 +756,21 @@ const mapMixin = {
|
|
|
|
|
|
areaFormatter(row) {
|
|
|
if (this.mapOptions.length > 0) {
|
|
|
- let province = row.province
|
|
|
- ? this.mapOptions.find((i) => i.id == row.province)
|
|
|
- : "";
|
|
|
+ let province = row.province ?
|
|
|
+ this.mapOptions.find((i) => i.id == row.province) :
|
|
|
+ "";
|
|
|
let provinceName = province ? province.name : "";
|
|
|
|
|
|
let city =
|
|
|
- province && province.childList.length > 0
|
|
|
- ? province.childList.find((i) => i.id == row.city)
|
|
|
- : "";
|
|
|
+ province && province.childList.length > 0 ?
|
|
|
+ province.childList.find((i) => i.id == row.city) :
|
|
|
+ "";
|
|
|
let cityName = city ? `-${city.name}` : "";
|
|
|
|
|
|
let area =
|
|
|
- city && city.childList.length > 0
|
|
|
- ? city.childList.find((i) => i.id == row.area)
|
|
|
- : "";
|
|
|
+ city && city.childList.length > 0 ?
|
|
|
+ city.childList.find((i) => i.id == row.area) :
|
|
|
+ "";
|
|
|
let areaName = area ? `-${area.name}` : "";
|
|
|
return `${provinceName}${cityName}${areaName}`;
|
|
|
}
|
|
@@ -784,8 +779,30 @@ const mapMixin = {
|
|
|
};
|
|
|
|
|
|
export {
|
|
|
- addressMixin, albumTypeMixin, audioMixin, blogClassMixin, channelMixin, contentMixin, coverMixin, currentMixin, devCategoryMixin, devFucMixin, devMixin,
|
|
|
- devModeMixin, devTypeMixin, disabledMixin, isFreeMixin, languageMixin, mapMixin, onOrOffMixin, payTypeMixin, platformMixin, regionMixin, serviceTimeMixin,
|
|
|
- serviceTypeMixin, sexMixin, systemMixin, yesOrNoMixin
|
|
|
+ addressMixin,
|
|
|
+ albumTypeMixin,
|
|
|
+ audioMixin,
|
|
|
+ blogClassMixin,
|
|
|
+ channelMixin,
|
|
|
+ contentMixin,
|
|
|
+ coverMixin,
|
|
|
+ currentMixin,
|
|
|
+ devCategoryMixin,
|
|
|
+ devFucMixin,
|
|
|
+ devMixin,
|
|
|
+ devModeMixin,
|
|
|
+ devTypeMixin,
|
|
|
+ disabledMixin,
|
|
|
+ isFreeMixin,
|
|
|
+ languageMixin,
|
|
|
+ mapMixin,
|
|
|
+ onOrOffMixin,
|
|
|
+ payTypeMixin,
|
|
|
+ platformMixin,
|
|
|
+ regionMixin,
|
|
|
+ serviceTimeMixin,
|
|
|
+ serviceTypeMixin,
|
|
|
+ sexMixin,
|
|
|
+ systemMixin,
|
|
|
+ yesOrNoMixin
|
|
|
};
|
|
|
-
|