Browse Source

'鏈條所有接口完畢——加入音頻播放和進度控制'

hfll
hflllll 1 month ago
parent
commit
402ac52184
8 changed files with 855 additions and 92 deletions
  1. +1
    -1
      config/index.js
  2. +3
    -1
      mixins/config.js
  3. BIN
      static/视频封面.png
  4. +2
    -0
      stores/index.js
  5. +833
    -74
      subPages/home/book.vue
  6. +1
    -1
      subPages/home/directory.vue
  7. +8
    -6
      subPages/home/music.vue
  8. +7
    -9
      subPages/login/login.vue

+ 1
- 1
config/index.js View File

@ -12,7 +12,7 @@ const envParam = {
prod: 'production', prod: 'production',
} }
const env = envParam['dev']
const env = envParam['test']
// 全局配置 // 全局配置
const config = { const config = {


+ 3
- 1
mixins/config.js View File

@ -34,17 +34,19 @@ export default {
return { return {
title: this.configParamContent('app_name'), title: this.configParamContent('app_name'),
desc: this.configParamContent('share_desc'), desc: this.configParamContent('share_desc'),
imageUrl: this.configParamContent('app_logo'),
imageUrl: this.configParamContent('login_logo'),
path: '/pages/index/index' path: '/pages/index/index'
} }
} }
}, },
// 分享到好友
onShareAppMessage() { onShareAppMessage() {
return { return {
...this.GShare, ...this.GShare,
...this.mixinCustomShare() ...this.mixinCustomShare()
} }
}, },
// 分享到朋友圈
onShareTimeline() { onShareTimeline() {
return { return {
...this.GShare, ...this.GShare,


BIN
static/视频封面.png View File

Before After
Width: 670  |  Height: 376  |  Size: 240 KiB

+ 2
- 0
stores/index.js View File

@ -72,6 +72,8 @@ const store = new Vuex.Store({
acc[item.code] = item acc[item.code] = item
return acc return acc
}, {}) }, {})
console.log('configList列表为:', config);
commit('setConfigList', config) commit('setConfigList', config)
}, },
// 查询部门列表 // 查询部门列表


+ 833
- 74
subPages/home/book.vue
File diff suppressed because it is too large
View File


+ 1
- 1
subPages/home/directory.vue View File

@ -152,7 +152,7 @@ export default {
startLearning(id) { startLearning(id) {
// //
uni.navigateTo({ uni.navigateTo({
url: '/subPages/home/book?courseId=' + id + '&bookId=' + this.id
url: '/subPages/home/book?courseId=' + id + '&bookId=' + this.id + '&memberId=' + this.bookInfo.vip
}) })
}, },
// //


+ 8
- 6
subPages/home/music.vue View File

@ -5,15 +5,15 @@
<view class="voice-list"> <view class="voice-list">
<view <view
v-for="(voice, index) in voiceList" v-for="(voice, index) in voiceList"
:key="voice.id"
:key="voice.voiceType"
class="voice-item" class="voice-item"
:class="{ 'selected': voice.id === selectedVoiceId }"
@click="selectVoice(voice.id)"
:class="{ 'selected': voice.voiceType === selectedVoiceId }"
@click="selectVoice(voice.voiceType)"
> >
<view class="voice-avatar"> <view class="voice-avatar">
<view class="play-icon"> <view class="play-icon">
<uv-icon <uv-icon
:name="voice.id === selectedVoiceId ? 'pause' : 'play-right-fill'"
:name="voice.voiceType === selectedVoiceId ? 'pause' : 'play-right-fill'"
size="24" size="24"
color="#666666" color="#666666"
></uv-icon> ></uv-icon>
@ -23,7 +23,7 @@
<view class="voice-name">{{ voice.name }}</view> <view class="voice-name">{{ voice.name }}</view>
<view class="voice-desc">{{ voice.info }}</view> <view class="voice-desc">{{ voice.info }}</view>
</view> </view>
<view v-if="voice.id === selectedVoiceId" class="selected-tag">
<view v-if="voice.voiceType === selectedVoiceId" class="selected-tag">
已选择 已选择
</view> </view>
</view> </view>
@ -82,7 +82,9 @@ export default {
} }
}, },
onLoad(options) { onLoad(options) {
this.selectedVoiceId = options.voiceId
this.selectedVoiceId = Number(options.voiceId)
console.log( 'options.voiceId', options.voiceId );
this.getVoice() this.getVoice()
} }
} }


+ 7
- 9
subPages/login/login.vue View File

@ -7,7 +7,7 @@
<view class="content"> <view class="content">
<!-- Logo和标题区域 --> <!-- Logo和标题区域 -->
<view class="logo-section"> <view class="logo-section">
<image class="logo" :src="configParamImage('app_logo')" mode="aspectFit"></image>
<image class="logo" :src="configParamContent('login_logo')" mode="aspectFit"></image>
<text class="title-text">展品维保报修小程序</text> <text class="title-text">展品维保报修小程序</text>
</view> </view>
@ -40,19 +40,19 @@
</view> </view>
<!-- 用户协议和隐私政策弹窗 --> <!-- 用户协议和隐私政策弹窗 -->
<uv-modal ref="serviceModal" title="《服务协议与隐私条款》" :show-cancel-button="false" confirm-text="我知道了" confirm-color="#C70019" @confirm="isAgreed = true">
<uv-modal ref="serviceModal" title="《服务协议与隐私条款》" :show-cancel-button="false" confirm-text="我知道了" confirm-color="#06DADC" @confirm="isAgreed = true">
<view class="privacy-content"> <view class="privacy-content">
<!-- 如果是富文本 --> <!-- 如果是富文本 -->
<rich-text :nodes="configParamTextarea('app_agreement')">
<rich-text :nodes="configParamContent('privacy_policy')">
</rich-text> </rich-text>
</view> </view>
</uv-modal> </uv-modal>
<!-- 用户协议和隐私政策弹窗 --> <!-- 用户协议和隐私政策弹窗 -->
<uv-modal ref="guideModal" title="《个人信息保护指引》" :show-cancel-button="false" confirm-text="我知道了" confirm-color="#C70019" @confirm="isAgreed = true">
<uv-modal ref="guideModal" title="《个人信息保护指引》" :show-cancel-button="false" confirm-text="我知道了" confirm-color="#06DADC" @confirm="isAgreed = true">
<view class="privacy-content"> <view class="privacy-content">
<!-- 如果是富文本 --> <!-- 如果是富文本 -->
<rich-text :nodes="configParamTextarea('app_guideline')">
<rich-text :nodes="configParamContent('user_agreement ')">
</rich-text> </rich-text>
</view> </view>
</uv-modal> </uv-modal>
@ -71,19 +71,17 @@ export default {
// //
handleLogin() { handleLogin() {
// uni.redirectTo({ url: '/subPages/login/userInfo' })
// return
if (!this.isAgreed) { if (!this.isAgreed) {
this.$refs.serviceModal.open(); this.$refs.serviceModal.open();
this.$refs.guideModal.open(); this.$refs.guideModal.open();
return return
} }
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: async (res) => { success: async (res) => {
console.log('登录成功', res); console.log('登录成功', res);
const { result: loginRes} = await this.$api.login.login({
const { result: loginRes } = await this.$api.login.login({
code: res.code code: res.code
}) })


Loading…
Cancel
Save