Compare commits
79 Commits
speed
...
changeAliP
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df177725d8 | ||
|
|
67f26757ce | ||
|
|
69176ffbd9 | ||
|
|
e9bcc83e4c | ||
|
|
9f0845f97d | ||
|
|
80bef54e47 | ||
|
|
ebd616aef5 | ||
|
|
7c9b2a3c80 | ||
|
|
6c64c27a5a | ||
|
|
f726ecf29a | ||
|
|
7ee7b52c93 | ||
|
|
3904f02c55 | ||
|
|
f578943c10 | ||
|
|
3f6a1c546b | ||
|
|
a428b3fa49 | ||
|
|
e4c17df0f9 | ||
|
|
79f0b7461d | ||
|
|
172e0fa2be | ||
|
|
dfaa65c7a2 | ||
|
|
85d2d7f41b | ||
|
|
f76423d222 | ||
|
|
8004ee57c1 | ||
|
|
87d32db367 | ||
|
|
c8ffd37e4a | ||
|
|
f702fb63d8 | ||
|
|
ed130e8dc5 | ||
|
|
719f90889c | ||
|
|
9508af8780 | ||
|
|
a582e56af5 | ||
|
|
54694548f4 | ||
|
|
3a390f2ece | ||
|
|
c3268fe7e7 | ||
|
|
0342b547da | ||
|
|
2cf585340f | ||
|
|
19de052673 | ||
|
|
3cba070d7e | ||
|
|
62b3400bfc | ||
|
|
5efb7085d5 | ||
|
|
74d83fd2a8 | ||
|
|
a5d05367bd | ||
|
|
8d39d98ac4 | ||
|
|
e6411e6661 | ||
|
|
7238eb05c2 | ||
|
|
f73e521179 | ||
|
|
d1953091a9 | ||
|
|
7f49331372 | ||
|
|
545fd9cc75 | ||
|
|
05edf730c9 | ||
|
|
62bd642563 | ||
|
|
049117e4b0 | ||
|
|
4f1a8d43ac | ||
|
|
eefd8f4e83 | ||
|
|
47b2c774f1 | ||
|
|
989f802f1a | ||
|
|
e7b000572b | ||
|
|
9735a91eb3 | ||
|
|
4ab1335a94 | ||
| 1c20c59fda | |||
| 984bf85328 | |||
| df49321b07 | |||
|
|
fa6c3b2c4d | ||
|
|
2e9a250be3 | ||
|
|
016b072054 | ||
|
|
b31cae7c36 | ||
|
|
6ecec6289e | ||
| 60d2c82b34 | |||
| 1fbbb1685c | |||
|
|
f5b053a8a0 | ||
|
|
818eeb4368 | ||
|
|
a08c531c20 | ||
|
|
739412b8ea | ||
| f24fdf5e43 | |||
|
|
16dc5b755d | ||
|
|
5b3f61e90a | ||
| 1d1c92d01b | |||
|
|
327e96d7cd | ||
|
|
f9d095e20b | ||
| 3b3cc95f9f | |||
|
|
8bebf10770 |
@@ -5,7 +5,7 @@
|
|||||||
"configurations" : [
|
"configurations" : [
|
||||||
{
|
{
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"launchtype" : "local"
|
"launchtype" : "remote"
|
||||||
},
|
},
|
||||||
"default" : {
|
"default" : {
|
||||||
"launchtype" : "local"
|
"launchtype" : "local"
|
||||||
@@ -20,12 +20,16 @@
|
|||||||
"type" : "uniCloud"
|
"type" : "uniCloud"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"playground" : "standard",
|
"playground" : "custom",
|
||||||
"type" : "uni-app:app-ios"
|
"type" : "uni-app:app-ios"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"playground" : "standard",
|
"playground" : "custom",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"playground" : "standard",
|
||||||
|
"type" : "uni-app:app-ios_simulator"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
8
App.vue
@@ -1,8 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
music,
|
iap
|
||||||
bgm
|
} from "@/utils/myIapCheck.js";
|
||||||
} from "@/utils/music.js";
|
|
||||||
import store from "@/store/index.js";
|
import store from "@/store/index.js";
|
||||||
import socket from "@/config/socket";
|
import socket from "@/config/socket";
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
@@ -59,7 +58,8 @@
|
|||||||
if (store.state.userInfo.token) {
|
if (store.state.userInfo.token) {
|
||||||
socket.init();
|
socket.init();
|
||||||
}
|
}
|
||||||
// APPUpdate();
|
// 检测是否有未关闭苹果内购订单
|
||||||
|
iap.getChannels()
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
onShow: function(e) {
|
onShow: function(e) {
|
||||||
|
|||||||
@@ -1,38 +1,38 @@
|
|||||||
{
|
{
|
||||||
"version": "1",
|
"version" : "1",
|
||||||
"prompt": "template",
|
"prompt" : "template",
|
||||||
"title": "服务协议和隐私政策",
|
"title" : "服务协议和隐私政策",
|
||||||
"message": " 请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"https://wumen.taihumed.com/agreement.html\">《用户协议》</a>和<a href=\"https://wumen.taihumed.com/privacy.html\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
|
"message" : " 请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"https://wumen.taihumed.com/agreement.html\">《用户协议》</a>和<a href=\"https://wumen.taihumed.com/privacy.html\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
|
||||||
"buttonAccept": "同意并接受",
|
"buttonAccept" : "同意并接受",
|
||||||
"buttonRefuse": "暂不同意",
|
"buttonRefuse" : "暂不同意",
|
||||||
"hrefLoader": "system",
|
"hrefLoader" : "system",
|
||||||
"backToExit":"false",
|
"backToExit" : "false",
|
||||||
"second": {
|
"second" : {
|
||||||
"title": "确认提示",
|
"title" : "确认提示",
|
||||||
"message": " 进入应用前,你需先同意<a href=\"https://wumen.taihumed.com/agreement.html\">《用户协议》</a>和<a href=\"https://wumen.taihumed.com/privacy.html\">《隐私政策》</a>,否则将退出应用。",
|
"message" : " 进入应用前,你需先同意<a href=\"https://wumen.taihumed.com/agreement.html\">《用户协议》</a>和<a href=\"https://wumen.taihumed.com/privacy.html\">《隐私政策》</a>,否则将退出应用。",
|
||||||
"buttonAccept": "同意并继续",
|
"buttonAccept" : "同意并继续",
|
||||||
"buttonRefuse": "退出应用"
|
"buttonRefuse" : "退出应用"
|
||||||
},
|
},
|
||||||
"disagreeMode":{
|
"disagreeMode" : {
|
||||||
"support": false,
|
"support" : false,
|
||||||
"loadNativePlugins": false,
|
"loadNativePlugins" : false,
|
||||||
"visitorEntry": false,
|
"visitorEntry" : false,
|
||||||
"showAlways": false
|
"showAlways" : false
|
||||||
},
|
},
|
||||||
"styles": {
|
"styles" : {
|
||||||
"backgroundColor": "#FFF",
|
"backgroundColor" : "#FFF",
|
||||||
"borderRadius":"5px",
|
"borderRadius" : "5px",
|
||||||
"title": {
|
"title" : {
|
||||||
"color": "#333"
|
"color" : "#333"
|
||||||
},
|
},
|
||||||
"buttonAccept": {
|
"buttonAccept" : {
|
||||||
"color": "#333"
|
"color" : "#333"
|
||||||
},
|
},
|
||||||
"buttonRefuse": {
|
"buttonRefuse" : {
|
||||||
"color": "#333"
|
"color" : "#333"
|
||||||
},
|
},
|
||||||
"buttonVisitor": {
|
"buttonVisitor" : {
|
||||||
"color": "#55aaff"
|
"color" : "#55aaff"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,10 +16,10 @@
|
|||||||
<u-icon name="bag" color="#fff" size="28"></u-icon>
|
<u-icon name="bag" color="#fff" size="28"></u-icon>
|
||||||
<text>立即购买</text>
|
<text>立即购买</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="saveBtnss gouwuche flexbox" @click="oprate('gouwuche')">
|
<!-- <view class="saveBtnss gouwuche flexbox" @click="oprate('gouwuche')">
|
||||||
<uni-icons type="cart" size="28" style="color: #666;"></uni-icons>
|
<uni-icons type="cart" size="28" style="color: #666;"></uni-icons>
|
||||||
<text>加入购物车</text>
|
<text>加入购物车</text>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="box">
|
<view class="box" v-if="sayList && sayList.length > 0">
|
||||||
<view class="firstLeve flexbox leve" v-for="(item, index) in sayList" :key="index" style="flex-wrap: wrap;">
|
<view class="firstLeve flexbox leve" v-for="(item, index) in sayList" :key="index" style="flex-wrap: wrap;">
|
||||||
<view class="imgbox" :style="getBackGround(item.user.avatar)">
|
<view v-if="item.user && item.user != null && item.user != 'null'" class="imgbox" :style="getBackGround(item.user.avatar)">
|
||||||
<view class="img">
|
<view class="img">
|
||||||
<!-- <image :src="item.user.avatar" mode="aspectFit" style="width: 80rpx; height: 80rpx;"></image> -->
|
<!-- <image :src="item.user.avatar" mode="aspectFit" style="width: 80rpx; height: 80rpx;"></image> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="contentBox contentBoxfirstLeve">
|
<view class="contentBox contentBoxfirstLeve">
|
||||||
<view class="name">
|
<view class="name" v-if="item.user && item.user != null && item.user != 'null'">
|
||||||
{{item.user.name == '' ? '暂无昵称': item.user.name}}
|
{{item.user.name == '' ? '暂无昵称': item.user.name}}
|
||||||
</view>
|
</view>
|
||||||
<view class="content" v-if="item.content != ''">
|
<view class="content" v-if="item.content != ''">
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
.guide_pages_bg2 {
|
.guide_pages_bg2 {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: url("@/static/icon/e_0ban_2.jpg") no-repeat;
|
background: url("@/static/icon/e_0ban_2.jpg") no-repeat bottom center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
// background-color: #007AFF;
|
// background-color: #007AFF;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
.guide_pages_bg3 {
|
.guide_pages_bg3 {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: url("@/static/icon/e_0ban_3.jpg") no-repeat;
|
background: url("@/static/icon/e_0ban_3.jpg") no-repeat bottom center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
// background-color: #EA552D;
|
// background-color: #EA552D;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
|
|
||||||
.close_btj {
|
.close_btj {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 60%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
width: 290rpx;
|
width: 290rpx;
|
||||||
height: 68rpx;
|
height: 68rpx;
|
||||||
|
|||||||
509
components/oneVideo.vue
Normal file
@@ -0,0 +1,509 @@
|
|||||||
|
<template>
|
||||||
|
<view >
|
||||||
|
<u-popup key="1" :show="videoShow" :round="10" @close="closeVideo">
|
||||||
|
<view class="" style="padding: 10px;">
|
||||||
|
<view>
|
||||||
|
<view class="container" >
|
||||||
|
<div ref="videoContent" @tap="renderScript.handleClick" id="url-player-test"
|
||||||
|
:videoData="videoData"
|
||||||
|
:opname = "opname"
|
||||||
|
:change:opname="renderScript.opnameChange"
|
||||||
|
:change:videoData="renderScript.receiveMsg"></div>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<div class="fullScreenButton-container" >
|
||||||
|
<div
|
||||||
|
:class="`prism-fullscreen-btn ${isFullScreen ? 'fullscreen' : ''}`"
|
||||||
|
@tap="renderScript.changeVideoScreen"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
<view class="btn" style="text-align: center;">
|
||||||
|
<button type="primary" @click="closeVideo" size="mini">关闭视频</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name:"oneVideo",
|
||||||
|
props:['videoData'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
videoShow:true,
|
||||||
|
isFullScreen: false,
|
||||||
|
opname:''
|
||||||
|
};
|
||||||
|
},methods:{
|
||||||
|
closeVideo(){
|
||||||
|
// this.timer = null;
|
||||||
|
// await this.setVideoTime();
|
||||||
|
// this.player.dispose();
|
||||||
|
this.opname = 'close'
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$emit('close')
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script module="renderScript" lang="renderjs">
|
||||||
|
|
||||||
|
import $ from 'jquery'
|
||||||
|
// import StaticADComponent from './staticadcomponent/index.js';
|
||||||
|
/**
|
||||||
|
* 静态广告组件
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
/**
|
||||||
|
* 静态广告组件
|
||||||
|
*/
|
||||||
|
|
||||||
|
components: {
|
||||||
|
// MyComponent
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// 在适合的生命周期,通过script和link标签引入播放器sdk、css
|
||||||
|
console.log(this.options, '这是monted')
|
||||||
|
// this.loadWebPlayerSDK()
|
||||||
|
// this.loadComponent()
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
player: null,
|
||||||
|
curTime: null,
|
||||||
|
curStatus: null,
|
||||||
|
// currentTime:null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
|
||||||
|
|
||||||
|
curTime(val) {
|
||||||
|
if (this.curTime !== null && this.curStatus !== null) {
|
||||||
|
this.$refs.videoContent1.click()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
handleClick(event, ownerInstance) {
|
||||||
|
console.log('event at line 165:', event)
|
||||||
|
// this.player.on('ready',function(){
|
||||||
|
// var status= this.player.fullscreenService.getIsFullScreen()
|
||||||
|
// console.log('status at line 403:', status)
|
||||||
|
// console.log('触发点击事件',status))
|
||||||
|
// })
|
||||||
|
|
||||||
|
// ownerInstance.callMethod('getData')
|
||||||
|
|
||||||
|
},
|
||||||
|
emitData(event, ownerInstance) {
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
ownerInstance.callMethod('recordTime', {
|
||||||
|
time: that.curTime,
|
||||||
|
status: that.curStatus
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
changeVideoScreen(event, ownerInstance) {
|
||||||
|
var that = this;
|
||||||
|
// this.$emit('changeScreenLoading',true)
|
||||||
|
var status=this.player.fullscreenService.getIsFullScreen();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ownerInstance.callMethod('screenChange', {
|
||||||
|
status:status,
|
||||||
|
primary:status?'portrait':'landscape'
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if(status){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
plus.screen.lockOrientation("portrait-primary"); //锁死屏幕方向为竖屏
|
||||||
|
this.player.fullscreenService.cancelFullScreen() ;
|
||||||
|
// this.$emit('changeScreenLoading',false);
|
||||||
|
|
||||||
|
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
|
||||||
|
// this.player.setPlayerSize('100%','200px');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
// this.player.setPlayerSize({
|
||||||
|
// w:"400px",
|
||||||
|
// height:'60%'
|
||||||
|
// });
|
||||||
|
// plus.screen.unlockOrientation();
|
||||||
|
this.player.fullscreenService.requestFullScreen();
|
||||||
|
setTimeout(() => {
|
||||||
|
// this.$emit('changeScreenLoading',false);
|
||||||
|
plus.screen.lockOrientation("landscape-primary");
|
||||||
|
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
endEmitData(event, ownerInstance) {
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
ownerInstance.callMethod('handleEnd', )
|
||||||
|
},
|
||||||
|
getLive() {
|
||||||
|
if(this.videoData.type==1){
|
||||||
|
var fullScreenButtonComponent = Aliplayer.Component({
|
||||||
|
/**
|
||||||
|
* 初始函数,在new对象时调用
|
||||||
|
*
|
||||||
|
* @param {string} adAddress - 广告视频地址
|
||||||
|
* @param {string} toAddress - 广告链接地址
|
||||||
|
*/
|
||||||
|
init: function (status, toAddress) {
|
||||||
|
|
||||||
|
this.fullScreenStatus=status
|
||||||
|
// this.adAddress = adAddress;
|
||||||
|
// this.toAddress = toAddress;
|
||||||
|
|
||||||
|
this.$html = $('.fullScreenButton-container');
|
||||||
|
// this.$html.hide();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建广告Dom元素
|
||||||
|
*/
|
||||||
|
createEl: function (el) {
|
||||||
|
|
||||||
|
|
||||||
|
this.$html.find('.ad').attr('src', this.adAddress);
|
||||||
|
var $adWrapper = this.$html.find('.ad-wrapper');
|
||||||
|
$adWrapper.attr('href', this.toAddress);
|
||||||
|
$adWrapper.click(function () {
|
||||||
|
// Aliplayer.util.stopPropagation();
|
||||||
|
});
|
||||||
|
// this.$html.find('.close').click(function () {
|
||||||
|
// this.$html.hide();
|
||||||
|
// });
|
||||||
|
// $(el).find('.prism-controlbar').append(this.$html);
|
||||||
|
$(el).find('.prism-time-display').after(this.$html);
|
||||||
|
},
|
||||||
|
ready: function (player, e) {
|
||||||
|
// this.$html.hide()
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 隐藏广告
|
||||||
|
*/
|
||||||
|
play: function (player, e) {
|
||||||
|
// this.$html.show();
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 显示广告
|
||||||
|
*/
|
||||||
|
pause: function (player, e) {
|
||||||
|
// this.$html.show();
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 隐藏广告
|
||||||
|
*/
|
||||||
|
playing: function (player, e) {
|
||||||
|
this.$html.show();
|
||||||
|
// this.$html.hide();
|
||||||
|
},
|
||||||
|
waiting: function (player, e) {
|
||||||
|
// this.$html.hide()
|
||||||
|
},
|
||||||
|
timeupdate: function (player, e) {
|
||||||
|
},
|
||||||
|
error: function (player, e) {
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 显示广告
|
||||||
|
*/
|
||||||
|
ended: function (player, e) {
|
||||||
|
// this.$html.show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('this.currentVideoList at line 456111111111111111111111:', this.videoList)
|
||||||
|
var player = new Aliplayer({
|
||||||
|
id: "url-player-test",
|
||||||
|
"vid": this.videoData
|
||||||
|
.videoId, // 必选参数,可以通过点播控制台(路径:媒资库>音/视频)查询。示例:1e067a2831b641db90d570b6480f****。
|
||||||
|
"playauth": this.videoData.playAuth, // 必选参数,参数值可通过调用GetVideoPlayAuth接口获取。
|
||||||
|
"encryptType": 1, // 必选参数,当播放私有加密流时需要设置本参数值为1。其它情况无需设置。
|
||||||
|
"playConfig": {
|
||||||
|
"EncryptType": 'AliyunVoDEncryption'
|
||||||
|
},
|
||||||
|
width: '100%', //容器的大小
|
||||||
|
// videoWidth: '100vw', //容器的大小
|
||||||
|
// videoHeight: '100vh', //容器的大小
|
||||||
|
height: '200px', //容器的大小
|
||||||
|
// autoplay: false,
|
||||||
|
playsinline:true,
|
||||||
|
controlBarVisibility:"click",
|
||||||
|
cover:"",
|
||||||
|
components: [
|
||||||
|
// {
|
||||||
|
// name: 'BulletScreenComponent',
|
||||||
|
// type: AliPlayerComponent.BulletScreenComponent,
|
||||||
|
// /** Descriptions of the scrolling text component parameters: text, style, bulletPosition
|
||||||
|
// * text: The scrolling text
|
||||||
|
// * style: The style of the scrolling text
|
||||||
|
// * bulletPosition: The position of the scrolling text. Valid values: 'top', 'bottom', and 'random'. The default is 'random'.
|
||||||
|
// */
|
||||||
|
// args: ['本课程版权归天津众妙之门科技有限公司所有,翻版必究!', {fontSize: '16px', color: 'red',}, 'random']
|
||||||
|
// },
|
||||||
|
{name:'adComponent',type:fullScreenButtonComponent,args:['http://101.201.146.165:8088/Pf-EH/statics/uploadFile/2024-05-10/b0f420c7-9178-41ad-9dd6-f59a64a6e190.png']},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// {
|
||||||
|
// name: 'RotateMirrorComponent',
|
||||||
|
// type: AliPlayerComponent.RotateMirrorComponent
|
||||||
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
skinLayout:[
|
||||||
|
{name: "bigPlayButton", align: "blabs", x: 30, y: 80},
|
||||||
|
{name: "H5Loading", align: "cc"},
|
||||||
|
{name: "errorDisplay", align: "tlabs", x: 0, y: 0},
|
||||||
|
{name: "infoDisplay"},
|
||||||
|
{name:"tooltip", align:"blabs",x: 0, y: 56},
|
||||||
|
{name: "thumbnail"},
|
||||||
|
{
|
||||||
|
name: "controlBar", align: "blabs", x: 0, y: 0,
|
||||||
|
children: [
|
||||||
|
{name: "progress", align: "blabs", x: 0, y: 44},
|
||||||
|
{name: "playButton", align: "tl", x: 15, y: 12},
|
||||||
|
{name: "timeDisplay", align: "tl", x: 10, y: 7},
|
||||||
|
// {name: "fullScreenButton", align: "tr", x: 10, y: 12},
|
||||||
|
// {name:"subtitle", align:"tr",x:15, y:12},
|
||||||
|
{name:"setting", align:"tr",x:15, y:12},
|
||||||
|
{name:"prism-speed-selector", align:"tr",x:15, y:12},
|
||||||
|
{name: "volume", align: "tr", x: 5, y: 10}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
}, function(player) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.player = player;
|
||||||
|
this.$refs.videoContent.click()
|
||||||
|
|
||||||
|
var timer = setInterval(() => {
|
||||||
|
var that = this;
|
||||||
|
that.curTime = parseInt(this.player.getCurrentTime());
|
||||||
|
that.curStatus = this.player.getStatus()
|
||||||
|
|
||||||
|
}, 1000);
|
||||||
|
// player.on('ready',function(){
|
||||||
|
// player.fullscreenService.requestFullScreen()
|
||||||
|
|
||||||
|
// })
|
||||||
|
this.player.on('ended', function() {
|
||||||
|
console.log('that.curTime at line 242:', this.curTime)
|
||||||
|
console.log('that.curStatus at line 210:', this.curStatus)
|
||||||
|
this.$refs.videoContent2.click()
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// player.setRotate(90)
|
||||||
|
|
||||||
|
//全屏播放
|
||||||
|
|
||||||
|
// player.one('canplay', function() {
|
||||||
|
// // console.log('canplay', this.player.tag);
|
||||||
|
// player.tag.play();
|
||||||
|
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
receiveScreenType(newValue) {
|
||||||
|
console.log('newValue at line 427屏幕方向111111111111:', newValue)
|
||||||
|
|
||||||
|
},
|
||||||
|
receiveFirstTime(newValue, oldValue, ownerVm, vm) {
|
||||||
|
// //数据变化
|
||||||
|
|
||||||
|
console.log('newValue111', newValue)
|
||||||
|
|
||||||
|
console.log('vm4444', vm)
|
||||||
|
console.log('this.firstTime at line 215:', newValue)
|
||||||
|
if (this.player) {
|
||||||
|
this.player.seek(newValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
// receiveVideoList(newValue, oldValue, ownerVm, vm) {
|
||||||
|
// // //数据变化
|
||||||
|
|
||||||
|
// console.log('currentVideoListcurrentVideoListcurrentVideoList', newValue)
|
||||||
|
|
||||||
|
// },
|
||||||
|
opnameChange(newValue, oldValue, ownerVm, vm) {
|
||||||
|
console.log('opnameChange-----------', newValue)
|
||||||
|
if(newValue == 'close'){
|
||||||
|
this.timer = null;
|
||||||
|
// await this.setVideoTime();
|
||||||
|
this.player.dispose();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
receiveMsg(newValue, oldValue, ownerVm, vm) {
|
||||||
|
//数据变化
|
||||||
|
console.log('数据变化newValue', newValue)
|
||||||
|
if(newValue.playAuth){
|
||||||
|
this.loadWebPlayerSDK()
|
||||||
|
// this.checkValue()
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
// this.loadWebPlayerSDK()
|
||||||
|
// console.log('oldValue', oldValue)
|
||||||
|
// console.log('ownerVm', ownerVm)
|
||||||
|
// console.log('vm', vm)
|
||||||
|
},
|
||||||
|
receiveWinWidth(newValue, oldValue, ownerVm, vm) {
|
||||||
|
//数据变化
|
||||||
|
console.log('newValue', newValue)
|
||||||
|
// console.log('oldValue', oldValue)
|
||||||
|
// console.log('ownerVm', ownerVm)
|
||||||
|
// console.log('vm', vm)
|
||||||
|
},
|
||||||
|
receiveWinHeight(newValue, oldValue, ownerVm, vm) {
|
||||||
|
//数据变化
|
||||||
|
console.log('newValue', newValue)
|
||||||
|
// console.log('oldValue', oldValue)
|
||||||
|
// console.log('ownerVm', ownerVm)
|
||||||
|
// console.log('vm', vm)
|
||||||
|
},
|
||||||
|
checkValue() {
|
||||||
|
console.log(this.videoData, this.videoData.playAuth, "1111888888")
|
||||||
|
console.log('zoulema ');
|
||||||
|
if (!this.videoData.playAuth) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.checkValue();
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
console.log('this.videoList at line 这是这只只是594:', this.currentVideoList)
|
||||||
|
this.getLive();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
loadWebPlayerSDK() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const s_tag = document.createElement('script'); // 引入播放器js
|
||||||
|
s_tag.type = 'text/javascript';
|
||||||
|
s_tag.src = 'https://g.alicdn.com/apsara-media-box/imp-web-player/2.20.3/aliplayer-min.js';
|
||||||
|
s_tag.charset = 'utf-8';
|
||||||
|
s_tag.onload = () => {
|
||||||
|
const s_tag1 = document.createElement('script'); // 引入播放器js
|
||||||
|
s_tag1.type = 'text/javascript';
|
||||||
|
s_tag1.src = 'https://player.alicdn.com/aliplayer/presentation/js/aliplayercomponents.min.js';
|
||||||
|
s_tag1.charset = 'utf-8';
|
||||||
|
s_tag1.onload = () => {
|
||||||
|
this.checkValue();
|
||||||
|
resolve();
|
||||||
|
|
||||||
|
}
|
||||||
|
document.body.appendChild(s_tag1);
|
||||||
|
|
||||||
|
}
|
||||||
|
document.body.appendChild(s_tag);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const l_tag = document.createElement('link'); // 引入播放器css
|
||||||
|
l_tag.rel = 'stylesheet';
|
||||||
|
l_tag.href =
|
||||||
|
'https://g.alicdn.com/apsara-media-box/imp-web-player/2.20.3/skins/default/aliplayer-min.css';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
document.body.appendChild(l_tag);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
loadComponent() {
|
||||||
|
// return new Promise((resolve, reject) => {
|
||||||
|
// const s_tag = document.createElement('script');
|
||||||
|
// s_tag.type = 'text/javascript';
|
||||||
|
// // 需要先下载组件 js 文件,放到项目 /static/ 目录下
|
||||||
|
// // 下载地址:https://github.com/aliyunvideo/AliyunPlayer_Web/blob/master/customComponents/dist/aliplayer-components/aliplayercomponents-1.0.9.min.js
|
||||||
|
// s_tag.src = '@/static/aliplayercomponents.js';
|
||||||
|
// s_tag.charset = 'utf-8';
|
||||||
|
// s_tag.onload = () => {
|
||||||
|
// resolve();
|
||||||
|
// }
|
||||||
|
// document.body.appendChild(s_tag);
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.fullScreenButton-container {
|
||||||
|
color: #fff;
|
||||||
|
float: right;
|
||||||
|
height: 35px;
|
||||||
|
margin-top: 6px;
|
||||||
|
margin-right: 5px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
i {
|
||||||
|
color: #fff;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 22px;
|
||||||
|
display: block;
|
||||||
|
margin-top: 7px;
|
||||||
|
cursor: pointer;
|
||||||
|
& + i {
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
&:hover + .player-tooltip {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
></image>
|
></image>
|
||||||
<text
|
<text
|
||||||
class="footer_nav_item_text"
|
class="footer_nav_item_text"
|
||||||
:class="[item.pagePath == path ? 'footer_item_text_active' : '']"
|
:class="[item.pagePath == path ? 'footer_item_text_active' : '',index == 2 && item.pagePath == path ? 'redText' :'']"
|
||||||
>{{ item.text }}</text
|
>{{ item.text }}</text
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
@@ -80,12 +80,12 @@ export default {
|
|||||||
selectedIconPath: "static/tab/icon1_y.png",
|
selectedIconPath: "static/tab/icon1_y.png",
|
||||||
text: "首页",
|
text: "首页",
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
pagePath: "pages/peanut/shopping",
|
// pagePath: "pages/peanut/shopping",
|
||||||
iconPath: "static/tab/tab_nor_02.png",
|
// iconPath: "static/tab/tab_nor_02.png",
|
||||||
selectedIconPath: "static/tab/tab_cur_02.png",
|
// selectedIconPath: "static/tab/tab_cur_02.png",
|
||||||
text: "购物车",
|
// text: "购物车",
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
pagePath: "pages/bookShop/orderList",
|
pagePath: "pages/bookShop/orderList",
|
||||||
iconPath: "static/tab/order.png",
|
iconPath: "static/tab/order.png",
|
||||||
@@ -112,12 +112,12 @@ export default {
|
|||||||
selectedIconPath: "static/tab/icon1_y.png",
|
selectedIconPath: "static/tab/icon1_y.png",
|
||||||
text: "首页",
|
text: "首页",
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
pagePath: "pages/peanut/shopping",
|
// pagePath: "pages/peanut/shopping",
|
||||||
iconPath: "static/tab/tab_nor_02.png",
|
// iconPath: "static/tab/tab_nor_02.png",
|
||||||
selectedIconPath: "static/tab/tab_cur_02.png",
|
// selectedIconPath: "static/tab/tab_cur_02.png",
|
||||||
text: "购物车",
|
// text: "购物车",
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
pagePath: "pages/taihu/index",
|
pagePath: "pages/taihu/index",
|
||||||
@@ -216,6 +216,7 @@ export default {
|
|||||||
color: #7b7b7b;
|
color: #7b7b7b;
|
||||||
margin-top: 6rpx;
|
margin-top: 6rpx;
|
||||||
}
|
}
|
||||||
|
.footer_nav_item_text.redText{color: red;}
|
||||||
|
|
||||||
.footer_nav_item_text_active {
|
.footer_nav_item_text_active {
|
||||||
color: #f9a633;
|
color: #f9a633;
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// baseUrl = "http://localhost:7001/";
|
// baseUrl = "http://localhost:7001/";
|
||||||
// socketUrl = "ws://localhost:6001/";
|
// socketUrl = "ws://localhost:6001/";
|
||||||
// baseUrl = "https://twin-ui.com/demo/";
|
// baseUrl = "https://twin-ui.com/demo/";
|
||||||
baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
||||||
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
|
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
|
||||||
// baseUrl = "http://59.110.212.44:9200/pb/";
|
// baseUrl = "http://59.110.212.44:9200/pb/";
|
||||||
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
|
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
|
||||||
@@ -16,8 +16,8 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
} else if (process.env.NODE_ENV === 'production') {
|
} else if (process.env.NODE_ENV === 'production') {
|
||||||
// 生产环境11
|
// 生产环境11
|
||||||
// baseUrl = "http://59.110.212.44:9100/pb/";
|
// baseUrl = "http://59.110.212.44:9100/pb/";
|
||||||
baseUrl = "https://testapi.nuttyreading.com/";
|
// baseUrl = "https://testapi.nuttyreading.com/";
|
||||||
// baseUrl = "https://api.nuttyreading.com/"; //1
|
baseUrl = "https://api.nuttyreading.com/"; //1
|
||||||
// baseUrl = "ws://twin-ui.com:6001/";
|
// baseUrl = "ws://twin-ui.com:6001/";
|
||||||
// socketUrl = "ws://twin-ui.com:6001/";
|
// socketUrl = "ws://twin-ui.com:6001/";
|
||||||
}
|
}
|
||||||
@@ -46,6 +46,8 @@ const courtConfig = {
|
|||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// 订单编号的正则
|
||||||
|
const orderRegular = /[0-9]\d{31}$/;
|
||||||
//手机号验证正则表达式
|
//手机号验证正则表达式
|
||||||
// (中国大陆)
|
// (中国大陆)
|
||||||
const phoneRegular = /^1\d{10}$/;
|
const phoneRegular = /^1\d{10}$/;
|
||||||
@@ -59,5 +61,6 @@ const passwordRegular = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/;
|
|||||||
export default Object.assign({
|
export default Object.assign({
|
||||||
phoneRegular,
|
phoneRegular,
|
||||||
mailRegular,
|
mailRegular,
|
||||||
passwordRegular
|
passwordRegular,
|
||||||
|
orderRegular
|
||||||
}, courtConfig);
|
}, courtConfig);
|
||||||
@@ -85,10 +85,12 @@ $http.getAliToken = function(callback) {
|
|||||||
//请求开始拦截器
|
//请求开始拦截器
|
||||||
$http.requestStart = function(options) {
|
$http.requestStart = function(options) {
|
||||||
// console.log("请求开始", options);
|
// console.log("请求开始", options);
|
||||||
if (options.load && options.data.loadAnimate != 'none') {
|
// if (options.load && options.data.loadAnimate != 'none') {
|
||||||
//打开加载动画
|
// //打开加载动画
|
||||||
store.commit("setLoadingShow", true);
|
// store.commit("setLoadingShow", true);
|
||||||
}
|
// }
|
||||||
|
// delete(options.loadAnimate)
|
||||||
|
// console.log('options',options);
|
||||||
// 图片、视频上传大小限制
|
// 图片、视频上传大小限制
|
||||||
if (options.method == "FILE") {
|
if (options.method == "FILE") {
|
||||||
// 文件最大字节: options.maxSize 可以在调用方法的时候加入参数
|
// 文件最大字节: options.maxSize 可以在调用方法的时候加入参数
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启
|
* 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var isIos
|
var isIos
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
isIos = (plus.os.name == "iOS")
|
isIos = (plus.os.name == "iOS")
|
||||||
@@ -159,7 +158,8 @@ function judgeIosPermissionMemo() {
|
|||||||
function requestAndroidPermission(permissionID) {
|
function requestAndroidPermission(permissionID) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
plus.android.requestPermissions(
|
plus.android.requestPermissions(
|
||||||
[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
|
permissionID.split(","),
|
||||||
|
// [permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
|
||||||
function(resultObj) {
|
function(resultObj) {
|
||||||
var result = 0;
|
var result = 0;
|
||||||
for (var i = 0; i < resultObj.granted.length; i++) {
|
for (var i = 0; i < resultObj.granted.length; i++) {
|
||||||
@@ -264,9 +264,142 @@ function checkSystemEnableLocation() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let permissionMap = {
|
||||||
|
"android": {
|
||||||
|
"CAMERA_EXTERNAL_STORAGE": {
|
||||||
|
"name": "android.permission.READ_EXTERNAL_STORAGE,android.permission.WRITE_EXTERNAL_STORAGE,android.permission.CAMERA",
|
||||||
|
"title": "相机/相册权限说明",
|
||||||
|
"content": "便于您使用该功能上传您的照片/图片用于上传用户头像、留言上传图片、申诉反馈上传图片等场景中读取和写入相册和文件内容"
|
||||||
|
},
|
||||||
|
"CAMERA": {
|
||||||
|
"name": "android.permission.CAMERA",
|
||||||
|
"title": "相机权限说明",
|
||||||
|
"content": "便于您使用该功能上传您的照片/图片用于上传用户头像、留言上传图片、申诉反馈上传图片等场景中拍摄图片"
|
||||||
|
},
|
||||||
|
// "EXTERNAL_STORAGE": {
|
||||||
|
// "name": "android.permission.READ_EXTERNAL_STORAGE,android.permission.WRITE_EXTERNAL_STORAGE",
|
||||||
|
// "title": "相册权限说明",
|
||||||
|
// "content": "便于您使用该功能上传您的照片/图片/视频及用于上传工单故障、维修图片、扫码识别设备等信息、意见反馈上传图片、上传设备、客户、设备图片等场景中读取和写入相册和文件内容"
|
||||||
|
// },
|
||||||
|
// "LOCATION": {
|
||||||
|
// "name": "android.location.LocationManager",
|
||||||
|
// "title": "定位权限说明",
|
||||||
|
// "content": "便于您使用该功能定位您当前的位置,并上报当前位置给服务器,来智能得按照当前位置给您分配距离您最近的工单信息等功能"
|
||||||
|
// },
|
||||||
|
// "CALLPHONE": {
|
||||||
|
// "name": "android.permission.CALL_PHONE",
|
||||||
|
// "title": "拨打电话权限说明",
|
||||||
|
// "content": "便于您使用该功能能够快速和提交工单信息的客户进行联系并进行及时处理"
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
"ios": {}
|
||||||
|
}
|
||||||
|
|
||||||
|
let view = null;
|
||||||
|
let viewShow = false;
|
||||||
|
|
||||||
|
function showViewDesc(permission) {
|
||||||
|
let plat = isIos ? "ios" : "android";
|
||||||
|
view = new plus.nativeObj.View('per-modal', {
|
||||||
|
top: '0px',
|
||||||
|
left: '0px',
|
||||||
|
width: '100%',
|
||||||
|
backgroundColor: 'rgba(0,0,0,0.4)',
|
||||||
|
//opacity: '.9'
|
||||||
|
})
|
||||||
|
view.drawRect({
|
||||||
|
color: '#fff',
|
||||||
|
radius: '5px'
|
||||||
|
}, {
|
||||||
|
top: '170px',
|
||||||
|
left: '5%',
|
||||||
|
width: '90%',
|
||||||
|
height: "150px",
|
||||||
|
})
|
||||||
|
view.drawText(permissionMap[plat][permission]["title"], {
|
||||||
|
top: '180px',
|
||||||
|
left: "8%",
|
||||||
|
height: "30px"
|
||||||
|
}, {
|
||||||
|
align: "left",
|
||||||
|
color: "#000",
|
||||||
|
}, {
|
||||||
|
onClick: function(e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
view.drawText(permissionMap[plat][permission]["content"], {
|
||||||
|
top: '210px',
|
||||||
|
height: "80px",
|
||||||
|
left: "8%",
|
||||||
|
width: "84%"
|
||||||
|
}, {
|
||||||
|
whiteSpace: 'normal',
|
||||||
|
size: "14px",
|
||||||
|
align: "left",
|
||||||
|
color: "#656563"
|
||||||
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
view.show()
|
||||||
|
},200)
|
||||||
|
}
|
||||||
|
|
||||||
|
function premissionCheck(permission) {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
let plat = isIos ? "ios" : "android";
|
||||||
|
if (isIos) { // ios
|
||||||
|
// const camera = permission.judgeIosPermission("camera");//判断ios是否给予摄像头权限
|
||||||
|
// //ios相册没权限,系统会自动弹出授权框
|
||||||
|
// //let photoLibrary = permission.judgeIosPermission("photoLibrary");//判断ios是否给予相册权限
|
||||||
|
// if(camera){
|
||||||
|
// resolve();
|
||||||
|
// }else{
|
||||||
|
// reject('需要开启相机使用权限');
|
||||||
|
// }
|
||||||
|
resolve(1)
|
||||||
|
} else { // android
|
||||||
|
let permission_arr = permissionMap[plat][permission]["name"].split(",");
|
||||||
|
|
||||||
|
let flag = true;
|
||||||
|
for(let i = 0;i<permission_arr.length;i++) {
|
||||||
|
let status = plus.navigator.checkPermission(permission_arr[i]);
|
||||||
|
if(status == "undetermined") {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flag == false) { // 未完全授权
|
||||||
|
showViewDesc(permission);
|
||||||
|
requestAndroidPermission(permissionMap[plat][permission]["name"]).then((res) => {
|
||||||
|
viewShow = false;
|
||||||
|
setTimeout(()=>{
|
||||||
|
viewShow = true;
|
||||||
|
},120)
|
||||||
|
view.close();
|
||||||
|
// if (res == -1) {
|
||||||
|
// uni.showModal({
|
||||||
|
// title: '提示',
|
||||||
|
// content: '操作权限已被拒绝,请手动前往设置',
|
||||||
|
// confirmText: "立即设置",
|
||||||
|
// success: (res) => {
|
||||||
|
// if (res.confirm) {
|
||||||
|
// gotoAppPermissionSetting()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
resolve(res)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
resolve(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
judgeIosPermission: judgeIosPermission,
|
judgeIosPermission: judgeIosPermission,
|
||||||
requestAndroidPermission: requestAndroidPermission,
|
requestAndroidPermission: requestAndroidPermission,
|
||||||
checkSystemEnableLocation: checkSystemEnableLocation,
|
checkSystemEnableLocation: checkSystemEnableLocation,
|
||||||
gotoAppPermissionSetting: gotoAppPermissionSetting
|
gotoAppPermissionSetting: gotoAppPermissionSetting,
|
||||||
|
premissionCheck: premissionCheck
|
||||||
}
|
}
|
||||||
|
|||||||
272
js_sdk/wa-permission11/permission.js
Normal file
@@ -0,0 +1,272 @@
|
|||||||
|
/**
|
||||||
|
* 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启
|
||||||
|
*/
|
||||||
|
|
||||||
|
var isIos
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
isIos = (plus.os.name == "iOS")
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// 判断推送权限是否开启
|
||||||
|
function judgeIosPermissionPush() {
|
||||||
|
var result = false;
|
||||||
|
var UIApplication = plus.ios.import("UIApplication");
|
||||||
|
var app = UIApplication.sharedApplication();
|
||||||
|
var enabledTypes = 0;
|
||||||
|
if (app.currentUserNotificationSettings) {
|
||||||
|
var settings = app.currentUserNotificationSettings();
|
||||||
|
enabledTypes = settings.plusGetAttribute("types");
|
||||||
|
console.log("enabledTypes1:" + enabledTypes);
|
||||||
|
if (enabledTypes == 0) {
|
||||||
|
console.log("推送权限没有开启");
|
||||||
|
} else {
|
||||||
|
result = true;
|
||||||
|
console.log("已经开启推送功能!")
|
||||||
|
}
|
||||||
|
plus.ios.deleteObject(settings);
|
||||||
|
} else {
|
||||||
|
enabledTypes = app.enabledRemoteNotificationTypes();
|
||||||
|
if (enabledTypes == 0) {
|
||||||
|
console.log("推送权限没有开启!");
|
||||||
|
} else {
|
||||||
|
result = true;
|
||||||
|
console.log("已经开启推送功能!")
|
||||||
|
}
|
||||||
|
console.log("enabledTypes2:" + enabledTypes);
|
||||||
|
}
|
||||||
|
plus.ios.deleteObject(app);
|
||||||
|
plus.ios.deleteObject(UIApplication);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断定位权限是否开启
|
||||||
|
function judgeIosPermissionLocation() {
|
||||||
|
var result = false;
|
||||||
|
var cllocationManger = plus.ios.import("CLLocationManager");
|
||||||
|
var status = cllocationManger.authorizationStatus();
|
||||||
|
result = (status != 2)
|
||||||
|
console.log("定位权限开启:" + result);
|
||||||
|
// 以下代码判断了手机设备的定位是否关闭,推荐另行使用方法 checkSystemEnableLocation
|
||||||
|
/* var enable = cllocationManger.locationServicesEnabled();
|
||||||
|
var status = cllocationManger.authorizationStatus();
|
||||||
|
console.log("enable:" + enable);
|
||||||
|
console.log("status:" + status);
|
||||||
|
if (enable && status != 2) {
|
||||||
|
result = true;
|
||||||
|
console.log("手机定位服务已开启且已授予定位权限");
|
||||||
|
} else {
|
||||||
|
console.log("手机系统的定位没有打开或未给予定位权限");
|
||||||
|
} */
|
||||||
|
plus.ios.deleteObject(cllocationManger);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断麦克风权限是否开启
|
||||||
|
function judgeIosPermissionRecord() {
|
||||||
|
var result = false;
|
||||||
|
var avaudiosession = plus.ios.import("AVAudioSession");
|
||||||
|
var avaudio = avaudiosession.sharedInstance();
|
||||||
|
var permissionStatus = avaudio.recordPermission();
|
||||||
|
console.log("permissionStatus:" + permissionStatus);
|
||||||
|
if (permissionStatus == 1684369017 || permissionStatus == 1970168948) {
|
||||||
|
console.log("麦克风权限没有开启");
|
||||||
|
} else {
|
||||||
|
result = true;
|
||||||
|
console.log("麦克风权限已经开启");
|
||||||
|
}
|
||||||
|
plus.ios.deleteObject(avaudiosession);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断相机权限是否开启
|
||||||
|
function judgeIosPermissionCamera() {
|
||||||
|
var result = false;
|
||||||
|
var AVCaptureDevice = plus.ios.import("AVCaptureDevice");
|
||||||
|
var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide');
|
||||||
|
console.log("authStatus:" + authStatus);
|
||||||
|
if (authStatus == 3) {
|
||||||
|
result = true;
|
||||||
|
console.log("相机权限已经开启");
|
||||||
|
} else {
|
||||||
|
console.log("相机权限没有开启");
|
||||||
|
}
|
||||||
|
plus.ios.deleteObject(AVCaptureDevice);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断相册权限是否开启
|
||||||
|
function judgeIosPermissionPhotoLibrary() {
|
||||||
|
var result = false;
|
||||||
|
var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
|
||||||
|
var authStatus = PHPhotoLibrary.authorizationStatus();
|
||||||
|
console.log("authStatus:" + authStatus);
|
||||||
|
if (authStatus == 3) {
|
||||||
|
result = true;
|
||||||
|
console.log("相册权限已经开启");
|
||||||
|
} else {
|
||||||
|
console.log("相册权限没有开启");
|
||||||
|
}
|
||||||
|
plus.ios.deleteObject(PHPhotoLibrary);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断通讯录权限是否开启
|
||||||
|
function judgeIosPermissionContact() {
|
||||||
|
var result = false;
|
||||||
|
var CNContactStore = plus.ios.import("CNContactStore");
|
||||||
|
var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0);
|
||||||
|
if (cnAuthStatus == 3) {
|
||||||
|
result = true;
|
||||||
|
console.log("通讯录权限已经开启");
|
||||||
|
} else {
|
||||||
|
console.log("通讯录权限没有开启");
|
||||||
|
}
|
||||||
|
plus.ios.deleteObject(CNContactStore);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断日历权限是否开启
|
||||||
|
function judgeIosPermissionCalendar() {
|
||||||
|
var result = false;
|
||||||
|
var EKEventStore = plus.ios.import("EKEventStore");
|
||||||
|
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0);
|
||||||
|
if (ekAuthStatus == 3) {
|
||||||
|
result = true;
|
||||||
|
console.log("日历权限已经开启");
|
||||||
|
} else {
|
||||||
|
console.log("日历权限没有开启");
|
||||||
|
}
|
||||||
|
plus.ios.deleteObject(EKEventStore);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断备忘录权限是否开启
|
||||||
|
function judgeIosPermissionMemo() {
|
||||||
|
var result = false;
|
||||||
|
var EKEventStore = plus.ios.import("EKEventStore");
|
||||||
|
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1);
|
||||||
|
if (ekAuthStatus == 3) {
|
||||||
|
result = true;
|
||||||
|
console.log("备忘录权限已经开启");
|
||||||
|
} else {
|
||||||
|
console.log("备忘录权限没有开启");
|
||||||
|
}
|
||||||
|
plus.ios.deleteObject(EKEventStore);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Android权限查询
|
||||||
|
function requestAndroidPermission(permissionID) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
plus.android.requestPermissions(
|
||||||
|
[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
|
||||||
|
function(resultObj) {
|
||||||
|
var result = 0;
|
||||||
|
for (var i = 0; i < resultObj.granted.length; i++) {
|
||||||
|
var grantedPermission = resultObj.granted[i];
|
||||||
|
console.log('已获取的权限:' + grantedPermission);
|
||||||
|
result = 1
|
||||||
|
}
|
||||||
|
for (var i = 0; i < resultObj.deniedPresent.length; i++) {
|
||||||
|
var deniedPresentPermission = resultObj.deniedPresent[i];
|
||||||
|
console.log('拒绝本次申请的权限:' + deniedPresentPermission);
|
||||||
|
result = 0
|
||||||
|
}
|
||||||
|
for (var i = 0; i < resultObj.deniedAlways.length; i++) {
|
||||||
|
var deniedAlwaysPermission = resultObj.deniedAlways[i];
|
||||||
|
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
|
||||||
|
result = -1
|
||||||
|
}
|
||||||
|
resolve(result);
|
||||||
|
// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
|
||||||
|
// if (result != 1) {
|
||||||
|
// gotoAppPermissionSetting()
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
function(error) {
|
||||||
|
console.log('申请权限错误:' + error.code + " = " + error.message);
|
||||||
|
resolve({
|
||||||
|
code: error.code,
|
||||||
|
message: error.message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 使用一个方法,根据参数判断权限
|
||||||
|
function judgeIosPermission(permissionID) {
|
||||||
|
if (permissionID == "location") {
|
||||||
|
return judgeIosPermissionLocation()
|
||||||
|
} else if (permissionID == "camera") {
|
||||||
|
return judgeIosPermissionCamera()
|
||||||
|
} else if (permissionID == "photoLibrary") {
|
||||||
|
return judgeIosPermissionPhotoLibrary()
|
||||||
|
} else if (permissionID == "record") {
|
||||||
|
return judgeIosPermissionRecord()
|
||||||
|
} else if (permissionID == "push") {
|
||||||
|
return judgeIosPermissionPush()
|
||||||
|
} else if (permissionID == "contact") {
|
||||||
|
return judgeIosPermissionContact()
|
||||||
|
} else if (permissionID == "calendar") {
|
||||||
|
return judgeIosPermissionCalendar()
|
||||||
|
} else if (permissionID == "memo") {
|
||||||
|
return judgeIosPermissionMemo()
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跳转到**应用**的权限页面
|
||||||
|
function gotoAppPermissionSetting() {
|
||||||
|
if (isIos) {
|
||||||
|
var UIApplication = plus.ios.import("UIApplication");
|
||||||
|
var application2 = UIApplication.sharedApplication();
|
||||||
|
var NSURL2 = plus.ios.import("NSURL");
|
||||||
|
// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
|
||||||
|
var setting2 = NSURL2.URLWithString("app-settings:");
|
||||||
|
application2.openURL(setting2);
|
||||||
|
|
||||||
|
plus.ios.deleteObject(setting2);
|
||||||
|
plus.ios.deleteObject(NSURL2);
|
||||||
|
plus.ios.deleteObject(application2);
|
||||||
|
} else {
|
||||||
|
// console.log(plus.device.vendor);
|
||||||
|
var Intent = plus.android.importClass("android.content.Intent");
|
||||||
|
var Settings = plus.android.importClass("android.provider.Settings");
|
||||||
|
var Uri = plus.android.importClass("android.net.Uri");
|
||||||
|
var mainActivity = plus.android.runtimeMainActivity();
|
||||||
|
var intent = new Intent();
|
||||||
|
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||||
|
var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
|
||||||
|
intent.setData(uri);
|
||||||
|
mainActivity.startActivity(intent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查系统的设备服务是否开启
|
||||||
|
// var checkSystemEnableLocation = async function () {
|
||||||
|
function checkSystemEnableLocation() {
|
||||||
|
if (isIos) {
|
||||||
|
var result = false;
|
||||||
|
var cllocationManger = plus.ios.import("CLLocationManager");
|
||||||
|
var result = cllocationManger.locationServicesEnabled();
|
||||||
|
console.log("系统定位开启:" + result);
|
||||||
|
plus.ios.deleteObject(cllocationManger);
|
||||||
|
return result;
|
||||||
|
} else {
|
||||||
|
var context = plus.android.importClass("android.content.Context");
|
||||||
|
var locationManager = plus.android.importClass("android.location.LocationManager");
|
||||||
|
var main = plus.android.runtimeMainActivity();
|
||||||
|
var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
|
||||||
|
var result = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER);
|
||||||
|
console.log("系统定位开启:" + result);
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
judgeIosPermission: judgeIosPermission,
|
||||||
|
requestAndroidPermission: requestAndroidPermission,
|
||||||
|
checkSystemEnableLocation: checkSystemEnableLocation,
|
||||||
|
gotoAppPermissionSetting: gotoAppPermissionSetting
|
||||||
|
}
|
||||||
4
main.js
@@ -28,7 +28,7 @@ Vue.prototype.$apkUrl = "https://a.app.qq.com/o/simple.jsp?pkgname=com.cn.medici
|
|||||||
|
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
|
Vue.prototype.$platform = res.platform;
|
||||||
Vue.prototype.iosHidden = true;
|
Vue.prototype.iosHidden = true;
|
||||||
if (res.platform == 'ios') {
|
if (res.platform == 'ios') {
|
||||||
|
|
||||||
@@ -106,6 +106,8 @@ import commonAddress from '@/pages/component/commonComponents/address/index.vue'
|
|||||||
Vue.component('common-address', commonAddress);
|
Vue.component('common-address', commonAddress);
|
||||||
import commonSelectGoods from '@/pages/component/commonComponents/selectGoods.vue'
|
import commonSelectGoods from '@/pages/component/commonComponents/selectGoods.vue'
|
||||||
Vue.component('common-select-goods', commonSelectGoods);
|
Vue.component('common-select-goods', commonSelectGoods);
|
||||||
|
import commonVideoIos from '@/pages/component/commonComponents/video/ios.nvue'
|
||||||
|
Vue.component('common-video-ios', commonVideoIos);
|
||||||
// import musicPlay from '@/components/music.vue'
|
// import musicPlay from '@/components/music.vue'
|
||||||
// Vue.component('music-play', musicPlay);
|
// Vue.component('music-play', musicPlay);
|
||||||
|
|
||||||
|
|||||||
@@ -12,12 +12,19 @@
|
|||||||
"src" : "图片路径"
|
"src" : "图片路径"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.15",
|
||||||
"versionCode" : 100,
|
"versionCode" : 1015,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
"nvueCompiler" : "weex",
|
||||||
"compatible" : {
|
"compatible" : {
|
||||||
"ignoreVersion" : true
|
"ignoreVersion" : true
|
||||||
},
|
},
|
||||||
|
"screenOrientation" : [
|
||||||
|
"portrait-primary",
|
||||||
|
"portrait-secondary",
|
||||||
|
"landscape-primary",
|
||||||
|
"landscape-secondary"
|
||||||
|
],
|
||||||
"privacy" : {
|
"privacy" : {
|
||||||
"prompt" : "template",
|
"prompt" : "template",
|
||||||
"template" : {
|
"template" : {
|
||||||
@@ -31,8 +38,8 @@
|
|||||||
"Payment" : {},
|
"Payment" : {},
|
||||||
"Share" : {},
|
"Share" : {},
|
||||||
"Camera" : {},
|
"Camera" : {},
|
||||||
"VideoPlayer" : {},
|
"OAuth" : {},
|
||||||
"OAuth" : {}
|
"VideoPlayer" : {}
|
||||||
},
|
},
|
||||||
"distribute" : {
|
"distribute" : {
|
||||||
"apple" : {
|
"apple" : {
|
||||||
@@ -120,8 +127,9 @@
|
|||||||
"urltypes" : "medicine",
|
"urltypes" : "medicine",
|
||||||
"urlschemewhitelist" : "nuttyreading,zmzm",
|
"urlschemewhitelist" : "nuttyreading,zmzm",
|
||||||
"privacyDescription" : {
|
"privacyDescription" : {
|
||||||
"NSPhotoLibraryUsageDescription" : "为了给您提供修改头像的功能",
|
"NSPhotoLibraryUsageDescription" : "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用",
|
||||||
"NSCameraUsageDescription" : "为了给您提供修改头像的功能"
|
"NSCameraUsageDescription" : "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用",
|
||||||
|
"NSPhotoLibraryAddUsageDescription" : "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"icons" : {
|
"icons" : {
|
||||||
@@ -165,6 +173,13 @@
|
|||||||
"nativePlugins" : {},
|
"nativePlugins" : {},
|
||||||
"uniStatistics" : {
|
"uniStatistics" : {
|
||||||
"enable" : true
|
"enable" : true
|
||||||
|
},
|
||||||
|
"safearea" : {
|
||||||
|
//安全区域配置,仅iOS平台生效
|
||||||
|
"bottom" : {
|
||||||
|
// 底部安全区域配置
|
||||||
|
"offset" : "none" // 底部安全区域偏移,"none"表示不空出安全区域,"auto"自动计算空出安全区域,默认值为"none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 5+App特有相关
|
// 5+App特有相关
|
||||||
|
|||||||
BIN
node_modules.zip
Normal file
31
pages.json
@@ -366,12 +366,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
// ios课程播放
|
||||||
"path": "pages/course/chapterDetail",
|
"path": "pages/course/chapterDetail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "章节详情",
|
"navigationBarTitleText": "章节详情",
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// Andriod课程播放
|
||||||
|
"path": "pages/course/chapterDetailAndorid",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "章节详情",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/course/courseSet",
|
"path": "pages/course/courseSet",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -538,6 +547,14 @@
|
|||||||
"navigationBarTitleText": "学术webView预览页面",
|
"navigationBarTitleText": "学术webView预览页面",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/user/workOrder",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "工单提交页面",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
@@ -561,17 +578,17 @@
|
|||||||
"selectedIconPath": "static/tab/icon1_y.png",
|
"selectedIconPath": "static/tab/icon1_y.png",
|
||||||
"text": "首页"
|
"text": "首页"
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
"pagePath": "pages/peanut/shopping",
|
// "pagePath": "pages/peanut/shopping",
|
||||||
"iconPath": "static/tab/tab_nor_02.png",
|
// "iconPath": "static/tab/tab_nor_02.png",
|
||||||
"selectedIconPath": "static/tab/tab_cur_02.png",
|
// "selectedIconPath": "static/tab/tab_cur_02.png",
|
||||||
"text": "购物车"
|
// "text": "购物车"
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
"pagePath": "pages/bookShop/orderList",
|
"pagePath": "pages/bookShop/orderList",
|
||||||
"iconPath": "static/tab/order.png",
|
"iconPath": "static/tab/order.png",
|
||||||
"selectedIconPath": "static/tab/order_active.png",
|
"selectedIconPath": "static/tab/order_active.png",
|
||||||
"text": "订单"
|
"text": "我的订单"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/taihu/index",
|
"pagePath": "pages/taihu/index",
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="quanyi_item " v-for="(v, i) in qunyiList"
|
<view class="quanyi_item " v-for="(v, i) in qunyiList" :key="i"
|
||||||
@click="handleClickQuanyi(v, i, item)" style="font-weight: 700;color:#71d5a1;">
|
@click="handleClickQuanyi(v, i, item)" style="font-weight: 700;color:#71d5a1;">
|
||||||
<view style="width: 100%;display: flex;
|
<view style="width: 100%;display: flex;
|
||||||
align-items: center;">
|
align-items: center;">
|
||||||
|
|||||||
@@ -286,7 +286,10 @@
|
|||||||
<span style="color: #666;margin-right: 10rpx;float: left;">发货时间 : </span>
|
<span style="color: #666;margin-right: 10rpx;float: left;">发货时间 : </span>
|
||||||
<text style="font-size: 24rpx;color: #666;">{{orderContet.shippingTime}}</text>
|
<text style="font-size: 24rpx;color: #666;">{{orderContet.shippingTime}}</text>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class=""></view>
|
|
||||||
|
</view>
|
||||||
|
<view class="" style="text-align: center; width: 100%;">
|
||||||
|
<text @click="gotoWorkOrder" style="color: cadetblue; font-size: 26rpx;">订单有问题?去申诉</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -536,6 +539,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
gotoWorkOrder(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/user/workOrder?name=order`
|
||||||
|
})
|
||||||
|
},
|
||||||
async goBuyJie(data) {
|
async goBuyJie(data) {
|
||||||
console.log("index at line 532:", data);
|
console.log("index at line 532:", data);
|
||||||
if (data.text == "继续付款") {
|
if (data.text == "继续付款") {
|
||||||
@@ -923,7 +931,7 @@ export default {
|
|||||||
color: "#fff",
|
color: "#fff",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.orderContet.orderStatus == 0) {
|
if (this.orderContet.orderStatus == 0 && this.orderContet.paymentMethod != 3) {
|
||||||
this.customButton.push({
|
this.customButton.push({
|
||||||
width: "160rpx",
|
width: "160rpx",
|
||||||
text: "继续付款",
|
text: "继续付款",
|
||||||
@@ -1070,16 +1078,11 @@ export default {
|
|||||||
} else if (payItem.paymentMethod == 3) {
|
} else if (payItem.paymentMethod == 3) {
|
||||||
// 苹果充值
|
// 苹果充值
|
||||||
console.log("苹果二次支付");
|
console.log("苹果二次支付");
|
||||||
if (this.isAndorid) {
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提示",
|
content:'apple内购订单不支持继续支付,请重新发起支付申请并完成支付',
|
||||||
showCancel: false,
|
confirmText:'好的',
|
||||||
content:
|
showCancel:false
|
||||||
"很抱歉,当前订单属于苹果系统内购订单,安卓系统无法完成支付操作,您可切换到苹果系统进行支付,也可以取消该订单,并重新下单",
|
})
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.iphonepay(payItem);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -395,7 +395,7 @@
|
|||||||
<view class="right flexbox opbtns">
|
<view class="right flexbox opbtns">
|
||||||
<view
|
<view
|
||||||
class="orderstatusbtn orderstatusbtn_success"
|
class="orderstatusbtn orderstatusbtn_success"
|
||||||
v-if="slotProps.row.orderStatus == 0"
|
v-if="slotProps.row.orderStatus == 0 && slotProps.row.paymentMethod != 3"
|
||||||
@click.stop="goPay(slotProps.row)"
|
@click.stop="goPay(slotProps.row)"
|
||||||
>继续付款</view
|
>继续付款</view
|
||||||
>
|
>
|
||||||
@@ -897,7 +897,7 @@ export default {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res, "内容获取成功");
|
// console.log(res, "内容获取成功");
|
||||||
that.pagination.total = res.data.total;
|
that.pagination.total = res.data.total;
|
||||||
if (res.data.total == 0) {
|
if (res.data.total == 0) {
|
||||||
this.isLoadingHide = true;
|
this.isLoadingHide = true;
|
||||||
@@ -948,15 +948,7 @@ export default {
|
|||||||
);
|
);
|
||||||
} else if (payItem.paymentMethod == 1) {
|
} else if (payItem.paymentMethod == 1) {
|
||||||
console.log("微信支付");
|
console.log("微信支付");
|
||||||
// console.log(this.isAndorid)
|
|
||||||
if (this.isAndorid == false) {
|
|
||||||
uni.showModal({
|
|
||||||
title: "提示",
|
|
||||||
content: "很抱歉,苹果系统暂不支持微信支付",
|
|
||||||
showCancel: false,
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
let data1 = {
|
let data1 = {
|
||||||
orderSn: payItem.orderSn,
|
orderSn: payItem.orderSn,
|
||||||
buyOrderId: null,
|
buyOrderId: null,
|
||||||
@@ -985,20 +977,24 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
} else if (payItem.paymentMethod == 3 && this.ordersListTab == 0 ) {
|
||||||
} else if (payItem.paymentMethod == 3) {
|
|
||||||
// 苹果充值
|
// 苹果充值
|
||||||
console.log("苹果二次支付");
|
console.log("苹果二次支付");
|
||||||
if (this.isAndorid) {
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提示",
|
content:'apple内购订单不支持继续支付,请重新发起支付申请并完成支付',
|
||||||
showCancel: false,
|
confirmText:'好的',
|
||||||
content:
|
showCancel:false
|
||||||
"很抱歉,当前订单属于苹果系统内购订单,安卓系统无法完成支付操作,您可切换到苹果系统进行支付,也可以取消该订单,并重新下单",
|
})
|
||||||
});
|
// if (this.isAndorid) {
|
||||||
} else {
|
// uni.showModal({
|
||||||
this.iphonepay(payItem);
|
// title: "提示",
|
||||||
}
|
// showCancel: false,
|
||||||
|
// content:
|
||||||
|
// "很抱歉,当前订单属于苹果系统内购订单,安卓系统无法完成支付操作,您可切换到苹果系统进行支付,也可以取消该订单,并重新下单",
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// this.iphonepay(payItem);
|
||||||
|
// }
|
||||||
}else if (payItem.paymentMethod == 4){
|
}else if (payItem.paymentMethod == 4){
|
||||||
console.log('天医币二次支付')
|
console.log('天医币二次支付')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<view v-for="(item, index) in argee" :key="index" style="font-size: 32rpx;">
|
<view v-for="(item, index) in argee" :key="index" style="font-size: 32rpx;">
|
||||||
<radio class="agreeRadio" :value="item.id" :checked="item.id == radioValue"
|
<radio class="agreeRadio" :value="item.id" :checked="item.id == radioValue"
|
||||||
color="#258feb" @click="radioCheck(index)"></radio>
|
color="#258feb" @click="radioCheck(index)"></radio>
|
||||||
默认收获地址
|
默认收货地址
|
||||||
</view>
|
</view>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ import { mapState } from "vuex";
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
courseDescription, //课程说明
|
courseDescription, //课程说明
|
||||||
editAddress, //编辑收获地址
|
editAddress, //编辑收货地址
|
||||||
},
|
},
|
||||||
props: ["backState", "type"],
|
props: ["backState", "type"],
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="richDetail">
|
<view class="richDetail">
|
||||||
<!-- 公共组件-每个页面必须引入 -->
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
|
|
||||||
<view
|
<view
|
||||||
scroll-x="true"
|
scroll-x="true"
|
||||||
class="detail_title video_box"
|
class="detail_title video_box"
|
||||||
@@ -28,13 +27,16 @@
|
|||||||
import $http from "@/config/requestConfig.js";
|
import $http from "@/config/requestConfig.js";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
props: ["detailInfo", "dataList", "currentVideo"],
|
props: ["detailInfo", "dataList", "currentVideo", "changeVideoLock"],
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
onLoad(options) {},
|
onLoad(options) {},
|
||||||
onHide() {},
|
onHide() {},
|
||||||
|
mounted() {
|
||||||
|
console.log('currentVideo播放列表收到的--',this.currentVideo)
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["userInfo"]),
|
...mapState(["userInfo"]),
|
||||||
},
|
},
|
||||||
@@ -47,8 +49,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClick(data) {
|
handleClick(data) {
|
||||||
|
if(this.changeVideoLock){
|
||||||
|
return
|
||||||
|
}
|
||||||
console.log("data at line 35:", data);
|
console.log("data at line 35:", data);
|
||||||
|
|
||||||
this.$emit("open", data);
|
this.$emit("open", data);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<view class="detail_title" v-if="detailInfo.title">{{
|
<view class="detail_title" v-if="detailInfo.title">{{
|
||||||
detailInfo.title
|
detailInfo.title
|
||||||
}}</view>
|
}}</view>
|
||||||
<slot name="richHeadImg"></slot>
|
<slot name="richHeadImg" @click="handleClickRichHeadImg"></slot>
|
||||||
<view class="rich_box" v-if="detailInfo.content">
|
<view class="rich_box" v-if="detailInfo.content">
|
||||||
<rich-text
|
<rich-text
|
||||||
:nodes="detailInfo.content | formatRichText"
|
:nodes="detailInfo.content | formatRichText"
|
||||||
@@ -45,7 +45,10 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userInfo']),
|
...mapState(['userInfo']),
|
||||||
}, filters: {
|
},
|
||||||
|
|
||||||
|
|
||||||
|
filters: {
|
||||||
/**
|
/**
|
||||||
* 处理富文本里的图片宽度自适应
|
* 处理富文本里的图片宽度自适应
|
||||||
* 1.去掉img标签里的style、width、height属性
|
* 1.去掉img标签里的style、width、height属性
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ import { mapState, mapMutations } from "vuex";
|
|||||||
|
|
||||||
const { platform } = uni.getSystemInfoSync();
|
const { platform } = uni.getSystemInfoSync();
|
||||||
|
|
||||||
import permision from "@/js_sdk/wa-permission/permission.js";
|
import permision from "@/js_sdk/wa-permission11/permission.js";
|
||||||
|
|
||||||
const definitions = [
|
const definitions = [
|
||||||
{
|
{
|
||||||
|
|||||||
1439
pages/component/commonComponents/video/ios.nvue
Normal file
@@ -3,11 +3,7 @@
|
|||||||
<!-- 公共组件-每个页面必须引入 -->
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<template v-show="!screenLoading">
|
<template v-show="!screenLoading">
|
||||||
<z-nav-bar
|
<z-nav-bar bgColor="#333" fontColor="#fff" title="教学内容"></z-nav-bar>
|
||||||
bgColor="#333"
|
|
||||||
fontColor="#fff"
|
|
||||||
:title="options.navTitle"
|
|
||||||
></z-nav-bar>
|
|
||||||
|
|
||||||
<view
|
<view
|
||||||
class="contentBox curriculum_box"
|
class="contentBox curriculum_box"
|
||||||
@@ -15,16 +11,19 @@
|
|||||||
isFullScreen ? 'background:#000' : ''
|
isFullScreen ? 'background:#000' : ''
|
||||||
}`"
|
}`"
|
||||||
>
|
>
|
||||||
|
<!-- 加密视频 -->
|
||||||
<view :style="`background:#000`">
|
<view :style="`background:#000`">
|
||||||
<common-video
|
<common-video-ios
|
||||||
@changeScreen="changeScreen"
|
@changeScreen="changeScreen"
|
||||||
@changeScreenLoading="changeScreenLoading"
|
@changeScreenLoading="changeScreenLoading"
|
||||||
v-if="isfresh"
|
v-if="isfresh"
|
||||||
ref="commonVideo"
|
ref="commonVideo"
|
||||||
|
:videoTitle="curriculumData.title"
|
||||||
:currentVideo="currentVideo"
|
:currentVideo="currentVideo"
|
||||||
|
:noRecored = "noRecored"
|
||||||
:currentVideoList="videoArray"
|
:currentVideoList="videoArray"
|
||||||
>
|
>
|
||||||
</common-video>
|
</common-video-ios>
|
||||||
<view style="height: 200px" v-else></view>
|
<view style="height: 200px" v-else></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -49,11 +48,16 @@
|
|||||||
>视频教学</view
|
>视频教学</view
|
||||||
>
|
>
|
||||||
<view class="scroll-view-item">
|
<view class="scroll-view-item">
|
||||||
<view style="padding: 20rpx; margin-bottom: 40rpx">
|
<view style="padding: 20rpx; font-size: 26rpx">
|
||||||
{{ curriculumData.title }}
|
课程:{{ options.navTitle }}
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
style="padding: 20rpx; margin-bottom: 40rpx; font-size: 26rpx"
|
||||||
|
>
|
||||||
|
章节:{{ curriculumData.title }}
|
||||||
</view>
|
</view>
|
||||||
<common-curriculum-video
|
<common-curriculum-video
|
||||||
v-if="videoArray.length > 0"
|
v-if="videoArray && videoArray.length > 0"
|
||||||
:detailInfo="curriculumData"
|
:detailInfo="curriculumData"
|
||||||
:currentVideo="currentVideo"
|
:currentVideo="currentVideo"
|
||||||
:dataList="videoArray"
|
:dataList="videoArray"
|
||||||
@@ -71,6 +75,8 @@
|
|||||||
<common-rich-detail :detailInfo="{ ...curriculumData, title: '' }">
|
<common-rich-detail :detailInfo="{ ...curriculumData, title: '' }">
|
||||||
<template #richHeadImg>
|
<template #richHeadImg>
|
||||||
<image
|
<image
|
||||||
|
v-if="curriculumData.imgUrl"
|
||||||
|
@click="previewImage(curriculumData.imgUrl)"
|
||||||
:src="curriculumData.imgUrl"
|
:src="curriculumData.imgUrl"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
class="headImage"
|
class="headImage"
|
||||||
@@ -222,7 +228,18 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<view style="background-color: red;position: fixed;top: 0;left: 0;right: 0;bottom: 0;" v-show="screenLoading" > </view>
|
<view
|
||||||
|
style="
|
||||||
|
background-color: red;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
"
|
||||||
|
v-show="screenLoading"
|
||||||
|
>
|
||||||
|
</view>
|
||||||
<!-- <u-modal
|
<!-- <u-modal
|
||||||
:show="show"
|
:show="show"
|
||||||
:title="modalInfo.title"
|
:title="modalInfo.title"
|
||||||
@@ -313,6 +330,7 @@ export default {
|
|||||||
limitTitle: "提示",
|
limitTitle: "提示",
|
||||||
limitContent: "",
|
limitContent: "",
|
||||||
scrollViewHeight: 0,
|
scrollViewHeight: 0,
|
||||||
|
noRecored:null, // 是否为试听资源
|
||||||
urlList: {
|
urlList: {
|
||||||
detail: "sociology/course/getCourseCatalogueChapterDetail",
|
detail: "sociology/course/getCourseCatalogueChapterDetail",
|
||||||
curriculumInfo: "app/phone.do?getCourseInfo",
|
curriculumInfo: "app/phone.do?getCourseInfo",
|
||||||
@@ -320,31 +338,49 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
plus.screen.lockOrientation("default");
|
plus.screen.lockOrientation("default");
|
||||||
|
// #endif
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
this.noRecored = options.noRecored
|
||||||
|
console.log('this.noRecored=>',this.noRecored)
|
||||||
|
this.screenLoading = false;
|
||||||
|
|
||||||
|
this.currentCateIndex = this.options.videoIndex
|
||||||
|
? this.options.videoIndex
|
||||||
|
: 0;
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.screen.unlockOrientation(); //解除锁定屏幕方向
|
||||||
|
plus.screen.lockOrientation("portrait-primary");
|
||||||
|
|
||||||
|
this.getCourseDescriptionData();
|
||||||
|
|
||||||
// this.getUserInfo()
|
// this.getUserInfo()
|
||||||
// this.getCateList()
|
// this.getCateList()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onUnload(){
|
||||||
|
console.log('页面卸载')
|
||||||
|
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.commonVideo.handleEnd();
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
// this.showSearchList = false
|
// this.showSearchList = false
|
||||||
// this.searchList = []
|
// this.searchList = []
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.screenLoading=false
|
|
||||||
|
|
||||||
this.currentCateIndex = this.options.videoIndex?this.options.videoIndex:0;
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
plus.screen.unlockOrientation(); //解除锁定屏幕方向
|
|
||||||
plus.screen.lockOrientation("portrait-primary");
|
|
||||||
this.getCourseDescriptionData();
|
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["userInfo"]),
|
...mapState(["userInfo"]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 放大图片
|
||||||
|
|
||||||
//课程详情
|
//课程详情
|
||||||
async gotoDetail(v, index) {
|
async gotoDetail(v, index) {
|
||||||
console.log(
|
console.log(
|
||||||
@@ -387,7 +423,7 @@ export default {
|
|||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
initVideo() {
|
initVideo() {
|
||||||
this.screenLoading=false;
|
this.screenLoading = false;
|
||||||
this.isfresh = false;
|
this.isfresh = false;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.isfresh = true;
|
this.isfresh = true;
|
||||||
@@ -400,38 +436,23 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
changeVideo(data) {
|
changeVideo(data) {
|
||||||
console.log('data at line 370:', data)
|
console.log("data at line 370:", data);
|
||||||
|
if (data.id != this.currentVideo.id) {
|
||||||
|
// handleEnd
|
||||||
|
this.$refs.commonVideo.handleEnd();
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
this.currentVideo = data;
|
this.currentVideo = data;
|
||||||
this.initVideo();
|
this.initVideo();
|
||||||
this.isOpenMp3 = false;
|
this.isOpenMp3 = false;
|
||||||
|
}, 500);
|
||||||
|
} else {
|
||||||
|
this.currentVideo = data;
|
||||||
|
this.initVideo();
|
||||||
|
this.isOpenMp3 = false;
|
||||||
|
}
|
||||||
|
|
||||||
console.log("data at line 380111111111111111111:", data.type);
|
console.log("data at line 380111111111111111111:", data.type);
|
||||||
|
|
||||||
// var mynavData = JSON.stringify(data); // 这里转换成 字符串
|
|
||||||
|
|
||||||
// if (data.type == 0 || data.type == 2) {
|
|
||||||
// //1 mp4 2 mp3
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: `/pages/curriculum/order/curriculum/videoDetail?data=${mynavData}`,
|
|
||||||
// });
|
|
||||||
// } else if (data.type == 1) {
|
|
||||||
// //视频云点播
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: `/pages/curriculum/order/curriculum/videoDetailOss?data=${mynavData}`,
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// else if (data.type == 2) {
|
|
||||||
// //mp3
|
|
||||||
// this.isOpenMp3 = true;
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// this.$refs.mp3Detail.init({ data: mynavData });
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// uni.navigateTo({
|
|
||||||
// // url: '../bookShop/commodityDetail?id=' + item.id
|
|
||||||
// url: `/pages/curriculum/order/curriculum/detail?navTitle=${v.title}&title=${v.title}&oid=${v.oid}`,
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
hancleModalCancel() {
|
hancleModalCancel() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
@@ -450,12 +471,6 @@ export default {
|
|||||||
...this.taiHuClassInfo,
|
...this.taiHuClassInfo,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
// $mars.progressBegin('申请中...');
|
|
||||||
// $mars.post(customerType, 'applyRelearn', data, function (ret) {
|
|
||||||
// api.hideProgress();
|
|
||||||
|
|
||||||
// fnLoadDataGrid();
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//课程详情
|
//课程详情
|
||||||
@@ -497,6 +512,16 @@ export default {
|
|||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
that.curriculumData = res.data.detail;
|
that.curriculumData = res.data.detail;
|
||||||
that.videoArray = res.data.videos;
|
that.videoArray = res.data.videos;
|
||||||
|
console.log("that.videoArray at line 这是关联的视频519:", res);
|
||||||
|
var isHaveHistorySeekVideo = that.videoArray.findIndex(
|
||||||
|
(e) => e.id == res.data.current
|
||||||
|
);
|
||||||
|
console.log(
|
||||||
|
"isHaveHistorySeekVideo at line 522:",
|
||||||
|
isHaveHistorySeekVideo
|
||||||
|
);
|
||||||
|
that.currentCateIndex =
|
||||||
|
isHaveHistorySeekVideo != -1 ? isHaveHistorySeekVideo : 0;
|
||||||
if (that.videoArray.length > 0) {
|
if (that.videoArray.length > 0) {
|
||||||
this.currentVideo = that.videoArray[that.currentCateIndex];
|
this.currentVideo = that.videoArray[that.currentCateIndex];
|
||||||
this.initVideo();
|
this.initVideo();
|
||||||
@@ -830,7 +855,7 @@ export default {
|
|||||||
|
|
||||||
// 放大图片
|
// 放大图片
|
||||||
previewImage(url) {
|
previewImage(url) {
|
||||||
console.log(url);
|
console.log("这是点击了图片啊啊啊啊", url);
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: [url],
|
urls: [url],
|
||||||
longPressActions: {
|
longPressActions: {
|
||||||
@@ -934,6 +959,7 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "@/style/mixin.scss";
|
@import "@/style/mixin.scss";
|
||||||
|
|
||||||
.u-grid-list {
|
.u-grid-list {
|
||||||
// height: 40rpx;
|
// height: 40rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
1188
pages/course/chapterDetailAndorid.vue
Normal file
@@ -207,15 +207,15 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-section class="mb-10 graybg" title="留言板" type="line">
|
<!-- <uni-section class="mb-10 graybg" title="留言板" type="line">
|
||||||
<template v-slot:right>
|
<template v-slot:right>
|
||||||
<view class="flexbox" style="align-items: center" @click="addSay()">
|
<view class="flexbox" style="align-items: center" @click="addSay()">
|
||||||
<u-icon name="edit-pen" color="#2979ff" size="28"></u-icon>
|
<u-icon name="edit-pen" color="#2979ff" size="28"></u-icon>
|
||||||
<text>发布留言</text>
|
<text>发布留言</text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</uni-section>
|
</uni-section> -->
|
||||||
<view class="liuyanBox">
|
<view class="liuyanBox" v-if="false">
|
||||||
<view class="" v-if="sayList.length > 0">
|
<view class="" v-if="sayList.length > 0">
|
||||||
<commentsList
|
<commentsList
|
||||||
:sayList="sayList"
|
:sayList="sayList"
|
||||||
@@ -383,7 +383,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<z-navigation></z-navigation>
|
|
||||||
<!-- <music-play :playData="playData"></music-play> -->
|
<!-- <music-play :playData="playData"></music-play> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
v-if="courseInfo.mediaType == 1 && courseInfo.media != ''"
|
v-if="courseInfo.mediaType == 1 && courseInfo.media != ''"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
:change:isClose="renderScript.receiveClose"
|
||||||
ref="videoContent"
|
ref="videoContent"
|
||||||
@tap="renderScript.handleClick"
|
@tap="renderScript.handleClick"
|
||||||
id="url-player-test"
|
id="url-player-test"
|
||||||
@@ -48,6 +49,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isFullScreen: false,
|
isFullScreen: false,
|
||||||
|
isClose: false,
|
||||||
playData: {},
|
playData: {},
|
||||||
Leve1: [],
|
Leve1: [],
|
||||||
Leve2: [],
|
Leve2: [],
|
||||||
@@ -143,13 +145,17 @@ export default {
|
|||||||
//方法
|
//方法
|
||||||
methods: {
|
methods: {
|
||||||
async initVideo(data) {
|
async initVideo(data) {
|
||||||
|
this.isClose = true;
|
||||||
this.videoContext = null;
|
this.videoContext = null;
|
||||||
this.videoContext = uni.createVideoContext("myVideo");
|
this.videoContext = uni.createVideoContext("myVideo");
|
||||||
this.videoId = data.videoId;
|
this.videoId = data.videoId;
|
||||||
this.playAuth = await this.getVideoPath(data.videoId);
|
this.playAuth = await this.getVideoPath(data.videoId);
|
||||||
|
this.isClose = false;
|
||||||
await this.getLive(this.playAuth);
|
await this.getLive(this.playAuth);
|
||||||
},
|
},
|
||||||
async initAudio() {},
|
async initAudio() {
|
||||||
|
this.isClose = true;
|
||||||
|
},
|
||||||
getLive(playAuthsss) {
|
getLive(playAuthsss) {
|
||||||
//playAuth 是播放凭证 通过后端自己根据api去获取,返回时不知道为什么结束会带有 = 有时候甚至是2个 所以要截取等号 不然不能播放
|
//playAuth 是播放凭证 通过后端自己根据api去获取,返回时不知道为什么结束会带有 = 有时候甚至是2个 所以要截取等号 不然不能播放
|
||||||
var playAuth = this.playAuth.replace(/=/g, "");
|
var playAuth = this.playAuth.replace(/=/g, "");
|
||||||
@@ -485,7 +491,16 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
receiveClose(newValue, oldValue, ownerVm, vm) {
|
||||||
|
// //数据变化
|
||||||
|
|
||||||
|
if (this.player&&this.isClose) {
|
||||||
|
this.player.dispose()
|
||||||
|
this.player = null
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
handleClick(event, ownerInstance) {
|
handleClick(event, ownerInstance) {
|
||||||
console.log('event at line 165:', event)
|
console.log('event at line 165:', event)
|
||||||
// this.player.on('ready',function(){
|
// this.player.on('ready',function(){
|
||||||
@@ -664,7 +679,10 @@ export default {
|
|||||||
args: [
|
args: [
|
||||||
'http://101.201.146.165:8088/Pf-EH/statics/uploadFile/2024-05-10/b0f420c7-9178-41ad-9dd6-f59a64a6e190.png']
|
'http://101.201.146.165:8088/Pf-EH/statics/uploadFile/2024-05-10/b0f420c7-9178-41ad-9dd6-f59a64a6e190.png']
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'RateComponent',
|
||||||
|
type: AliPlayerComponent.RateComponent
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<z-nav-bar title="课程价格"></z-nav-bar>
|
<z-nav-bar title="课程价格"></z-nav-bar>
|
||||||
<view class="addVip">
|
<view class="addVip">
|
||||||
<u-alert v-if="" style="
|
<u-alert v-if="isAndorid" style="
|
||||||
width: 100%;
|
width: 100%;
|
||||||
" :title="goBuyTitle" type="warning" :show-icon="true">
|
" :title="goBuyTitle" type="warning" :show-icon="true">
|
||||||
<template slot="rightSlot" slot-scope="slotProps">
|
<template slot="rightSlot" slot-scope="slotProps">
|
||||||
@@ -105,7 +105,8 @@
|
|||||||
proPriceList: [],
|
proPriceList: [],
|
||||||
pricespop: false,
|
pricespop: false,
|
||||||
userMsg: {},
|
userMsg: {},
|
||||||
cartList: []
|
cartList: [],
|
||||||
|
isAndorid:true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//第一次加载
|
//第一次加载
|
||||||
@@ -115,6 +116,7 @@
|
|||||||
// console.log(e, '------')
|
// console.log(e, '------')
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
this.getCoursePriceList1()
|
this.getCoursePriceList1()
|
||||||
|
this.getOS()
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userInfo'])
|
...mapState(['userInfo'])
|
||||||
@@ -138,6 +140,17 @@
|
|||||||
},
|
},
|
||||||
//方法
|
//方法
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获得操作系统
|
||||||
|
getOS() {
|
||||||
|
let oprateOs = "";
|
||||||
|
oprateOs = uni.getSystemInfoSync().platform;
|
||||||
|
// console.log(oprateOs)
|
||||||
|
if (oprateOs == "android") {
|
||||||
|
this.isAndorid = true;
|
||||||
|
} else {
|
||||||
|
this.isAndorid = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
loadMoreCourse(val, i) {
|
loadMoreCourse(val, i) {
|
||||||
console.log(val, 'val',i,'++++++++++++++++')
|
console.log(val, 'val',i,'++++++++++++++++')
|
||||||
let _page = val.subpage
|
let _page = val.subpage
|
||||||
@@ -206,12 +219,13 @@
|
|||||||
},
|
},
|
||||||
// 加入到购物车
|
// 加入到购物车
|
||||||
isAddLink(item) {
|
isAddLink(item) {
|
||||||
|
// console.log('传入购物车',item);
|
||||||
// 统计商品信息
|
// 统计商品信息
|
||||||
let data = {
|
let data = {
|
||||||
"userId": this.userInfo.id,
|
"userId": this.userInfo.id,
|
||||||
"productId": item.productId,
|
"productId": item.productId,
|
||||||
"productAmount": this.productAmount,
|
"productAmount": 1,
|
||||||
"price": item.price
|
"price": item.activityPrice && item.activityPrice != 0 ? item.activityPrice : item.price
|
||||||
}
|
}
|
||||||
// 判断列表是否为空
|
// 判断列表是否为空
|
||||||
if (this.cartList.length > 0) {
|
if (this.cartList.length > 0) {
|
||||||
@@ -284,6 +298,7 @@
|
|||||||
},
|
},
|
||||||
oprate(data) {
|
oprate(data) {
|
||||||
console.log(data, '得到的内容')
|
console.log(data, '得到的内容')
|
||||||
|
|
||||||
if (data.name == 'buy') {
|
if (data.name == 'buy') {
|
||||||
this.buy(data.item)
|
this.buy(data.item)
|
||||||
} else if (data.name == 'gouwuche') {
|
} else if (data.name == 'gouwuche') {
|
||||||
|
|||||||
@@ -360,6 +360,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.jianjie {
|
.jianjie {
|
||||||
|
line-height: 30rpx; height: 60rpx; overflow: hidden;
|
||||||
|
overflow: hidden!important;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@include bov();
|
@include bov();
|
||||||
@@ -377,11 +379,14 @@
|
|||||||
.subCate {
|
.subCate {
|
||||||
padding-top:10px;
|
padding-top:10px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
|
display: flex;
|
||||||
.item {
|
.item {
|
||||||
|
border: 1px solid #bfcad9;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 10px;
|
border-radius: 4px; width: 100%;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-right: 16rpx;
|
margin-right: 16rpx;
|
||||||
padding: 14rpx 30rpx;
|
padding: 14rpx 30rpx;
|
||||||
@@ -392,6 +397,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.item.active {
|
.item.active {
|
||||||
|
border-color: $themeColor;
|
||||||
background-color: $themeColor;
|
background-color: $themeColor;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,14 +36,14 @@
|
|||||||
VIP畅学
|
VIP畅学
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||||
<view class="imgcontainer" @click="onPageJump('/pages/course/myCourseLearn',item.id)">
|
<view class="imgcontainer" @click="onPageJump('/pages/course/courseDetail',item.id)">
|
||||||
<image v-if="item.image && item.image != ''" :src="item.image" mode="aspectFit"></image>
|
<image v-if="item.image && item.image != ''" :src="item.image" mode="aspectFit"></image>
|
||||||
<!-- <image :src="item.image" mode="" @click="goDetail(item.productId)"></image> -->
|
<!-- <image :src="item.image" mode="" @click="goDetail(item.productId)"></image> -->
|
||||||
<!-- <image v-else src="/static/nobg.jpg" mode="widthFix"></image> -->
|
<!-- <image v-else src="/static/nobg.jpg" mode="widthFix"></image> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="buyItems">
|
<view class="buyItems">
|
||||||
<view class="txt555">
|
<view class="txt555">
|
||||||
<view class="" @click="onPageJump('/pages/course/myCourseLearn',item.id)">
|
<view class="" @click="onPageJump('/pages/course/courseDetail',item.id)">
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<!-- 收藏状态{{item.isStudying}} -->
|
<!-- 收藏状态{{item.isStudying}} -->
|
||||||
<text class="add citem" v-if="item.isStudying == 0" @click="addCollection(item,index)">加入在学习</text>
|
<text class="add citem" v-if="item.isStudying == 0" @click="addCollection(item,index)">加入在学习</text>
|
||||||
<text class="del citem" v-else @click="delCollection(item,index)">取消在学习</text>
|
<text class="del citem" v-else @click="delCollection(item,index)">取消在学习</text>
|
||||||
<text class="citem btn_box" @click="onPageJump('/pages/course/myCourseLearn',item.id)">去学习</text>
|
<text class="citem btn_box" @click="onPageJump('/pages/course/courseDetail',item.id)">去学习</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -76,11 +76,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- {{userMsg}} -->
|
<!-- {{userMsg}} -->
|
||||||
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
|
||||||
<view class="imgcontainer" @click="onPageJump('/pages/course/myCourseLearn',item.id)">
|
<view class="imgcontainer" @click="onPageJump('/pages/course/courseDetail',item.id)">
|
||||||
<image :src="item.image" mode="aspectFit"></image>
|
<image :src="item.image" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="buyItems">
|
<view class="buyItems">
|
||||||
<view class="txt555" @click="onPageJump('/pages/course/myCourseLearn',item.id)">
|
<view class="txt555" @click="onPageJump('/pages/course/courseDetail',item.id)">
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
<view class="jianjie" v-html="item.content">
|
<view class="jianjie" v-html="item.content">
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
<view class="collection">
|
<view class="collection">
|
||||||
<!-- <text class="add citem" v-if="item.isStudying == 0" @click="addCollection(item,index)">加入在学习</text> -->
|
<!-- <text class="add citem" v-if="item.isStudying == 0" @click="addCollection(item,index)">加入在学习</text> -->
|
||||||
<text class="del citem" @click="delCollection(item,index)">取消在学习</text>
|
<text class="del citem" @click="delCollection(item,index)">取消在学习</text>
|
||||||
<text class="citem btn_box" @click="onPageJump('/pages/course/myCourseLearn',item.id)">去学习</text>
|
<text class="citem btn_box" @click="onPageJump('/pages/course/courseDetail',item.id)">去学习</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -256,7 +256,10 @@
|
|||||||
onShow() {
|
onShow() {
|
||||||
// 隐藏原生的tabbar
|
// 隐藏原生的tabbar
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.screen.unlockOrientation();
|
||||||
|
plus.screen.lockOrientation("portrait-primary");
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
console.log('触底');
|
console.log('触底');
|
||||||
@@ -318,8 +321,8 @@
|
|||||||
let data = {
|
let data = {
|
||||||
"userId": this.userInfo.id,
|
"userId": this.userInfo.id,
|
||||||
"productId": item.productId,
|
"productId": item.productId,
|
||||||
"productAmount": this.productAmount,
|
"productAmount": 1,
|
||||||
"price": item.price
|
"price": item.activityPrice && item.activityPrice != 0 ? item.activityPrice : item.price
|
||||||
}
|
}
|
||||||
// 判断列表是否为空
|
// 判断列表是否为空
|
||||||
if (this.cartList.length > 0) {
|
if (this.cartList.length > 0) {
|
||||||
@@ -851,6 +854,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.jianjie {
|
.jianjie {
|
||||||
|
line-height: 30rpx; height: 60rpx; overflow: hidden;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@include bov();
|
@include bov();
|
||||||
|
|||||||
@@ -74,10 +74,8 @@
|
|||||||
<!-- </text> -->
|
<!-- </text> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="tag-view">
|
<view class="tag-view">
|
||||||
|
<uni-tag @click="goBuy()" text="购买课程" type="warning" size="normal" />
|
||||||
|
<uni-tag v-if="isAndorid" @click="onPageJump('/pages/mine/vip/index')" size="normal" style="margin-left: 20rpx;" text="开通VIP" type="success" />
|
||||||
<uni-tag @click="goBuy()" text="购买课程" type="warning" style="larg" />
|
|
||||||
<uni-tag @click="onPageJump('/pages/mine/vip/index')" style="margin-left: 20rpx;" text="开通VIP" type="success" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -116,6 +114,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isAndorid: true,
|
||||||
playData: {},
|
playData: {},
|
||||||
catalogueId: null,
|
catalogueId: null,
|
||||||
// fixed: false,
|
// fixed: false,
|
||||||
@@ -204,7 +203,12 @@
|
|||||||
onShow() {
|
onShow() {
|
||||||
// 隐藏原生的tabbar
|
// 隐藏原生的tabbar
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.screen.unlockOrientation();
|
||||||
|
plus.screen.lockOrientation("portrait-primary");
|
||||||
|
// #endif
|
||||||
this.getData(this.courseId)
|
this.getData(this.courseId)
|
||||||
|
this.getOS()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
console.log('触底');
|
console.log('触底');
|
||||||
@@ -221,7 +225,17 @@
|
|||||||
},
|
},
|
||||||
//方法
|
//方法
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获得操作系统
|
||||||
|
getOS() {
|
||||||
|
let oprateOs = "";
|
||||||
|
oprateOs = uni.getSystemInfoSync().platform;
|
||||||
|
// console.log(oprateOs)
|
||||||
|
if (oprateOs == "android") {
|
||||||
|
this.isAndorid = true;
|
||||||
|
} else {
|
||||||
|
this.isAndorid = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
// 用户详情
|
// 用户详情
|
||||||
// if (this.userInfo.id != undefined) {
|
// if (this.userInfo.id != undefined) {
|
||||||
@@ -644,6 +658,10 @@
|
|||||||
|
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.log(e, '获取目录数据报错')
|
console.log(e, '获取目录数据报错')
|
||||||
|
uni.showToast({
|
||||||
|
title:"获取数据失败",
|
||||||
|
icon:'error'
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -717,8 +735,8 @@
|
|||||||
let data = {
|
let data = {
|
||||||
"userId": this.userInfo.id,
|
"userId": this.userInfo.id,
|
||||||
"productId": item.productId,
|
"productId": item.productId,
|
||||||
"productAmount": this.productAmount,
|
"productAmount": 1,
|
||||||
"price": item.price
|
"price": item.activityPrice && item.activityPrice != 0 ? item.activityPrice : item.price
|
||||||
}
|
}
|
||||||
// 判断列表是否为空
|
// 判断列表是否为空
|
||||||
if (this.cartList.length > 0) {
|
if (this.cartList.length > 0) {
|
||||||
@@ -877,7 +895,7 @@
|
|||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
if (res.chapterList.length > 0) {
|
if (res.chapterList.length > 0) {
|
||||||
this.courseList = res.chapterList
|
this.courseList = res.chapterList
|
||||||
console.log('status++++++++++++++', this.courseList)
|
// console.log('status++++++++++++++', this.courseList)
|
||||||
} else {
|
} else {
|
||||||
this.courseList = []
|
this.courseList = []
|
||||||
}
|
}
|
||||||
@@ -885,6 +903,10 @@
|
|||||||
|
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.log(e, '获取章节列表数据报错')
|
console.log(e, '获取章节列表数据报错')
|
||||||
|
uni.showToast({
|
||||||
|
title:"获取数据失败",
|
||||||
|
icon:'error'
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 跳转
|
// 跳转
|
||||||
|
|||||||
@@ -717,6 +717,7 @@ export default {
|
|||||||
curriculumInfo: "app/phone.do?getCourseInfo",
|
curriculumInfo: "app/phone.do?getCourseInfo",
|
||||||
detailInfo: "sociology/product/getProductDetail",
|
detailInfo: "sociology/product/getProductDetail",
|
||||||
goodsList: "book/shopproduct/getGlProductList",
|
goodsList: "book/shopproduct/getGlProductList",
|
||||||
|
visitorDetailInfo: "visitor/getProductDetail", // 游客状态下的商品详情
|
||||||
},
|
},
|
||||||
customButtonGroup1: [
|
customButtonGroup1: [
|
||||||
{
|
{
|
||||||
@@ -726,6 +727,7 @@ export default {
|
|||||||
color: "#fff",
|
color: "#fff",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
requestType:'', // 数据请求类型是否为游客登陆状态
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
@@ -780,7 +782,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
console.log('options',options)
|
||||||
// this.handleClickGetGoodsList();
|
// this.handleClickGetGoodsList();
|
||||||
// this.getUserInfo()
|
// this.getUserInfo()
|
||||||
// this.getCateList()
|
// this.getCateList()
|
||||||
@@ -799,6 +801,7 @@ export default {
|
|||||||
// this.searchList = []
|
// this.searchList = []
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.requestType = this.options.type
|
||||||
this.selectGoodsData = {};
|
this.selectGoodsData = {};
|
||||||
this.getCourseDescriptionData();
|
this.getCourseDescriptionData();
|
||||||
this.show = false;
|
this.show = false;
|
||||||
@@ -823,6 +826,21 @@ export default {
|
|||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
selectGoods(data) {
|
selectGoods(data) {
|
||||||
|
if(this.requestType == 'visitor'){
|
||||||
|
uni.showModal({
|
||||||
|
content:"登陆后可购买本商品",
|
||||||
|
confirmText:'去登录',
|
||||||
|
cancelText:'再逛逛',
|
||||||
|
success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/user/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.selectGoodsData = data;
|
this.selectGoodsData = data;
|
||||||
this.$refs.commonSelectGoods.open()
|
this.$refs.commonSelectGoods.open()
|
||||||
// this.show = true;
|
// this.show = true;
|
||||||
@@ -830,6 +848,21 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onHandleClickBuy1() {
|
onHandleClickBuy1() {
|
||||||
|
if(this.requestType == 'visitor'){
|
||||||
|
uni.showModal({
|
||||||
|
content:"登陆后可购买本商品",
|
||||||
|
confirmText:'去登录',
|
||||||
|
cancelText:'再逛逛',
|
||||||
|
success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/user/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$refs.commonSelectGoods.open();
|
this.$refs.commonSelectGoods.open();
|
||||||
// this.show = true;
|
// this.show = true;
|
||||||
},
|
},
|
||||||
@@ -957,10 +990,11 @@ export default {
|
|||||||
async getCourseDescriptionData() {
|
async getCourseDescriptionData() {
|
||||||
var data = {};
|
var data = {};
|
||||||
var that = this;
|
var that = this;
|
||||||
|
let url = ''
|
||||||
|
this.requestType == 'visitor' ? url = this.urlList.visitorDetailInfo : url = this.urlList.detailInfo
|
||||||
this.$http
|
this.$http
|
||||||
.request({
|
.request({
|
||||||
url: this.urlList.detailInfo,
|
url,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
productId: this.options.id,
|
productId: this.options.id,
|
||||||
@@ -1027,7 +1061,7 @@ export default {
|
|||||||
that.curriculumData.productImageList == null ||
|
that.curriculumData.productImageList == null ||
|
||||||
that.curriculumData.productImageList == ""
|
that.curriculumData.productImageList == ""
|
||||||
) {
|
) {
|
||||||
this.swiperList.push(that.curriculumData.explainsImg);
|
this.swiperList.push(that.curriculumData.productImages);
|
||||||
} else {
|
} else {
|
||||||
that.swiperList = that.curriculumData.productImageList.split(",");
|
that.swiperList = that.curriculumData.productImageList.split(",");
|
||||||
// for (var i = 0; i < imgList.length; i++) {
|
// for (var i = 0; i < imgList.length; i++) {
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="prof">吴门医述是一款专业的医学线上教育平台。内容涵盖中医学、针灸学、心身医学、中西汇通学、肿瘤学。仰望星空、脚踏实地、梦从这里起航。</view>
|
<view class="prof">吴门医述是一款线上视频平台。内容涵盖中医学、针灸学、心身医学、中西汇通学、肿瘤学。仰望星空、脚踏实地、梦从这里起航。</view>
|
||||||
<view class="" style="text-align: center;">
|
<view class="" style="text-align: center;">
|
||||||
<!-- https://main.nuttyreading.com/privacy.html -->
|
<!-- https://main.nuttyreading.com/privacy.html -->
|
||||||
<!-- <text @click="seeDetail('')" style="color: #007aff; font-size: 26rpx;">隐私政策</text> -->
|
<!-- <text @click="seeDetail('')" style="color: #007aff; font-size: 26rpx;">隐私政策</text> -->
|
||||||
<uni-link href="https://zmzm.taihumed.com/privacy.html" text="隐私政策"></uni-link>
|
<uni-link href="https://wumen.taihumed.com/privacy/" text="隐私政策"></uni-link>
|
||||||
<!-- <uni-link href="https://uniapp.dcloud.io/" text="https://uniapp.dcloud.io/"></uni-link> -->
|
<!-- <uni-link href="https://uniapp.dcloud.io/" text="https://uniapp.dcloud.io/"></uni-link> -->
|
||||||
</view>
|
</view>
|
||||||
<music-play :playData="playData"></music-play>
|
<music-play :playData="playData"></music-play>
|
||||||
|
|||||||
@@ -63,31 +63,73 @@
|
|||||||
</view>
|
</view>
|
||||||
<br clear="both" />
|
<br clear="both" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="now_vip" v-if="userMes.vip==0">
|
|
||||||
<text>
|
|
||||||
<image src="../../static/icon/mine_p.png" style="height: 44rpx;"></image>
|
|
||||||
开通会员畅享海量内容
|
|
||||||
</text>
|
|
||||||
<b class="kt_btn" @click="onPageJump('./opeVip')">开通VIP</b>
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
<!-- <view class="now_vip" v-if="userMes.vip==1">
|
|
||||||
<text>
|
|
||||||
<image src="../../static/icon/mine_v.png"></image>
|
|
||||||
尊贵的VIP会员
|
|
||||||
<font style="font-size: 14rpx;margin-left: 20rpx;">{{userMes.vipValidtime}}到期</font>
|
|
||||||
</text>
|
|
||||||
<b class="kt_btn" @click="onPageJump('./opeVip')">立即续费</b>
|
|
||||||
</view> -->
|
|
||||||
<view
|
<view
|
||||||
style="
|
style="
|
||||||
padding: 20rpx;
|
padding: 20rpx; overflow: hidden;
|
||||||
height: 200rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
<!-- vip 只有安卓才显示-->
|
||||||
|
<view v-if="isAndorid"
|
||||||
|
class="chong_zhi boxShadow box_fillet vip_box"
|
||||||
|
@click="onPageJump('/pages/mine/vip/index')"
|
||||||
|
>
|
||||||
|
<view v-if="!userMes.userVip" class="noVip">
|
||||||
|
<view class="zhanghu PM_font" style="text-align: left">
|
||||||
|
<image
|
||||||
|
class="vip_image"
|
||||||
|
src="@/static/vip.png"
|
||||||
|
mode="aspectFit"
|
||||||
|
>
|
||||||
|
</image>
|
||||||
|
<text style="color: #fff; font-size: 60rpx;">VIP</text>
|
||||||
|
</view>
|
||||||
|
<view class="" style="width:calc(100% - 200rpx);">
|
||||||
|
<swiper
|
||||||
|
:autoplay="true"
|
||||||
|
:interval="3000"
|
||||||
|
:duration="1000"
|
||||||
|
style="width:100%; height: 60rpx"
|
||||||
|
>
|
||||||
|
<swiper-item
|
||||||
|
v-for="(item, index) in swiperList"
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
style="
|
||||||
|
background: linear-gradient(
|
||||||
|
130deg,
|
||||||
|
rgb(46, 103, 106) 0%,
|
||||||
|
rgb(114, 173, 146) 100%
|
||||||
|
)
|
||||||
|
text;
|
||||||
|
text-align: center;
|
||||||
|
"
|
||||||
|
:style="item.style"
|
||||||
|
v-html="item.name"
|
||||||
|
></view>
|
||||||
|
<!-- <image :src="curriculumData.explainsImg" mode="widthFix" class="headImage"></image> -->
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="noVip hasVip">
|
||||||
|
<view class="zhanghu PM_font" style="text-align: center">
|
||||||
|
<image
|
||||||
|
class="vip_image"
|
||||||
|
src="@/static/vip.png"
|
||||||
|
mode="aspectFit"
|
||||||
|
>
|
||||||
|
</image>
|
||||||
|
<text style="color: #fff; font-size: 60rpx;">VIP</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="time"
|
||||||
|
>{{ userMes.userVip.endTime.split(" ")[0] }}到期</view
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- end -->
|
||||||
<view class="chong_zhi boxShadow box_fillet chongzhi_box">
|
<view class="chong_zhi boxShadow box_fillet chongzhi_box">
|
||||||
<!-- <view
|
<!-- <view
|
||||||
class="zhanghu"
|
class="zhanghu"
|
||||||
@@ -177,64 +219,6 @@
|
|||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
|
||||||
class="chong_zhi boxShadow box_fillet vip_box"
|
|
||||||
@click="onPageJump('/pages/mine/vip/index')"
|
|
||||||
>
|
|
||||||
<view v-if="!userMes.userVip" class="noVip">
|
|
||||||
<view class="zhanghu PM_font" style="text-align: center">
|
|
||||||
<image
|
|
||||||
class="vip_image"
|
|
||||||
src="@/static/icon/noquanyi.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
>
|
|
||||||
</image>
|
|
||||||
<text style="color: #c4d3d4">VIP</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<swiper
|
|
||||||
:autoplay="true"
|
|
||||||
:interval="3000"
|
|
||||||
:duration="1000"
|
|
||||||
style="width: 100%; height: 60rpx"
|
|
||||||
>
|
|
||||||
<swiper-item
|
|
||||||
v-for="(item, index) in swiperList"
|
|
||||||
style="width: 100%; height: 100%"
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
style="
|
|
||||||
background: linear-gradient(
|
|
||||||
130deg,
|
|
||||||
rgb(46, 103, 106) 0%,
|
|
||||||
rgb(114, 173, 146) 100%
|
|
||||||
)
|
|
||||||
text;
|
|
||||||
text-align: center;
|
|
||||||
"
|
|
||||||
:style="item.style"
|
|
||||||
v-html="item.name"
|
|
||||||
></view>
|
|
||||||
<!-- <image :src="curriculumData.explainsImg" mode="widthFix" class="headImage"></image> -->
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
</view>
|
|
||||||
<view v-else class="noVip hasVip">
|
|
||||||
<view class="zhanghu PM_font" style="text-align: center">
|
|
||||||
<image
|
|
||||||
class="vip_image"
|
|
||||||
src="@/static/icon/quanyi.png"
|
|
||||||
mode="aspectFit"
|
|
||||||
>
|
|
||||||
</image>
|
|
||||||
<text style="">VIP</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="time"
|
|
||||||
>{{ userMes.userVip.endTime.split(" ")[0] }}到期</view
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="list_box">
|
<view class="list_box">
|
||||||
@@ -326,16 +310,16 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
swiperList: [
|
swiperList: [
|
||||||
{ name: "开通会员畅享更多活动" },
|
{ name: "开通会员畅享更多活动",style:"color:#fff;font-size:28rpx" },
|
||||||
{ name: "众妙之门视频" },
|
{ name: "众妙之门视频",style:"color:#fff;font-size:28rpx" },
|
||||||
{
|
{
|
||||||
name: "吴门医述视频",
|
name: "吴门医述视频",style:"color:#fff;font-size:28rpx"
|
||||||
},
|
},
|
||||||
{ name: "专属视频视听" },
|
{ name: "专属视频视听",style:"color:#fff;font-size:28rpx" },
|
||||||
{
|
{
|
||||||
name: "读书相关权益",
|
name: "读书相关权益",style:"color:#fff;font-size:28rpx"
|
||||||
},
|
},
|
||||||
{ name: "活动报名<text style='color:red'>(折扣价)</text>" },
|
{ name: "活动报名<text style='color:#ffaa7f'>(折扣价)</text>" ,style:"color:#fff;font-size:28rpx"},
|
||||||
],
|
],
|
||||||
infoShow: false, // 显示电子书相关
|
infoShow: false, // 显示电子书相关
|
||||||
showEbook: false, // 显示电子书相关
|
showEbook: false, // 显示电子书相关
|
||||||
@@ -380,7 +364,7 @@ export default {
|
|||||||
url: "/pages/mine/aboutUs/index",
|
url: "/pages/mine/aboutUs/index",
|
||||||
type: "pageJump",
|
type: "pageJump",
|
||||||
},
|
},
|
||||||
//{ name: "设置", url: "/pages/mine/set/index", type: "pageJump" },
|
{ name: "问题反馈/申诉", url: "/pages/user/workOrder", type: "workOrder" },
|
||||||
// { name: "退出登录", type: "quitLogin" },
|
// { name: "退出登录", type: "quitLogin" },
|
||||||
// { name: "注销帐号", type: "loginOut" },
|
// { name: "注销帐号", type: "loginOut" },
|
||||||
],
|
],
|
||||||
@@ -445,6 +429,12 @@ export default {
|
|||||||
//注销账号
|
//注销账号
|
||||||
this.logout();
|
this.logout();
|
||||||
break;
|
break;
|
||||||
|
case "workOrder":
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`${v.url}?name=userPage`
|
||||||
|
})
|
||||||
|
// this.onPageJump(v.url);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获得操作系统
|
// 获得操作系统
|
||||||
@@ -607,16 +597,16 @@ export default {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 38upx;
|
font-size: 38upx;
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
color: #fff !important;
|
color: #6990c7 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phone {
|
.phone {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #fff;
|
color: #6990c7 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tong {
|
.tong {
|
||||||
color: #999;
|
color: #6990c7 !important;
|
||||||
font-size: 25upx;
|
font-size: 25upx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -665,9 +655,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.commonPageBox {
|
.commonPageBox {
|
||||||
background-image: url("@/static/icon/mine_bg.png");
|
// background-image: url("@/static/icon/mine_bg.png");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
background-image: linear-gradient(-60deg, #fdf0ed 0%, #bfe3f0 40%, #e4eefa 60%, #bfe3f0 80%, #fdf0ed 100%);
|
||||||
// background-color: #d8f8e4 !important;
|
// background-color: #d8f8e4 !important;
|
||||||
}
|
}
|
||||||
.chong_zhi {
|
.chong_zhi {
|
||||||
@@ -697,19 +688,19 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
flex-direction: column;
|
// flex-direction: column;
|
||||||
.zhanghu {
|
.zhanghu {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
width: 120rpx;
|
width: 200rpx;
|
||||||
margin-top: 20rpx;
|
// margin-top: 20rpx;
|
||||||
margin-bottom: 0rpx;
|
margin-bottom: 0rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
// justify-content: space-around;
|
// justify-content: space-around;
|
||||||
image {
|
image {
|
||||||
width: 40rpx;
|
width: 100rpx;
|
||||||
height: 40rpx;
|
height: 100rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -718,13 +709,13 @@ export default {
|
|||||||
.time {
|
.time {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 4rpx 20rpx;
|
padding: 4rpx 20rpx;
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
background: linear-gradient(
|
// background: linear-gradient(
|
||||||
to right,
|
// to right,
|
||||||
#56B0CE 0%,
|
// #56B0CE 0%,
|
||||||
#6DDAEA 100%
|
// #6DDAEA 100%
|
||||||
) !important;
|
// ) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.chong_list {
|
.chong_list {
|
||||||
@@ -756,11 +747,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chong_btn {
|
.chong_btn {
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
display: block;
|
display: block;
|
||||||
top: 0px;
|
// top: 0px;
|
||||||
right: 0px;
|
// right: 0px;
|
||||||
float: right;
|
float: right;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
color: #fffbf6;
|
color: #fffbf6;
|
||||||
@@ -776,7 +767,7 @@ export default {
|
|||||||
border-radius: 20rpx !important;
|
border-radius: 20rpx !important;
|
||||||
margin: 0 20rpx;
|
margin: 0 20rpx;
|
||||||
// padding:0 40rpx;
|
// padding:0 40rpx;
|
||||||
background: #E2F5FA;
|
background: #f0f9fb;
|
||||||
|
|
||||||
.nav_list {
|
.nav_list {
|
||||||
background-color: #b7e0e2;
|
background-color: #b7e0e2;
|
||||||
@@ -818,7 +809,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.box_fillet {
|
.box_fillet {
|
||||||
border-radius: 40rpx;
|
border-radius: 20rpx;
|
||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
@@ -827,34 +818,30 @@ export default {
|
|||||||
|
|
||||||
.chongzhi_box {
|
.chongzhi_box {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: calc(100% - 320rpx);
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
float: left;
|
// float: left;
|
||||||
padding: 30rpx 20rpx 10rpx;
|
padding: 30rpx 20rpx 10rpx;
|
||||||
background-color: #E2F5FA;
|
background-color: #f0f9fb;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
.vip_box {
|
.vip_box {
|
||||||
|
margin-bottom: 32rpx;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
float: right;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 300rpx;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 20rx;
|
border-radius: 20rx;
|
||||||
// background: rgba(255, 255, 255, 0.85);
|
background-image: linear-gradient(60deg, #8265f9 30%, #016dea 100%);
|
||||||
|
|
||||||
// padding: 30rpx 20rpx 10rpx;
|
|
||||||
// background-color: $themeBgColor;
|
|
||||||
// @include themeBorder(6rpx, 20rpx, #258feb, #a6d8dc);
|
// @include themeBorder(6rpx, 20rpx, #258feb, #a6d8dc);
|
||||||
@include themeBorder(
|
// @include themeBorder(
|
||||||
10rpx,
|
// 10rpx,
|
||||||
20rpx,
|
// 20rpx,
|
||||||
(
|
// (
|
||||||
linear-gradient(#DDF2FC, #BFDDF2),
|
// linear-gradient(#DDF2FC, #BFDDF2),
|
||||||
linear-gradient(to bottom left, #D5EDF8, #a6d8dc)
|
// linear-gradient(to bottom left, #D5EDF8, #a6d8dc)
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
|
|
||||||
.zhanghu {
|
.zhanghu {
|
||||||
font-size: 80rpx;
|
font-size: 80rpx;
|
||||||
@@ -984,16 +971,13 @@ uni-page-body {
|
|||||||
}
|
}
|
||||||
.user_vip {
|
.user_vip {
|
||||||
z-index:1;
|
z-index:1;
|
||||||
|
color: #fff;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
width: auto;
|
width: auto;
|
||||||
padding: 4rpx 10rpx;
|
padding: 4rpx 10rpx;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
background: linear-gradient(
|
background: linear-gradient(60deg, #8265f9 30%, #016dea 100%);
|
||||||
to right,
|
|
||||||
rgb(204, 229, 244) 0%,
|
|
||||||
rgb(197, 227, 215) 100%
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
.super {
|
.super {
|
||||||
background: linear-gradient(to right, #5bc9c1 0%, #258feb 100%);
|
background: linear-gradient(to right, #5bc9c1 0%, #258feb 100%);
|
||||||
|
|||||||
@@ -38,31 +38,6 @@
|
|||||||
>退出登录</u-button
|
>退出登录</u-button
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="set_box" style="margin-top:20rpx">
|
|
||||||
<list :dataList="otherList" @hancleClick="handleClickRightContent" label="title">
|
|
||||||
|
|
||||||
|
|
||||||
<template slot="rightSlot" slot-scope="slotProps">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<text class="fdButtonBox aui-text-success">{{ slotProps.row.content }}</text>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view>
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</list>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-modal
|
<u-modal
|
||||||
@@ -73,10 +48,19 @@
|
|||||||
@confirm="signOut"
|
@confirm="signOut"
|
||||||
>
|
>
|
||||||
</u-modal>
|
</u-modal>
|
||||||
|
<u-popup key="1" v-if="showCodeImg" :show="showCodeImg" :round="10" @close="closePup">
|
||||||
|
<view class="box6">
|
||||||
|
<text style="color: #999; margin-bottom: 20rpx;">点击图片后长按图片保存到手机,或使用微信扫描二维码添加客服企业微信</text>
|
||||||
|
<image @click="previewImage('/static/qiyeWx.jpg')" src="/static/qiyeWx.jpg" mode="widthFix" style="width: 100px; height: 100px; margin: 0 auto;"></image>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
import updata from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
|
||||||
|
// #endif
|
||||||
import list from "@/pages/component/commonComponents/list";
|
import list from "@/pages/component/commonComponents/list";
|
||||||
import $http from "@/config/requestConfig.js";
|
import $http from "@/config/requestConfig.js";
|
||||||
|
|
||||||
@@ -92,7 +76,7 @@ export default {
|
|||||||
playData: {},
|
playData: {},
|
||||||
options: {},
|
options: {},
|
||||||
searchValue: "",
|
searchValue: "",
|
||||||
|
showCodeImg:false,
|
||||||
twoCateList: [], // 二级分类标题
|
twoCateList: [], // 二级分类标题
|
||||||
titleList: [], // 方剂标题
|
titleList: [], // 方剂标题
|
||||||
curOneCateIndex: 0, // 当前选中的一级分类
|
curOneCateIndex: 0, // 当前选中的一级分类
|
||||||
@@ -117,11 +101,15 @@ export default {
|
|||||||
type: "email",
|
type: "email",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "微信号",
|
title: "企业微信",
|
||||||
content: "yilujiankangkefu",
|
content: "",
|
||||||
type: "wxNumber",
|
type: "wxNumber",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "版本检测",
|
||||||
|
content: "",
|
||||||
|
type: "checkVersion",
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
|
|
||||||
// "title": "清楚缓存",
|
// "title": "清楚缓存",
|
||||||
@@ -161,6 +149,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(["setUserInfo"]),
|
...mapMutations(["setUserInfo"]),
|
||||||
|
closePup(){
|
||||||
|
this.showCodeImg = false
|
||||||
|
},
|
||||||
signOut() {
|
signOut() {
|
||||||
this.signShow = false;
|
this.signShow = false;
|
||||||
this.setUserInfo({ token: null });
|
this.setUserInfo({ token: null });
|
||||||
@@ -217,7 +208,11 @@ export default {
|
|||||||
this.$commonJS.handleCopy(row.content, row.title);
|
this.$commonJS.handleCopy(row.content, row.title);
|
||||||
break;
|
break;
|
||||||
case "wxNumber":
|
case "wxNumber":
|
||||||
this.$commonJS.handleCopy(row.content, row.title);
|
this.showCodeImg = true
|
||||||
|
// this.$commonJS.handleCopy(row.content, row.title);
|
||||||
|
break;
|
||||||
|
case "checkVersion":
|
||||||
|
this.getNewVersion()
|
||||||
break;
|
break;
|
||||||
case "pageJump":
|
case "pageJump":
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -228,25 +223,7 @@ export default {
|
|||||||
//
|
//
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 检查是有权限使用搜索功能
|
|
||||||
checkDisable() {
|
|
||||||
console.log("点击了");
|
|
||||||
},
|
|
||||||
// 显示无权限弹窗
|
|
||||||
// showNoRights() {
|
|
||||||
// let that = this
|
|
||||||
// uni.showModal({
|
|
||||||
// content: "",
|
|
||||||
// confirmText: '好的',
|
|
||||||
// showCancel: false,
|
|
||||||
// success: function(res) {
|
|
||||||
// if (res.confirm) {
|
|
||||||
// // console.log('用户点击确定');
|
|
||||||
// that.clear()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// 获取用户详情
|
// 获取用户详情
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
// 用户详情
|
// 用户详情
|
||||||
@@ -258,6 +235,19 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 版本检测
|
||||||
|
async getNewVersion(){
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
var info = await updata();
|
||||||
|
console.log('info',JSON.stringify(info))
|
||||||
|
if(info.result.code == 0){
|
||||||
|
uni.showToast({
|
||||||
|
title:info.result.message,
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
// 详情
|
// 详情
|
||||||
gotoDetail(v) {
|
gotoDetail(v) {
|
||||||
console.log(v);
|
console.log(v);
|
||||||
@@ -402,27 +392,6 @@ export default {
|
|||||||
async setOneCateIndex(item, index) {
|
async setOneCateIndex(item, index) {
|
||||||
console.log(index, 99999);
|
console.log(index, 99999);
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
// if(this.userMes.tgdzPower == 0){
|
|
||||||
// let that = this
|
|
||||||
// uni.showModal({
|
|
||||||
// content: "购买 针灸六经法要上册和下册 后方可使用此功能",
|
|
||||||
// confirmText: '好的',
|
|
||||||
// showCancel: false,
|
|
||||||
// success: function(res) {
|
|
||||||
// if (res.confirm) {
|
|
||||||
// // console.log('用户点击确定');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// if(item.title == "时辰取穴"){
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: "../timeAcupoint/timeAcupoint"
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
let type = item.type;
|
let type = item.type;
|
||||||
this.curOneCateIndex = index;
|
this.curOneCateIndex = index;
|
||||||
this.curTwoCateIndex = 0;
|
this.curTwoCateIndex = 0;
|
||||||
@@ -432,15 +401,6 @@ export default {
|
|||||||
// if (index != 2) {
|
// if (index != 2) {
|
||||||
await this.getTowCateList(type);
|
await this.getTowCateList(type);
|
||||||
|
|
||||||
// uni.createSelectorQuery().select('.oneCateList').boundingClientRect(function (rect) {
|
|
||||||
// var height = rect.height
|
|
||||||
// console.log('元素高度:',);
|
|
||||||
|
|
||||||
// }).exec();
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
// this.getJFList(dictType)
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
async getTowCateList(type) {
|
async getTowCateList(type) {
|
||||||
var that = this;
|
var that = this;
|
||||||
@@ -450,11 +410,8 @@ export default {
|
|||||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
data: {
|
data: {
|
||||||
loadAnimate: "none", // 请求加载动画
|
loadAnimate: "none", // 请求加载动画
|
||||||
// 'categoryId': id
|
|
||||||
},
|
},
|
||||||
// header: { //默认 无 说明:请求头
|
|
||||||
// 'Content-Type': 'application/json'
|
|
||||||
// },
|
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res, "二级分类获取成功");
|
console.log(res, "二级分类获取成功");
|
||||||
@@ -511,15 +468,6 @@ export default {
|
|||||||
this.getTitles(this.twoCateList[0].dictType);
|
this.getTitles(this.twoCateList[0].dictType);
|
||||||
|
|
||||||
this.$nextTick(async () => {
|
this.$nextTick(async () => {
|
||||||
// await uni.createSelectorQuery().select('.uni-tabbar').boundingClientRect(function (rect) {
|
|
||||||
// console.log(rect.height, '3333')
|
|
||||||
|
|
||||||
// // var height = 42 + rect.height + 10;
|
|
||||||
// // that.scrollViewHeight = height;
|
|
||||||
// // console.log(that.scrollViewHeight, '111111')
|
|
||||||
// // that.$forceUpdate()
|
|
||||||
// // console.log('元素高度2:', height);
|
|
||||||
// }).exec();
|
|
||||||
await uni
|
await uni
|
||||||
.createSelectorQuery()
|
.createSelectorQuery()
|
||||||
.select(".cateList")
|
.select(".cateList")
|
||||||
@@ -557,156 +505,31 @@ export default {
|
|||||||
// const finalResult = Object.keys(result).map(key => ({ [key]: result[key] }));
|
// const finalResult = Object.keys(result).map(key => ({ [key]: result[key] }));
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
// getJFList(id) {
|
|
||||||
// $http.request({
|
|
||||||
// url: "book/prescript/prescriptListForJF",
|
|
||||||
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
|
||||||
// data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
// 'categoryId': id
|
|
||||||
// },
|
|
||||||
// header: { //默认 无 说明:请求头
|
|
||||||
// 'Content-Type': 'application/json'
|
|
||||||
// },
|
|
||||||
// }).then(res => {
|
|
||||||
// if (res.code == 0 && res.list.length > 0) {
|
|
||||||
// this.twoCateList = []
|
|
||||||
// this.titleList = this.transformData(res.list)
|
|
||||||
// console.log('JF经方', this.titleList)
|
|
||||||
// } else {
|
|
||||||
// this.twoCateList = []
|
|
||||||
// this.titleList = []
|
|
||||||
// }
|
|
||||||
// }).catch(e => {
|
|
||||||
// this.twoCateList = []
|
|
||||||
// this.titleList = []
|
|
||||||
// console.log(e)
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
getCateList(id) {
|
getCateList(id) {
|
||||||
id ? "" : (id = 0);
|
id ? "" : (id = 0);
|
||||||
this.twoCateList = [];
|
this.twoCateList = [];
|
||||||
this.curTwoCateIndex = 0;
|
this.curTwoCateIndex = 0;
|
||||||
// 0为获取顶级分类,其他为搜索下级分类,目前的逻辑,顶级是写死的,所以可能只会涉及到搜索第二级
|
|
||||||
// $http.request({
|
|
||||||
// url: "book/prescript/prescriptCategoryList",
|
|
||||||
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
|
||||||
// data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
// 'categoryId': id
|
|
||||||
// },
|
|
||||||
// header: { //默认 无 说明:请求头
|
|
||||||
// 'Content-Type': 'application/json'
|
|
||||||
// },
|
|
||||||
// }).then(res => {
|
|
||||||
// console.log(res, '脉穴分类获取成功')
|
|
||||||
// if (res.code == 0 && res.list.length > 0) {
|
|
||||||
// this.oneCateList = res.list
|
|
||||||
this.getTowCateList(this.oneCateList[0].type);
|
this.getTowCateList(this.oneCateList[0].type);
|
||||||
// } else {
|
|
||||||
// this.oneCateList = []
|
|
||||||
// }
|
|
||||||
// }).catch(e => {
|
|
||||||
// this.oneCateList = []
|
|
||||||
// console.log(e)
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 放大图片
|
// 放大图片
|
||||||
previewImage(url) {
|
previewImage(url) {
|
||||||
console.log(url);
|
console.log(url);
|
||||||
|
this.showCodeImg = false
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: [url],
|
urls: [url],
|
||||||
longPressActions: {
|
// longPressActions: {
|
||||||
itemList: ["很抱歉,暂不支持保存图片到本地"],
|
// itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||||
success: function (res) {
|
// success: function (res) {
|
||||||
// console.log(res,'+++++')
|
// // console.log(res,'+++++')
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// getSearch() {
|
|
||||||
// $http.request({
|
|
||||||
// url: "book/prescript/searchPrescript",
|
|
||||||
// method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
|
||||||
// data: {
|
|
||||||
// loadAnimate: 'none', // 请求加载动画
|
|
||||||
// 'keywords': this.searchValue,
|
|
||||||
// type: this.curOneCateIndex + 1
|
|
||||||
// },
|
|
||||||
// header: { //默认 无 说明:请求头
|
|
||||||
// 'Content-Type': 'application/json'
|
|
||||||
// },
|
|
||||||
// }).then(res => {
|
|
||||||
// console.log(res, '搜索结果')
|
|
||||||
// if (res.code == 0 && res.list.length >= 0) {
|
|
||||||
// this.showSearchList = true
|
|
||||||
// this.searchList = res.list
|
|
||||||
// } else {
|
|
||||||
// this.searchList = []
|
|
||||||
// }
|
|
||||||
// }).catch(e => {
|
|
||||||
// // this.titleList = []
|
|
||||||
// this.searchList = []
|
|
||||||
// console.log(e)
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// search(res) {
|
|
||||||
// console.log(res, 'res')
|
|
||||||
// // uni.showToast({
|
|
||||||
// // title: '搜索:' + res,
|
|
||||||
// // icon: 'none'
|
|
||||||
// // })
|
|
||||||
// if (res == '') {
|
|
||||||
// this.showSearchList = false
|
|
||||||
// this.searchList = []
|
|
||||||
// } else {
|
|
||||||
// this.getSearch()
|
|
||||||
// }
|
|
||||||
|
|
||||||
// },
|
|
||||||
// input(res) {
|
|
||||||
// console.log('----input:', res)
|
|
||||||
// if (res == '') {
|
|
||||||
// this.searchList = []
|
|
||||||
// } else {
|
|
||||||
// this.getSearch()
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// clear(res) {
|
|
||||||
// console.log('----clear:', res)
|
|
||||||
// // uni.showToast({
|
|
||||||
// // title: 'clear事件,清除值为:',
|
|
||||||
// // icon: 'none'
|
|
||||||
// // })
|
|
||||||
// this.searchValue = ''
|
|
||||||
// this.showSearchList = false
|
|
||||||
// },
|
|
||||||
// blur(res) {
|
|
||||||
// // console.log('----blur:', res)
|
|
||||||
// // if (res == '') {
|
|
||||||
// // this.showSearchList = false
|
|
||||||
// // this.searchList = []
|
|
||||||
// // } else {
|
|
||||||
// // this.getSearch()
|
|
||||||
// // }
|
|
||||||
// },
|
|
||||||
// focus(e) {
|
|
||||||
// console.log('----focus:')
|
|
||||||
// // uni.showToast({
|
|
||||||
// // title: 'focus事件,输出值为:' + e.value,
|
|
||||||
// // icon: 'none'
|
|
||||||
// // })
|
|
||||||
// // 等于1 就是有权限
|
|
||||||
// // this.showSearchList = true
|
|
||||||
|
|
||||||
// },
|
|
||||||
// cancel(res) {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '点击取消,输入值为:' + res.value,
|
|
||||||
// icon: 'none'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
onBackPress() {
|
onBackPress() {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
@@ -719,6 +542,79 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "@/style/common.scss";
|
@import "@/style/common.scss";
|
||||||
|
|
||||||
|
.box6 {
|
||||||
|
padding: 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
padding: 0 10px;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
padding-top:20rpx ;
|
||||||
|
padding-bottom:20rpx ;
|
||||||
|
line-height:40rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item.active {
|
||||||
|
color: $themeColor;
|
||||||
|
border: 1px solid $themeColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:last-child {
|
||||||
|
// border-bottom: none
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tbn {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buybtn { padding: 0 20rpx;
|
||||||
|
background-color: #00d8df;
|
||||||
|
margin: 0;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.saveBtnss {
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 80rpx;
|
||||||
|
|
||||||
|
// width: 46%;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
|
||||||
|
text {
|
||||||
|
padding-left: 10rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gouwuche {
|
||||||
|
border: 1px solid #666;
|
||||||
|
padding-right: 20rpx;
|
||||||
|
|
||||||
|
text {
|
||||||
|
// color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.u-grid-list {
|
.u-grid-list {
|
||||||
// height: 40rpx;
|
// height: 40rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -373,7 +373,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="currentEditType == 'avatar'">
|
<template v-if="currentEditType == 'avatar'" >
|
||||||
|
<view class="" @click="checkPermision">
|
||||||
<u-upload
|
<u-upload
|
||||||
:fileList="fileAvatar"
|
:fileList="fileAvatar"
|
||||||
@afterRead="afterRead"
|
@afterRead="afterRead"
|
||||||
@@ -385,6 +386,7 @@
|
|||||||
:previewFullImage="true"
|
:previewFullImage="true"
|
||||||
>
|
>
|
||||||
</u-upload>
|
</u-upload>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<u-button
|
<u-button
|
||||||
@@ -397,11 +399,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
<music-play :playData="playData"></music-play>
|
<!-- <music-play :playData="playData"></music-play> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import permission from "@/js_sdk/wa-permission/permission.js"
|
||||||
import musicPlay from "@/components/music.vue";
|
import musicPlay from "@/components/music.vue";
|
||||||
import $http from "@/config/requestConfig.js";
|
import $http from "@/config/requestConfig.js";
|
||||||
var clear;
|
var clear;
|
||||||
@@ -1146,9 +1149,14 @@ export default {
|
|||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
async checkPermision(){
|
||||||
|
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
|
||||||
|
if (result != 1) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
// 头像上传
|
// 头像上传
|
||||||
afterRead(e) {
|
async afterRead(e) {
|
||||||
let that = this;
|
let that = this;
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: this.$baseUrl + "oss/fileoss",
|
url: this.$baseUrl + "oss/fileoss",
|
||||||
|
|||||||
@@ -103,6 +103,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
checking : false,
|
||||||
playData: {},
|
playData: {},
|
||||||
options: {},
|
options: {},
|
||||||
xieyi: {
|
xieyi: {
|
||||||
@@ -138,7 +139,7 @@
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
iosPaylist: [{
|
iosPaylist: [{
|
||||||
title: "apple pay支付",
|
title: "IAP支付",
|
||||||
id: 3,
|
id: 3,
|
||||||
imgUrl: require("@/static/icon/pay_2.png"),
|
imgUrl: require("@/static/icon/pay_2.png"),
|
||||||
}, ],
|
}, ],
|
||||||
@@ -180,15 +181,45 @@
|
|||||||
//方法
|
//方法
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(["setUserInfo"]),
|
...mapMutations(["setUserInfo"]),
|
||||||
|
// 查询未关闭iap订单
|
||||||
|
async restoreComplateRequest() {
|
||||||
|
let that = this
|
||||||
|
console.log('检测未完成订单')
|
||||||
|
// if (!that.checking) {
|
||||||
|
// that.checking = true
|
||||||
|
// console.log(this.iapChannel, 'this.iapChannel')
|
||||||
|
await this.iapChannel.restoreCompletedTransactions({
|
||||||
|
manualFinishTransaction: true
|
||||||
|
}, function(results) {
|
||||||
|
// console.log(that.checking)
|
||||||
|
// results 格式为数组存放恢复的IAP商品交易信息对象 IAPTransaction,通用需将返回的支付凭证传给后端进行二次认证
|
||||||
|
that.ComplateRequestArr = results
|
||||||
|
console.log('未完成订单数组共有:=》',that.ComplateRequestArr.length )
|
||||||
|
if (results && results.length > 0) {
|
||||||
|
results.map((item, index) => {
|
||||||
|
// "0"为正在支付;"1"为支付成功;"2"为支付失败;"3"为支付已恢复。
|
||||||
|
if (item.transactionState == '1') {
|
||||||
|
// 已经支付,但是没有走逻辑的内购订单 就发给后台做验证
|
||||||
|
that.iapCheck('未完成订单的验证',item, index)
|
||||||
|
// that.finishTransaction(item)
|
||||||
|
} else if(item.transactionState != '1' || item.transactionState != '0') {
|
||||||
|
// 不是正在支付订单,也不是已经支付订单就关闭掉
|
||||||
|
// 其他状态的内购订单
|
||||||
|
that.finishTransaction(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
// }
|
||||||
|
|
||||||
|
},
|
||||||
// 关闭交易订单
|
// 关闭交易订单
|
||||||
finishTransaction(trans) {
|
finishTransaction(trans) {
|
||||||
this.iapChannel.finishTransaction(
|
this.iapChannel.finishTransaction(
|
||||||
trans,
|
trans,
|
||||||
(success) => {
|
(success) => {
|
||||||
console.log("关闭订单成功");
|
console.log("关闭订单成功");
|
||||||
this.setUserInfo({
|
|
||||||
restoreFlag: false
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
(fail) => {
|
(fail) => {
|
||||||
console.log("关闭订单失败");
|
console.log("关闭订单失败");
|
||||||
@@ -196,13 +227,6 @@
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
async showXieyi() {
|
async showXieyi() {
|
||||||
|
|
||||||
// this.$http.get(`sys/agreement/list?key=pay`).then((res) => {
|
|
||||||
// this.xieyi = res.page.list[0];
|
|
||||||
// this.xieyiShow = true;
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
var data = await this.$commonJS.getAgreement(106);
|
var data = await this.$commonJS.getAgreement(106);
|
||||||
if (data.content) {
|
if (data.content) {
|
||||||
data.content = data.content.replace(
|
data.content = data.content.replace(
|
||||||
@@ -231,20 +255,69 @@
|
|||||||
}
|
}
|
||||||
// console.log(this.radioValue)
|
// console.log(this.radioValue)
|
||||||
},
|
},
|
||||||
iphonepay() {
|
requestPayment(orderInfo) {
|
||||||
const that = this;
|
let that = this
|
||||||
// 如果ios已经绑定支付信息,就直接支付,如果没有绑定,就需要先绑定
|
return new Promise((resolve, reject) => {
|
||||||
console.log("检测支付环境...");
|
uni.requestPayment({
|
||||||
plus.payment.getChannels((channels) => {
|
provider: 'appleiap',
|
||||||
console.log(channels, "channels");
|
orderInfo: orderInfo,
|
||||||
for (var i in channels) {
|
success: (res) => {
|
||||||
// 判断是否苹果支付1
|
that.iapCheck(res);
|
||||||
if (channels[i].id === "appleiap") {
|
resolve(res);
|
||||||
that.iapChannel = channels[i];
|
},
|
||||||
that.requestOrder();
|
fail: (err) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
// console.log('其他支付错误', err);
|
||||||
|
that.restoreComplateRequest()
|
||||||
|
if (err.code == 2) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '取消支付,内购订单即将关闭',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '支付失败,内购订单即将关闭',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
reject(err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getProvider() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
uni.getProvider({
|
||||||
|
service: 'payment',
|
||||||
|
success: (res) => {
|
||||||
|
const iapChannel = res.providers.find((channel) => {
|
||||||
|
return (channel.id === 'appleiap')
|
||||||
|
})
|
||||||
|
resolve(iapChannel);
|
||||||
|
// 如果 iapChannel 为 null,说明当前包没有包含iap支付模块。注意:HBuilder基座不包含 iap 通道
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async iphonepay() {
|
||||||
|
const that = this;
|
||||||
|
uni.showLoading({
|
||||||
|
title:"检测支付环境"
|
||||||
|
})
|
||||||
|
console.log("检测支付环境...");
|
||||||
|
this.iapChannel = await this.getProvider()
|
||||||
|
console.log('that.iapChannel',this.iapChannel);
|
||||||
|
if(this.iapChannel){
|
||||||
|
this.requestOrder();
|
||||||
|
}else{
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({
|
||||||
|
title:'不支持内购支付',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
console.log("获取iap支付通道失败:" + e.message, that.iapChannel);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
requestOrder() {
|
requestOrder() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@@ -255,10 +328,14 @@
|
|||||||
console.log(that.stepsCj.priceTypeId, 88888888);
|
console.log(that.stepsCj.priceTypeId, 88888888);
|
||||||
// ['xxxxx'] 是平台申请拿到的内购商品的id
|
// ['xxxxx'] 是平台申请拿到的内购商品的id
|
||||||
let IAPOrders = [];
|
let IAPOrders = [];
|
||||||
IAPOrders.push(that.stepsCj.priceTypeId + "");
|
IAPOrders.push('p' + that.stepsCj.priceTypeId);
|
||||||
console.log(IAPOrders, "IAPOrders");
|
// console.log(IAPOrders, "IAPOrders");
|
||||||
// 新建订单
|
// 新建订单
|
||||||
that.iapChannel.requestOrder(
|
uni.showLoading({
|
||||||
|
title: "正在创建订单",
|
||||||
|
mask: true,
|
||||||
|
});
|
||||||
|
that.iapChannel.requestProduct(
|
||||||
IAPOrders,
|
IAPOrders,
|
||||||
function(event) {
|
function(event) {
|
||||||
// uni.hideLoading()
|
// uni.hideLoading()
|
||||||
@@ -278,57 +355,37 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
topay(id) {
|
async topay(id) {
|
||||||
const that = this;
|
const that = this;
|
||||||
uni.hideLoading();
|
uni.showLoading({
|
||||||
// if(this.chargeOrderSn != '' || this.chargeOrderSn != undefined){ // 判断是不是二次支付的订单
|
title: "正在支付",
|
||||||
// that.orderSn = this.chargeOrderSn
|
mask: true,
|
||||||
// console.log(that.orderSn,'二次支付的订单号')
|
|
||||||
// }
|
|
||||||
// var restoreFlag = true; // 调用支付接口时标记 restoreFlag = true , 实际应用请将标记存储在 storage 中
|
|
||||||
this.setUserInfo({
|
|
||||||
restoreFlag: true
|
|
||||||
});
|
});
|
||||||
console.log(this.userInfo, "更新后的用户信息");
|
let orderInfo = {
|
||||||
plus.payment.request(
|
|
||||||
that.iapChannel, {
|
|
||||||
productid: id,
|
productid: id,
|
||||||
username: that.orderSn, // 用户标识/订单标识
|
username: that.orderSn, // 用户标识/订单标识
|
||||||
|
quantity:1,
|
||||||
manualFinishTransaction: true, // 3.5.1+ 支持,设置此参数后需要开发者主动关闭订单,参见下面的关闭订单方法 finishTransaction()
|
manualFinishTransaction: true, // 3.5.1+ 支持,设置此参数后需要开发者主动关闭订单,参见下面的关闭订单方法 finishTransaction()
|
||||||
},
|
|
||||||
function(result) {
|
|
||||||
// restoreFlag = false; // 支付成功清除标记 restoreFlag = false
|
|
||||||
that.transaction = result;
|
|
||||||
// 支付成功,result 为 IAP商品交易信息对象 IAPTransaction 需将返回的支付凭证传给后端进行二次认证
|
|
||||||
that.iapCheck(result);
|
|
||||||
},
|
|
||||||
function(e) {
|
|
||||||
console.log("错误回调", e);
|
|
||||||
if (e.errCode == 2) {
|
|
||||||
// 用户未绑定支付方式,app内支付流程结束,系统弹出框引导用户绑定支付方式,此过程将跳转到系统应用 AppStore 进行绑定支付方式,绑定成功同步支付成功,用户成功付款
|
|
||||||
plus.runtime.openURL("https://apps.apple.com/account/billing");
|
|
||||||
} else {
|
|
||||||
// restoreFlag = false; // 支付失败清楚标记
|
|
||||||
that.finishTransaction(result);
|
|
||||||
//console.log('订单关闭后的用户信息', that.userInfo);
|
|
||||||
console.log(e);
|
|
||||||
//console.log(e.message)
|
|
||||||
}
|
}
|
||||||
}
|
this.transaction = await this.requestPayment(orderInfo)
|
||||||
);
|
console.log('支付后的that.transaction',this.transaction);
|
||||||
},
|
},
|
||||||
iapCheck(result) {
|
iapCheck(result) {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log("进入后台验证");
|
console.log("进入后台验证");
|
||||||
|
uni.showLoading({
|
||||||
|
title:'正在验证订单结果'
|
||||||
|
})
|
||||||
let data = {
|
let data = {
|
||||||
transactionId: result.transactionIdentifier, // 支付交易id
|
transactionId: result.transactionIdentifier, // 支付交易id
|
||||||
customerOid: that.userInfo.id,
|
customerOid: that.userInfo.id,
|
||||||
productId: result.payment.productid, // 产品id
|
productId: result.payment.productid.slice(1), // 产品id
|
||||||
orderId: result.payment.username, // 系统订单号
|
orderId: result.payment.username, // 系统订单号
|
||||||
receiptData: result.transactionReceipt, // 苹果返回收据
|
receiptData: result.transactionReceipt, // 苹果返回收据
|
||||||
|
// isSandBox:true
|
||||||
// body: that.stepsCj.priceTypeId // 充值类型id
|
// body: that.stepsCj.priceTypeId // 充值类型id
|
||||||
};
|
};
|
||||||
console.log(data, "data");
|
console.log("提交给后台的数据",data);
|
||||||
$http
|
$http
|
||||||
.request({
|
.request({
|
||||||
url: "/Ipa/veri",
|
url: "/Ipa/veri",
|
||||||
@@ -342,19 +399,19 @@
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(JSON.stringify(res));
|
console.log(JSON.stringify(res));
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
//uni.hideLoading()
|
uni.hideLoading()
|
||||||
that.userInfo.restoreFlag == true ?
|
uni.showToast({
|
||||||
that.setUserInfo({
|
title:'充值成功!',
|
||||||
restoreFlag: false
|
icon:'success'
|
||||||
}) :
|
})
|
||||||
"";
|
|
||||||
console.log(that.userInfo.restoreFlag);
|
|
||||||
console.log("充值订单已处理,请留意账户金额变动....");
|
console.log("充值订单已处理,请留意账户金额变动....");
|
||||||
// 服务器验证票据有效后在客户端关闭订单 (iapChannel.finishTransaction)
|
// 服务器验证票据有效后在客户端关闭订单 (iapChannel.finishTransaction)
|
||||||
that.finishTransaction(result);
|
that.finishTransaction(result);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
console.log('后台验证失败=>',e);
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
@@ -449,6 +506,10 @@
|
|||||||
},
|
},
|
||||||
//ios充值
|
//ios充值
|
||||||
iosPay() {
|
iosPay() {
|
||||||
|
// 苹果内购实现思路:
|
||||||
|
// 1.先确认支付通道是否包含苹果内购
|
||||||
|
// 2.检查一下是否存在上次未处理完的订单(主要是支付成功没有走回调的订单),异常订单直接关闭掉,成功没有走回调的提交给后台进行验证
|
||||||
|
// 3.请求并创建新的订单
|
||||||
this.iphonepay();
|
this.iphonepay();
|
||||||
},
|
},
|
||||||
// 充值
|
// 充值
|
||||||
|
|||||||
@@ -6,14 +6,17 @@
|
|||||||
<view class="icon_hua">
|
<view class="icon_hua">
|
||||||
<image src="../../static/homeLogo.png" mode="aspectFit" class="icon_hua_1"></image>
|
<image src="../../static/homeLogo.png" mode="aspectFit" class="icon_hua_1"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="hehan">
|
||||||
|
<image src="../../static/icon/hehan.png" mode="aspectFit" class="icon_hua_1"></image>
|
||||||
|
</view>
|
||||||
<view class="topSearch_box">
|
<view class="topSearch_box">
|
||||||
<image src="../../static/search.png" mode="aspectFit"
|
<image src="../../static/search.png" mode="aspectFit"
|
||||||
@click="onPageJump('/pages/peanut/searchFor')"></image>
|
@click="onPageJump('/pages/peanut/searchFor')"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fourBox nopadding ">
|
<view class="fourBox nopadding" style="">
|
||||||
<view class="fourIcon flexbox noRadius" style="justify-content: space-around;">
|
<view class="fourIcon flexbox noRadius" style="justify-content: space-around; margin-bottom:0; box-shadow: none; ">
|
||||||
<div class="item flexbox" @click="onPageJump('/pages/course/outline')">
|
<div class="item flexbox" @click="onPageJump('/pages/course/outline')">
|
||||||
<image src="../../static/my_01.png" mode="aspectFit"></image>
|
<image src="../../static/my_01.png" mode="aspectFit"></image>
|
||||||
<text>学习大纲</text>
|
<text>学习大纲</text>
|
||||||
@@ -37,7 +40,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="newLeve2">
|
<view class="newLeve2">
|
||||||
<view class="home_nar " style="padding: 0; background-color: #fff;">
|
<view class="home_nar nomargin" style="padding: 0; background-color: #fff;">
|
||||||
<view class="flexbox">
|
<view class="flexbox">
|
||||||
<view :class="['hn_cl_tit',tabsid==item.id?'active':'']" @click="curseClick(item)"
|
<view :class="['hn_cl_tit',tabsid==item.id?'active':'']" @click="curseClick(item)"
|
||||||
v-for="(item, index) in curseTagList" :key="index">
|
v-for="(item, index) in curseTagList" :key="index">
|
||||||
@@ -46,11 +49,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fourBox" style="padding: 0;" v-if="sbuMedicalTagsList && sbuMedicalTagsList.length > 0">
|
<view class="fourBox" style="padding: 0; padding-bottom: 8rpx;" v-if="sbuMedicalTagsList && sbuMedicalTagsList.length > 0">
|
||||||
<view class="childrenBox fourIcon flexbox" style="justify-content: space-around;">
|
<view class="childrenBox fourIcon flexbox" style="justify-content: space-around;">
|
||||||
<div class="item flexbox" @click="curseClickJump(item)" v-for="(item, index) in sbuMedicalTagsList"
|
<div class="item flexbox" @click="curseClickJump(item)" v-for="(item, index) in sbuMedicalTagsList"
|
||||||
:key="index">
|
:key="index">
|
||||||
<image :src="item.icon" mode="aspectFit"></image>
|
<image :src="item.icon" mode="aspectFit" v-if="item.icon != '' && item.icon != null"></image>
|
||||||
<text>{{item.title}}</text>
|
<text>{{item.title}}</text>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
@@ -60,10 +63,10 @@
|
|||||||
<view class="learnBox" >
|
<view class="learnBox" >
|
||||||
<view class="titleBox flexbox">
|
<view class="titleBox flexbox">
|
||||||
<image src="../../static/learing.png" mode="aspectFit"></image>
|
<image src="../../static/learing.png" mode="aspectFit"></image>
|
||||||
<text>正在学习</text>
|
<text>观看记录</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="learn flexbox">
|
<view class="learn flexbox">
|
||||||
<view class="item" v-for="(item, index) in learnList" :key="index" @click="onPageJump('/pages/course/myCourseLearn',item.id)">
|
<view class="item" v-for="(item, index) in learnList" :key="index" @click="onPageJump('/pages/course/courseDetail',item.id)">
|
||||||
<view class="img" style="overflow: hidden;">
|
<view class="img" style="overflow: hidden;">
|
||||||
<image v-if="item.image && item.image != ''" :src="item.image" mode="aspectFit"></image>
|
<image v-if="item.image && item.image != ''" :src="item.image" mode="aspectFit"></image>
|
||||||
<image v-else src="/static/nobg.jpg" mode="widthFix"></image>
|
<image v-else src="/static/nobg.jpg" mode="widthFix"></image>
|
||||||
@@ -177,14 +180,14 @@
|
|||||||
<view class="item" v-for="(item, index) in tryListenList" :key="index"
|
<view class="item" v-for="(item, index) in tryListenList" :key="index"
|
||||||
@click="onPageJump('/pages/course/courseDetail',item.id, item.title)">
|
@click="onPageJump('/pages/course/courseDetail',item.id, item.title)">
|
||||||
<view class="imgcontainer">
|
<view class="imgcontainer">
|
||||||
<image v-if="item.image==''" src="@/static/nobg.jpg" mode="aspectFit"></image>
|
<image v-if="item.image=='' || !item.image" src="@/static/nobg.jpg" mode="aspectFit"></image>
|
||||||
<image v-else :src="item.image" mode="aspectFit"></image>
|
<image v-else :src="item.image" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="buyItems flexbox">
|
<view class="buyItems flexbox">
|
||||||
<view class="txt555">
|
<view class="txt555">
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
<view class="buybtn" @click.stop="onPageJump()">
|
<view class="buybtn" >
|
||||||
<span>购买</span>
|
<span>购买</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -199,6 +202,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle' :iconStyle="iconStyle"></u-back-top>
|
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle' :iconStyle="iconStyle"></u-back-top>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 应对华为审核,去掉app跳转 -->
|
||||||
<view class="appJump ">
|
<view class="appJump ">
|
||||||
<view class="everhealth item flexbox" @click="appjumpfun('nuttyreading')">
|
<view class="everhealth item flexbox" @click="appjumpfun('nuttyreading')">
|
||||||
<view class="img">
|
<view class="img">
|
||||||
@@ -220,7 +224,7 @@
|
|||||||
<!-- 公共组件-每个页面必须引入 -->
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<z-navigation></z-navigation>
|
<z-navigation></z-navigation>
|
||||||
<music-play :playList="myList"></music-play>
|
<!-- <music-play :playList="myList"></music-play> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -304,6 +308,11 @@
|
|||||||
},
|
},
|
||||||
//页面显示
|
//页面显示
|
||||||
onShow() {
|
onShow() {
|
||||||
|
uni.hideTabBar();
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.screen.unlockOrientation();
|
||||||
|
plus.screen.lockOrientation("portrait-primary");
|
||||||
|
// #endif
|
||||||
this.requestAll()
|
this.requestAll()
|
||||||
},
|
},
|
||||||
onTabItemTap() {
|
onTabItemTap() {
|
||||||
@@ -381,7 +390,7 @@
|
|||||||
this.$http
|
this.$http
|
||||||
.post('medical/home/getCourseMedicalTree')
|
.post('medical/home/getCourseMedicalTree')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
if (res.labels.length > 0) {
|
if (res.labels.length > 0) {
|
||||||
this.curseTagList = res.labels
|
this.curseTagList = res.labels
|
||||||
@@ -684,7 +693,7 @@
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import '@/style/mixin.scss';
|
@import '@/style/mixin.scss';
|
||||||
|
.nomargin{margin: 0 !important;}
|
||||||
.nopadding{padding: 0 !important;}
|
.nopadding{padding: 0 !important;}
|
||||||
.noRadius{border-radius: 0 !important;}
|
.noRadius{border-radius: 0 !important;}
|
||||||
.appJump {
|
.appJump {
|
||||||
@@ -1053,11 +1062,13 @@
|
|||||||
|
|
||||||
.childrenBox {
|
.childrenBox {
|
||||||
background-color: #e4eefa !important;
|
background-color: #e4eefa !important;
|
||||||
// @include mshadow(10px, 1);
|
// border:1px solid #e4eefa;
|
||||||
background-color: #fff;
|
border-radius: 6rpx !important;
|
||||||
|
@include mshadow(10px, 1);
|
||||||
|
// background-color: #fff;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
border-radius: 0 !important;
|
// border-radius: 0 !important;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
text {
|
text {
|
||||||
@@ -1108,7 +1119,7 @@
|
|||||||
.fourIcon {
|
.fourIcon {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
box-shadow: 0px 0px 10px 0px rgba(167, 187, 228, 1);
|
box-shadow: 0px 0px 10px 0px rgba(167, 187, 228, 1);
|
||||||
margin-bottom: 8px;
|
// margin-bottom: 8px;
|
||||||
// border: 1px solid #fff;
|
// border: 1px solid #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
@@ -1340,9 +1351,11 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
.newLeve2{
|
.newLeve2{
|
||||||
box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.3);
|
// box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.3);
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
|
border-top: 1px solid #eee;
|
||||||
|
padding-top: 4rpx;
|
||||||
// padding-bottom:2rpx;
|
// padding-bottom:2rpx;
|
||||||
}
|
}
|
||||||
.home_nar {
|
.home_nar {
|
||||||
@@ -1365,7 +1378,7 @@
|
|||||||
// box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.3);
|
// box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.3);
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 120rpx;
|
width: 100rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
@@ -1393,7 +1406,7 @@
|
|||||||
// position: relative;
|
// position: relative;
|
||||||
text {
|
text {
|
||||||
color: #3361a5;
|
color: #3361a5;
|
||||||
font-weight: bold;
|
// font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// .hn_cl_tit.active::after{
|
// .hn_cl_tit.active::after{
|
||||||
|
|||||||
@@ -25,20 +25,11 @@
|
|||||||
<view class="sear_list" v-if="this.show==1">
|
<view class="sear_list" v-if="this.show==1">
|
||||||
|
|
||||||
<view class="flexbox" style="display: flex; flex-wrap: wrap; justify-content: space-evenly;">
|
<view class="flexbox" style="display: flex; flex-wrap: wrap; justify-content: space-evenly;">
|
||||||
<view class="bl_tioa" v-for="(item,index) in bookList" @click="onBookJump(item)">
|
<view class="bl_tioa" v-for="(item,index) in bookList" @click="onpageJump(item)">
|
||||||
<image :src="item.productImages"></image>
|
<image :src="item.productImages"></image>
|
||||||
<view>
|
<view>
|
||||||
<text class="bok_name">{{item.productName}}</text>
|
<text class="bok_name">{{item.productName}}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view>
|
|
||||||
<text>作者:<text style="color: #333;">{{item.authorName}}</text></text>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
<text>出版商:<text style="color: #333;">{{item.publisherName}}</text></text>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
<text style="line-height: 20rpx;">{{item.title}}</text>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -230,12 +221,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 电子书内容跳转
|
// 电子书内容跳转
|
||||||
onBookJump(e) {
|
onpageJump(e) {
|
||||||
console.log(e,'e')
|
console.log(e,'e')
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
// url: '../eBook/bookContent?Id=' + e.id
|
url: '/pages/goods/index/index?id=' + e.productId
|
||||||
url: '../bookShop/commodityDetail?type=2&id=' + e.productId
|
|
||||||
});
|
});
|
||||||
|
// uni.navigateTo({
|
||||||
|
// // url: '../eBook/bookContent?Id=' + e.id
|
||||||
|
// url: '../bookShop/commodityDetail?type=2&id=' + e.productId
|
||||||
|
// });
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<z-nav-bar backState="2000" title="购物车">
|
<z-nav-bar backState="2000" title="购物车">
|
||||||
<view class="curseSet" slot="right" @click="manaCart = !manaCart" style="margin-right: 10px;">
|
<!-- <view class="curseSet" slot="right" @click="manaCart = !manaCart" style="margin-right: 10px;">
|
||||||
<text v-show="!manaCart">管理</text>
|
<text v-show="!manaCart">管理</text>
|
||||||
<text v-show="manaCart">完成</text>
|
<text v-show="manaCart">完成</text>
|
||||||
</view>
|
</view> -->
|
||||||
</z-nav-bar>
|
</z-nav-bar>
|
||||||
</z-nav-bar>
|
</z-nav-bar>
|
||||||
<view class="shopCarContent">
|
<view class="shopCarContent">
|
||||||
<scroll-view scroll-y="true">
|
<scroll-view scroll-y="true">
|
||||||
<view class="cartItem" v-for="(item,index) in cartList" :key="index">
|
<view class="cartItem" v-for="(item,index) in cartList" :key="index">
|
||||||
<view class="select" v-show="manaCart">
|
<view class="select" >
|
||||||
<checkbox :checked="item.checked" @click="checkboxGroupChange(index,item)"
|
<checkbox :checked="item.checked" @click="checkboxGroupChange(index,item)"
|
||||||
class="round checkedItem" />
|
class="round checkedItem" />
|
||||||
</view>
|
</view>
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
// }
|
// }
|
||||||
this.isCartDelShow = this.all
|
this.isCartDelShow = this.all
|
||||||
this.total()
|
this.total()
|
||||||
this.manaCart = this.all
|
// this.manaCart = this.all
|
||||||
} else {
|
} else {
|
||||||
this.all = false
|
this.all = false
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
this.totalPrice = 0
|
this.totalPrice = 0
|
||||||
this.getCartList()
|
this.getCartList()
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
this.manaCart = false
|
// this.manaCart = false
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
console.log('cancel') //点击取消之后执行的代码
|
console.log('cancel') //点击取消之后执行的代码
|
||||||
@@ -265,8 +265,11 @@
|
|||||||
// 商品内容跳转
|
// 商品内容跳转
|
||||||
goDetail(id) {
|
goDetail(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '../bookShop/commodityDetail?id=' + id
|
url: '/pages/goods/index/index?id=' + id
|
||||||
});
|
});
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: '../bookShop/commodityDetail?id=' + id
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -307,7 +307,7 @@
|
|||||||
|
|
||||||
.time { display: block; width: 300rpx;
|
.time { display: block; width: 300rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #bebebe;width: 35%;
|
color: #bebebe;width:39%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
|||||||
@@ -97,6 +97,10 @@
|
|||||||
<button @click="onSubmit" class="active" v-if="btnShow">登 录</button>
|
<button @click="onSubmit" class="active" v-if="btnShow">登 录</button>
|
||||||
<button v-else>登 录</button>
|
<button v-else>登 录</button>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="loginHelp" v-if="submitClickNum > 0">
|
||||||
|
<!-- <view class="loginHelp"> -->
|
||||||
|
<text>登录遇到问题?</text><text class="link" @click="onPageJump('/pages/user/workOrder','login')">去反馈问题</text>
|
||||||
|
</view>
|
||||||
<!-- <view class="password_register" style="margin: 0 auto; text-align: center; display: block;">
|
<!-- <view class="password_register" style="margin: 0 auto; text-align: center; display: block;">
|
||||||
<button @click="onPageJump('/pages/user/register')">注册账号</button>
|
<button @click="onPageJump('/pages/user/register')">注册账号</button>
|
||||||
<text v-if="type == 1000" @click="onPageJump('/pages/user/forget')">忘记密码?</text>
|
<text v-if="type == 1000" @click="onPageJump('/pages/user/forget')">忘记密码?</text>
|
||||||
@@ -118,9 +122,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="youKeL" style="margin-bottom: 80rpx;">
|
<view class="youKeL" style="margin-bottom: 80rpx;" v-if="!isAndorid">
|
||||||
<view @click="onPageJump('/pages/user/visitor')">免登陆体验</view>
|
<view @click="onPageJump('/pages/user/visitor')">免登陆体验</view>
|
||||||
</view> -->
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<z-popup v-model="HealthOpen" type="center" :hideOnBlur="false">
|
<z-popup v-model="HealthOpen" type="center" :hideOnBlur="false">
|
||||||
@@ -245,8 +249,9 @@
|
|||||||
yszcText: {},
|
yszcText: {},
|
||||||
quShow: false,
|
quShow: false,
|
||||||
quCodeList: [], // 国家区域码
|
quCodeList: [], // 国家区域码
|
||||||
quCode: 86,
|
quCode: '86',
|
||||||
|
submitClickNum:0, // 登陆按钮点击次数
|
||||||
|
isAndorid : true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//第一次加载
|
//第一次加载
|
||||||
@@ -260,6 +265,7 @@
|
|||||||
pname: 'com.tencent.mm',
|
pname: 'com.tencent.mm',
|
||||||
action: "weixin://"
|
action: "weixin://"
|
||||||
});
|
});
|
||||||
|
this.getOS()
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
//页面显示
|
//页面显示
|
||||||
@@ -268,10 +274,22 @@
|
|||||||
this.getCountyCode()
|
this.getCountyCode()
|
||||||
this.getSettlement()
|
this.getSettlement()
|
||||||
},
|
},
|
||||||
|
|
||||||
//方法
|
//方法
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['setUserInfo']),
|
...mapMutations(['setUserInfo']),
|
||||||
...mapMutations(['setHealthMes']),
|
...mapMutations(['setHealthMes']),
|
||||||
|
// 获得操作系统
|
||||||
|
getOS() {
|
||||||
|
let oprateOs = "";
|
||||||
|
oprateOs = uni.getSystemInfoSync().platform;
|
||||||
|
// console.log(oprateOs)
|
||||||
|
if (oprateOs == "android") {
|
||||||
|
this.isAndorid = true;
|
||||||
|
} else {
|
||||||
|
this.isAndorid = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
closeMusic() {
|
closeMusic() {
|
||||||
this.$music.setCloseBgm() // 关闭音频
|
this.$music.setCloseBgm() // 关闭音频
|
||||||
uni.setStorage({
|
uni.setStorage({
|
||||||
@@ -364,9 +382,10 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
onPageJump(url) {
|
onPageJump(url,name) {
|
||||||
|
console.log('点击了');
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url
|
url: `${url}?name=${name}`
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onInput() {
|
onInput() {
|
||||||
@@ -428,6 +447,7 @@
|
|||||||
}
|
}
|
||||||
if (this.quCode == null || this.quCode == 86) { // 如果没选择国家code,默认是中国大陆
|
if (this.quCode == null || this.quCode == 86) { // 如果没选择国家code,默认是中国大陆
|
||||||
if (!this.$base.phoneRegular.test(this.phone)) {
|
if (!this.$base.phoneRegular.test(this.phone)) {
|
||||||
|
this.submitClickNum += 1
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '手机格式不正确',
|
title: '手机格式不正确',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -489,7 +509,6 @@
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let httpData = {};
|
let httpData = {};
|
||||||
if (this.type == 2000) {
|
if (this.type == 2000) {
|
||||||
if (this.brand == 3000) {
|
if (this.brand == 3000) {
|
||||||
@@ -502,6 +521,7 @@
|
|||||||
}
|
}
|
||||||
if (this.quCode == null || this.quCode == 86) {
|
if (this.quCode == null || this.quCode == 86) {
|
||||||
if (!this.$base.phoneRegular.test(this.phone)) {
|
if (!this.$base.phoneRegular.test(this.phone)) {
|
||||||
|
this.submitClickNum += 1
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '手机格式不正确',
|
title: '手机格式不正确',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -539,6 +559,7 @@
|
|||||||
this.$http
|
this.$http
|
||||||
.get('book/user/registerOrLogin', httpData)
|
.get('book/user/registerOrLogin', httpData)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
this.submitClickNum = 0
|
||||||
res.userInfo.token = res.token.token;
|
res.userInfo.token = res.token.token;
|
||||||
this.setUserInfo(res.userInfo);
|
this.setUserInfo(res.userInfo);
|
||||||
// socket.init();
|
// socket.init();
|
||||||
@@ -546,15 +567,17 @@
|
|||||||
title: '登录成功',
|
title: '登录成功',
|
||||||
duration: 1000,
|
duration: 1000,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/peanut/home'
|
url: '/pages/peanut/home'
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title:'登陆失败',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
this.submitClickNum += 1
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (!this.phoneEmail) {
|
if (!this.phoneEmail) {
|
||||||
@@ -577,6 +600,7 @@
|
|||||||
this.$http
|
this.$http
|
||||||
.post('book/user/login', httpData)
|
.post('book/user/login', httpData)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
this.submitClickNum = 0
|
||||||
res.userInfo.token = res.token.token;
|
res.userInfo.token = res.token.token;
|
||||||
this.setUserInfo(res.userInfo);
|
this.setUserInfo(res.userInfo);
|
||||||
// socket.init();
|
// socket.init();
|
||||||
@@ -589,6 +613,12 @@
|
|||||||
url: '/pages/peanut/home'
|
url: '/pages/peanut/home'
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title:'登陆失败',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
this.submitClickNum += 1
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -840,6 +870,10 @@
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import '@/style/mixin.scss';
|
@import '@/style/mixin.scss';
|
||||||
|
|
||||||
|
.loginHelp{border: 1px solid #f5dab1; margin-top: 16rpx; font-size: 26rpx; text-align: center;
|
||||||
|
padding: 10rpx; background-color: #fdf6ec; border-radius: 15rpx;
|
||||||
|
.link{color: #e6a23c;}
|
||||||
|
}
|
||||||
.phoneNumberInput {
|
.phoneNumberInput {
|
||||||
width: calc(100% - 160rpx);
|
width: calc(100% - 160rpx);
|
||||||
// width: 100%;
|
// width: 100%;
|
||||||
|
|||||||
@@ -172,6 +172,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import permission from "@/js_sdk/wa-permission/permission.js"
|
||||||
import musicPlay from '@/components/music.vue'
|
import musicPlay from '@/components/music.vue'
|
||||||
import $http from '@/config/requestConfig.js';
|
import $http from '@/config/requestConfig.js';
|
||||||
var clear;
|
var clear;
|
||||||
@@ -530,7 +531,11 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 头像
|
// 头像
|
||||||
choseAvatar(e) {
|
async choseAvatar(e) {
|
||||||
|
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
|
||||||
|
if (result != 1) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
let that = this
|
let that = this
|
||||||
if (that.fileAvatar.length == 0) {
|
if (that.fileAvatar.length == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
417
pages/user/workOrder.vue
Normal file
@@ -0,0 +1,417 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page">
|
||||||
|
<z-nav-bar></z-nav-bar>
|
||||||
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
|
<public-module></public-module>
|
||||||
|
<view class="title">问题反馈/申诉</view>
|
||||||
|
<uni-forms :modelValue="form" :rules="rules" ref="form">
|
||||||
|
<view class="input_box " style="">
|
||||||
|
<uni-forms-item label="" name="type" label-width="0">
|
||||||
|
<view class="">
|
||||||
|
<text class="input_tit"><i>*</i>问题类型:</text>
|
||||||
|
</view>
|
||||||
|
<view class="in" style="flex: 1; border: none;">
|
||||||
|
<!-- <input type="text" v-model="form.type" placeholder="请输入手机号/邮箱" />
|
||||||
|
-->
|
||||||
|
<uni-data-select style="width: 100%;" v-model="form.type"
|
||||||
|
:localdata="typeLIst"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
</view>
|
||||||
|
<view class="input_box">
|
||||||
|
<uni-forms-item label="" name="account" label-width="0">
|
||||||
|
<text class="input_tit"><i>*</i>吴门医述账号:</text>
|
||||||
|
<view class="in">
|
||||||
|
<input placeholder-style="font-size:26rpx" type="text" v-model="form.account"
|
||||||
|
placeholder="请输入手机号/邮箱" />
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
</view>
|
||||||
|
<view class="input_box" v-if="form.type == 3">
|
||||||
|
<uni-forms-item label="" name="relation" label-width="0">
|
||||||
|
<text class="input_tit"><i>*</i>订单编号:</text>
|
||||||
|
<view class="in">
|
||||||
|
<input type="number" @input="relationInput" placeholder-style="font-size:26rpx"
|
||||||
|
v-model="form.relation" placeholder="请输入订单编号" />
|
||||||
|
</view>
|
||||||
|
<text v-show="relationError" style="font-size: 24rpx; color: red; margin-top: 10rpx;">请填写订单编号</text>
|
||||||
|
<text v-show="relationErrorPattern"
|
||||||
|
style="font-size: 24rpx; color: red; margin-top: 10rpx;">订单编号格式错误</text>
|
||||||
|
</uni-forms-item>
|
||||||
|
</view>
|
||||||
|
<view class="input_box">
|
||||||
|
<uni-forms-item label="" name="content" label-width="0">
|
||||||
|
<text class="input_tit"><i>*</i>问题描述:</text>
|
||||||
|
<view class="in">
|
||||||
|
<view class="uni-textarea">
|
||||||
|
<textarea placeholder-style="font-size:26rpx" v-model="form.content" maxlength="200"
|
||||||
|
placeholder="请输入您要反馈的问题" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-forms-item>
|
||||||
|
</view>
|
||||||
|
<view class="input_box">
|
||||||
|
<uni-forms-item label="" name="contactInformation" label-width="0">
|
||||||
|
<text class="input_tit"><i>*</i>联系电话:</text>
|
||||||
|
{{reversedMessage}}
|
||||||
|
<view class="in">
|
||||||
|
<input type="number" placeholder-style="font-size:26rpx" @input="telInput"
|
||||||
|
v-model="form.contactInformation" placeholder="请输入与您联系的手机号" />
|
||||||
|
</view>
|
||||||
|
<text v-show="telError" style="font-size: 24rpx; color: red; margin-top: 10rpx;">手机号格式错误</text>
|
||||||
|
</uni-forms-item>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="input_box">
|
||||||
|
<text class="input_tit">问题截图:</text>
|
||||||
|
<view class="in" style="border: none;" @click="checkPermision">
|
||||||
|
<u-upload :fileList="fileList1" @afterRead="addPic" @delete="deletePic" multiple :maxCount="4"
|
||||||
|
width="40" height="40" :previewFullImage="true">
|
||||||
|
</u-upload>
|
||||||
|
<text style="font-size: 24rpx; color: #999;">可上传4张问题截图</text>
|
||||||
|
</view>
|
||||||
|
<!-- <input type="password" maxlength="8" v-model="confirmPassword" placeholder="请确认密码" /> -->
|
||||||
|
</view>
|
||||||
|
</uni-forms>
|
||||||
|
<view class="btn_box"><button @click="onSubmit">提 交</button></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import $http from '@/config/requestConfig.js';
|
||||||
|
import permission from "@/js_sdk/wa-permission/permission.js"
|
||||||
|
import {
|
||||||
|
mapState,
|
||||||
|
mapMutations
|
||||||
|
} from 'vuex';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fileList1: [],
|
||||||
|
playData: {},
|
||||||
|
//手机号账号
|
||||||
|
form: {
|
||||||
|
account: '', // 账号
|
||||||
|
content: '', // 描述
|
||||||
|
image: '', //图片
|
||||||
|
contactInformation: '', // 联系电话
|
||||||
|
relation: '', // 订单号
|
||||||
|
type: null, // 反馈类型
|
||||||
|
},
|
||||||
|
telError: false,
|
||||||
|
relationError: false,
|
||||||
|
relationErrorPattern:false,
|
||||||
|
rules: {
|
||||||
|
account: {
|
||||||
|
rules: [{
|
||||||
|
required: true,
|
||||||
|
errorMessage: '请输入账号',
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
rules: [{
|
||||||
|
required: true,
|
||||||
|
errorMessage: '请输入问题描述',
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
|
contactInformation: {
|
||||||
|
rules: [{
|
||||||
|
required: true,
|
||||||
|
errorMessage: '请输入联系电话',
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
rules: [{
|
||||||
|
required: true,
|
||||||
|
errorMessage: '请选择反馈类型',
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pageType: '',
|
||||||
|
typeLIst: [
|
||||||
|
// { value: 0, text: "请选择" },
|
||||||
|
{
|
||||||
|
value: "1",
|
||||||
|
text: "登陆相关问题"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "2",
|
||||||
|
text: "账号相关问题"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "3",
|
||||||
|
text: "订单相关问题"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "4",
|
||||||
|
text: "购买相关问题"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "5",
|
||||||
|
text: "VIP相关问题"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "6",
|
||||||
|
text: "充值相关问题"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "7",
|
||||||
|
text: "网络暴力举报"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "8",
|
||||||
|
text: "其他"
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
//第一次加载
|
||||||
|
onLoad(e) {
|
||||||
|
console.log('收到的值', e);
|
||||||
|
this.pageType = e.name
|
||||||
|
switch (this.pageType) {
|
||||||
|
case "login":
|
||||||
|
this.form.type = '1'
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "order":
|
||||||
|
this.form.type = '3'
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
//页面显示
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['userInfo']),
|
||||||
|
reversedMessage: function() {
|
||||||
|
// `this` 指向 vm 实例
|
||||||
|
this.form.account = this.userInfo.tel
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//方法
|
||||||
|
methods: {
|
||||||
|
relationInput(e) {
|
||||||
|
this.relationError = false
|
||||||
|
this.relationErrorPattern = false
|
||||||
|
},
|
||||||
|
telInput(e) {
|
||||||
|
// console.log('键盘输入',e);
|
||||||
|
this.telError = false
|
||||||
|
},
|
||||||
|
async checkPermision(){
|
||||||
|
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
|
||||||
|
if (result != 1) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async addPic(e) {
|
||||||
|
console.log("添加图片");
|
||||||
|
let that = this;
|
||||||
|
for (var i = 0; i < e.file.length; i++) {
|
||||||
|
//console.log(i,e.file[i].url)
|
||||||
|
uni.uploadFile({
|
||||||
|
url: this.$baseUrl + "oss/fileoss",
|
||||||
|
filePath: e.file[i].url,
|
||||||
|
//files:e.file,
|
||||||
|
name: "file",
|
||||||
|
formData: {},
|
||||||
|
success: (res) => {
|
||||||
|
that.fileList1.push({
|
||||||
|
url: JSON.parse(res.data).url,
|
||||||
|
});
|
||||||
|
console.log(that.fileList1, "that.uploadPicLIst");
|
||||||
|
},
|
||||||
|
fail: (error) => {
|
||||||
|
console.log("上传失败", error);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deletePic(event) {
|
||||||
|
this.fileList1.splice(event.index, 1)
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.$refs.form.validate().then(res => {
|
||||||
|
if (this.form.type == 3) {
|
||||||
|
if (this.form.relation == '') {
|
||||||
|
this.relationError = true
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
if (!this.$base.orderRegular.test(this.form.relation)) {
|
||||||
|
this.relationErrorPattern = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.fileList1.length > 0) {
|
||||||
|
let _list = this.fileList1
|
||||||
|
_list = _list.map(item => item.url)
|
||||||
|
// console.log('this.fileList1',_list);
|
||||||
|
this.form.image = _list.join(',')
|
||||||
|
}
|
||||||
|
if (!this.$base.phoneRegular.test(this.form.contactInformation)) {
|
||||||
|
this.telError = true
|
||||||
|
uni.showToast({
|
||||||
|
title: '手机格式不正确',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// console.log('this.fileList1',this.form.image);
|
||||||
|
$http.request({
|
||||||
|
url: "common/sysFeedback/addSysFeedback",
|
||||||
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
data: {
|
||||||
|
...this.form
|
||||||
|
},
|
||||||
|
header: { //默认 无 说明:请求头
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: "提交成功!",
|
||||||
|
showCancel: false,
|
||||||
|
success: (res) => {
|
||||||
|
this.fileList1 = []
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
// })
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}).catch(e => {
|
||||||
|
// console.log('表单错误信息:', err);
|
||||||
|
uni.showToast({
|
||||||
|
title: '提交失败',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('表单错误信息:', err);
|
||||||
|
uni.showToast({
|
||||||
|
title: '页面有未填写的内容哦',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//页面隐藏
|
||||||
|
onHide() {},
|
||||||
|
//页面卸载
|
||||||
|
onUnload() {},
|
||||||
|
//页面下来刷新
|
||||||
|
onPullDownRefresh() {},
|
||||||
|
//页面上拉触底
|
||||||
|
onReachBottom() {},
|
||||||
|
//用户点击分享
|
||||||
|
onShareAppMessage(e) {
|
||||||
|
return this.wxShare();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import '@/style/mixin.scss';
|
||||||
|
::v-deep .uni-forms-item{
|
||||||
|
margin-bottom: 26rpx !important;
|
||||||
|
}
|
||||||
|
.input_tit{
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.page {
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 0 65rpx;
|
||||||
|
min-height: 100vh;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
padding: 30rpx 0 40rpx 0;
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input_box {
|
||||||
|
display: block;
|
||||||
|
// justify-content: space-between;
|
||||||
|
// overflow: hidden;
|
||||||
|
// height: 100rpx;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
|
||||||
|
// border-bottom: 1rpx solid #eeeeee;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
i {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: red;
|
||||||
|
padding-right: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.in {
|
||||||
|
border: 1rpx solid #eeeeee;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
padding: 8rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
font-size: 30rpx;
|
||||||
|
width: 180rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
|
||||||
|
flex: 1;
|
||||||
|
height: 50rpx;
|
||||||
|
// line-height: 70rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
height: 78rpx;
|
||||||
|
line-height: 78rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: $themeColor;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn_box {
|
||||||
|
margin-top: 70rpx;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
|
||||||
|
button {
|
||||||
|
font-size: 32rpx;
|
||||||
|
@include theme('btn_bg') color: #fff;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.protocol {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: $themeColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
5932
static/aliplayercomponents-1.0.9.min.js
vendored
Normal file
BIN
static/icon/hehan.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
static/qiyeWx.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.2 KiB |
BIN
static/vip.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
@@ -2,6 +2,7 @@ export const state = {
|
|||||||
//webView地址
|
//webView地址
|
||||||
webViewUrl: "",
|
webViewUrl: "",
|
||||||
loadingShow: false,
|
loadingShow: false,
|
||||||
|
videoTimer: false,
|
||||||
//微信场景参数
|
//微信场景参数
|
||||||
chatScenesInfo: {},
|
chatScenesInfo: {},
|
||||||
//绑定微信头像昵称弹窗状态
|
//绑定微信头像昵称弹窗状态
|
||||||
@@ -47,6 +48,14 @@ export const mutations = {
|
|||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setVideoTimer(state, data) {
|
||||||
|
if (data) {
|
||||||
|
state.videoTimer = data;
|
||||||
|
// #ifdef H5
|
||||||
|
// window.sessionStorage.setItem('webViewUrl', data);
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
},
|
||||||
//数据加载状态
|
//数据加载状态
|
||||||
setLoadingShow(state, data) {
|
setLoadingShow(state, data) {
|
||||||
if(state.loadingShow){
|
if(state.loadingShow){
|
||||||
@@ -95,6 +104,7 @@ export const mutations = {
|
|||||||
checkIapOrder(){
|
checkIapOrder(){
|
||||||
console.log('验证苹果支付未关闭订单')
|
console.log('验证苹果支付未关闭订单')
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
export const actions = {
|
export const actions = {
|
||||||
|
|
||||||
|
|||||||
1
uni.scss
@@ -66,3 +66,4 @@ $uni-color-subtitle: #555555; // 二级标题颜色
|
|||||||
$uni-font-size-subtitle:36upx;
|
$uni-font-size-subtitle:36upx;
|
||||||
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
||||||
$uni-font-size-paragraph:30upx;
|
$uni-font-size-paragraph:30upx;
|
||||||
|
|
||||||
|
|||||||
141
utils/myIapCheck.js
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
import store from '@/store/index.js'
|
||||||
|
import $http from '@/config/requestConfig.js';
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
const iapChannel = null;
|
||||||
|
const checking = false
|
||||||
|
const ComplateRequestArr = []
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5
|
||||||
|
// const bgm = {};
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
|
var iap = {
|
||||||
|
getProvider() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
uni.getProvider({
|
||||||
|
service: 'payment',
|
||||||
|
success: (res) => {
|
||||||
|
const iapChannel = res.providers.find((channel) => {
|
||||||
|
return (channel.id === 'appleiap')
|
||||||
|
})
|
||||||
|
resolve(iapChannel);
|
||||||
|
// 如果 iapChannel 为 null,说明当前包没有包含iap支付模块。注意:HBuilder基座不包含 iap 通道
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 检测支付通道
|
||||||
|
async getChannels(){
|
||||||
|
const that = this;
|
||||||
|
console.log('检测支付通道')
|
||||||
|
this.iapChannel = await this.getProvider()
|
||||||
|
if(this.iapChannel){
|
||||||
|
// this.requestOrder();
|
||||||
|
this.restoreComplateRequest()
|
||||||
|
}else{
|
||||||
|
console.log("不支持iap支付");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 检测是否有未关闭订单
|
||||||
|
restoreComplateRequest() {
|
||||||
|
let that = this
|
||||||
|
console.log('检测未完成订单')
|
||||||
|
this.iapChannel.restoreCompletedTransactions({
|
||||||
|
manualFinishTransaction: true
|
||||||
|
}, function(results) {
|
||||||
|
if (!that.checking) {
|
||||||
|
that.checking = true
|
||||||
|
// results 格式为数组存放恢复的IAP商品交易信息对象 IAPTransaction,通用需将返回的支付凭证传给后端进行二次认证
|
||||||
|
that.ComplateRequestArr = results
|
||||||
|
console.log('未完成订单数组共有:=》',that.ComplateRequestArr.length ,that.ComplateRequestArr)
|
||||||
|
|
||||||
|
if (that.ComplateRequestArr.length > 0) {
|
||||||
|
that.ComplateRequestArr.map((item, index) => {
|
||||||
|
// "0"为正在支付;"1"为支付成功;"2"为支付失败;"3"为支付已恢复。
|
||||||
|
if (item.transactionState == '1') {
|
||||||
|
console.log('待验证订单,即将进入后台验证:=>', item)
|
||||||
|
// return false
|
||||||
|
// 已经支付,但是没有走逻辑的内购订单 就发给后台做验证
|
||||||
|
that.iapCheck(item, index)
|
||||||
|
// that.finishTransaction(item)
|
||||||
|
} else {
|
||||||
|
// 其他状态的内购订单
|
||||||
|
that.finishTransaction(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 关闭订单
|
||||||
|
finishTransaction(trans) {
|
||||||
|
this.iapChannel.finishTransaction(
|
||||||
|
trans,
|
||||||
|
(success) => {
|
||||||
|
console.log("关闭订单成功");
|
||||||
|
that.checking = false
|
||||||
|
},
|
||||||
|
(fail) => {
|
||||||
|
console.log("关闭订单失败");
|
||||||
|
that.checking = false
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
iapCheck(result) {
|
||||||
|
let that = this;
|
||||||
|
console.log("进入后台验证");
|
||||||
|
let data = {
|
||||||
|
transactionId: result.transactionIdentifier, // 支付交易id
|
||||||
|
customerOid: store.state.userInfo.id,
|
||||||
|
productId: result.payment.productid.slice(1), // 产品id
|
||||||
|
orderId: result.payment.username, // 系统订单号
|
||||||
|
receiptData: result.transactionReceipt, // 苹果返回收据
|
||||||
|
// isSandBox:true
|
||||||
|
// body: that.stepsCj.priceTypeId // 充值类型id
|
||||||
|
};
|
||||||
|
console.log("提交给后台的数据=>", data);
|
||||||
|
// return false
|
||||||
|
$http
|
||||||
|
.request({
|
||||||
|
url: "/Ipa/veri",
|
||||||
|
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||||
|
data,
|
||||||
|
header: {
|
||||||
|
//默认 无 说明:请求头
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
// $http.post('Ipa/veri', data)
|
||||||
|
.then((res) => {
|
||||||
|
// console.log(JSON.stringify(res));
|
||||||
|
if (res.code == 0) {
|
||||||
|
// uni.hideLoading()
|
||||||
|
console.log("充值订单已处理....");
|
||||||
|
// 服务器验证票据有效后在客户端关闭订单 (iapChannel.finishTransaction)
|
||||||
|
that.finishTransaction(result);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log('后台验证失败=>',e);
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
cancelColor:'#0081ff',
|
||||||
|
content: `您的账户下存在验证异常的订单(订单编号为:${e.data.orderId}),可尝试稍后重启app,如不能解决您的问题,可联系官方客服`,
|
||||||
|
cancelText:'已验证关闭订单',
|
||||||
|
confirmText:'知道了',
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
console.log("用户点击确定");
|
||||||
|
}else{
|
||||||
|
console.log('点了取消')
|
||||||
|
that.finishTransaction(result);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// that.finishTransaction(result);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
module.exports = {iap}
|
||||||
|
|
||||||