Ver código fonte

Merge branch 'test'

DESKTOP-2S67K1S\31396 2 anos atrás
pai
commit
d5084f28da

Diferenças do arquivo suprimidas por serem muito extensas
+ 2766 - 0
package-lock.json


+ 5 - 1
public/index.html

@@ -11,8 +11,12 @@
         var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
         document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
     </script>
+    <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
+    <script>
+        var vConsole = new window.VConsole();
+    </script>
     <link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
-</head>
+</head> 
 
 <body>
     <noscript>

+ 9 - 0
src/api/imusic.js

@@ -0,0 +1,9 @@
+import request from "../utils/request";
+
+export function detail(data){
+  return request({
+    url: `/music/atmd/groupDetail`,
+    method: 'post',
+    data
+  })
+}

+ 8 - 3
src/common/button.scss

@@ -1,9 +1,9 @@
-button{
+button {
   height: 100rpx;
   line-height: 100rpx;
 }
 
-button::after{
+button::after {
   content: none
 }
 
@@ -12,11 +12,16 @@ uni-button[type=submit] {
   color: #FFF;
 }
 
+uni-button[type=buy] {
+  background-image: linear-gradient(#F3CF97, #F6E5C4);
+  color: #7C541A;
+}
+
 uni-button[circle] {
   border-radius: 50rpx;
 }
 
-uni-slider{
+uni-slider {
   margin: 0;
   width: 100%;
 }

+ 152 - 106
src/pages.json

@@ -2,110 +2,156 @@
 	"easycom": {
 		"^z-(.*)": "@zebra-ui/swiper/components/z-$1/z-$1.vue"
 	},
-	"pages": [{
-		// 设备引导页
-		"path": "pages/guide/index",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// 设备文章
-		"path": "pages/article/index",
-		"style": {
-			"navigationStyle": "custom",
-			"onReachBottomDistance": 50
-		}
-	}, {
-		// 耳机操作手势
-		"path": "pages/operation/index",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// 帮助与反馈
-		"path": "pages/help/index",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// 产品手册
-		"path": "pages/product/manual",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// 关于我们
-		"path": "pages/about/index",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// 用户协议
-		"path": "pages/user/agreement",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// 隐私协议
-		"path": "pages/privacy/agreement",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// 猫王博物馆
-		"path": "pages/museum/index",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// 猫王博物馆 设备详情页
-		"path": "pages/museum/detail",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// 12频道分享
-		"path": "pages/share/channels",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// 频道详情
-		"path": "pages/share/list",
-		"style": {
-			"navigationStyle": "custom",
-			"onReachBottomDistance": 50
-		}
-	}, {
-		// 歌单
-		"path": "pages/share/detail",
-		"style": {
-			"navigationStyle": "custom",
-			"onReachBottomDistance": 50
-		}
-	}, {
-		// 播放控件
-		"path": "pages/share/controls",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// vip音乐服务
-		"path": "pages/vip/index",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// 抽奖
-		"path": "pages/lottery/index",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}, {
-		// 填写收货信息
-		"path": "pages/lottery/detail",
-		"style": {
-			"navigationStyle": "custom"
-		}
-	}]
+	"pages": [
+		{
+			// 设备引导页
+			"path": "pages/guide/index",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 设备文章
+			"path": "pages/article/index",
+			"style": {
+				"navigationStyle": "custom",
+				"onReachBottomDistance": 50
+			}
+		},
+		{
+			// 耳机操作手势
+			"path": "pages/operation/index",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 帮助与反馈
+			"path": "pages/help/index",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 产品手册
+			"path": "pages/product/manual",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 关于我们
+			"path": "pages/about/index",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 用户协议
+			"path": "pages/user/agreement",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 隐私协议
+			"path": "pages/privacy/agreement",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 猫王博物馆
+			"path": "pages/museum/index",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 猫王博物馆 设备详情页
+			"path": "pages/museum/detail",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 12频道分享
+			"path": "pages/share/channels",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 频道详情
+			"path": "pages/share/list",
+			"style": {
+				"navigationStyle": "custom",
+				"onReachBottomDistance": 50
+			}
+		},
+		{
+			// 歌单
+			"path": "pages/share/detail",
+			"style": {
+				"navigationStyle": "custom",
+				"onReachBottomDistance": 50
+			}
+		},
+		{
+			// 播放控件
+			"path": "pages/share/controls",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// vip音乐服务
+			"path": "pages/vip/index",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 抽奖
+			"path": "pages/lottery/index",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 填写收货信息
+			"path": "pages/lottery/detail",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 爱听支付
+			"path": "pages/imusic/index",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 爱听付费协议
+			"path": "pages/imusic/agreement",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 儿童隐私保护指南
+			"path": "pages/imusic/children",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			// 音乐服务许可协议
+			"path": "pages/imusic/service",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		}
+	]
 }

Diferenças do arquivo suprimidas por serem muito extensas
+ 287 - 0
src/pages/imusic/agreement.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 119 - 0
src/pages/imusic/children.vue


+ 122 - 0
src/pages/imusic/index.vue

@@ -0,0 +1,122 @@
+<template>
+  <view class="index">
+    <image mode="center" :src="form.pic" />
+    <view class="buy">
+      <button type="buy" circle @click="getSubmit">立即购买</button>
+      <span>
+        <radio-group @change="getChange">
+          <radio :value="value" />
+        </radio-group>
+        <text>购买即视为同意</text>
+        <navigator url="/pages/imusic/agreement">《场景歌单付费协议》</navigator>
+        <navigator url="/pages/imusic/service">《音乐服务许可协议》</navigator>
+      </span>
+    </view>
+  </view>
+</template>
+
+<script>
+import { detail } from '@/api/imusic.js'
+export default {
+  data() {
+    return {
+      form: {},
+      // 是否同意
+      value: '0',
+      id: ''
+    }
+  },
+  onLoad(e) {
+    if (e.id) {
+      this.getDetail(e.id)
+      this.id = e.id
+    }
+  },
+  methods: {
+    getDetail(e) {
+      detail({ id: e }).then(res => {
+        if (res.data.code === 0) {
+          this.form = res.data.data
+        }
+      })
+    },
+
+    getChange() {
+      this.value = '1'
+    },
+
+    // 立即购买
+    getSubmit() {
+      if (this.value === '1') {
+        clickPay.postMessage(`{\"id\":\"${this.id}\", \"type\":15}`)
+      } else {
+        uni.showToast({
+          title: '请先阅读并勾选协议',
+          icon: 'none'
+        })
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.index {
+  width: 100%;
+  height: 100%;
+  overflow-y: hidden;
+}
+
+uni-image {
+  width: 100%;
+  height: 100%;
+}
+
+.buy {
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  height: 232rpx;
+  overflow: hidden;
+}
+
+.buy::before {
+  content: '';
+  display: block;
+  height: 232rpx;
+  background: rgba(18, 18, 18, 0.4);
+  backdrop-filter: blur(16rpx);
+}
+
+button {
+  width: 92%;
+  font-weight: bold;
+  position: absolute;
+  top: 24rpx;
+  left: 50%;
+  transform: translate(-50%);
+}
+
+navigator {
+  display: inline;
+  color: #FFF;
+}
+
+span {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  position: absolute;
+  bottom: 60rpx;
+  width: 100%;
+  text-align: center;
+  font-size: 24rpx;
+  color: #d5d5d5;
+}
+
+::v-deep uni-radio .uni-radio-input {
+  width: 24rpx;
+  height: 24rpx;
+  background: none;
+}
+</style>

Diferenças do arquivo suprimidas por serem muito extensas
+ 156 - 0
src/pages/imusic/service.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 5 - 5
src/pages/vip/index.vue


+ 1 - 1
src/utils/request.js

@@ -1,4 +1,4 @@
-const baseUrl = 'https://client.ohplay.radio1964.net/web' //生产
+const baseUrl = 'https://o3tapi.radio1964.com/web' // 测试
 
 function request(e) {
   if (!e.data) {