Compare commits
53 Commits
xie
...
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 | ||
|
|
47b2c774f1 | ||
|
|
e7b000572b |
@@ -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" : "custom",
|
"playground" : "custom",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"playground" : "standard",
|
||||||
|
"type" : "uni-app:app-ios_simulator"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
10
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
|
||||||
@@ -27,7 +26,7 @@
|
|||||||
onLaunch: function(e) {
|
onLaunch: function(e) {
|
||||||
// 检测自动更新
|
// 检测自动更新
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
updata();
|
updata();
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
@@ -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":{
|
|
||||||
"support": false,
|
|
||||||
"loadNativePlugins": false,
|
|
||||||
"visitorEntry": false,
|
|
||||||
"showAlways": false
|
|
||||||
},
|
|
||||||
"styles": {
|
|
||||||
"backgroundColor": "#FFF",
|
|
||||||
"borderRadius":"5px",
|
|
||||||
"title": {
|
|
||||||
"color": "#333"
|
|
||||||
},
|
},
|
||||||
"buttonAccept": {
|
"disagreeMode" : {
|
||||||
"color": "#333"
|
"support" : false,
|
||||||
|
"loadNativePlugins" : false,
|
||||||
|
"visitorEntry" : false,
|
||||||
|
"showAlways" : false
|
||||||
},
|
},
|
||||||
"buttonRefuse": {
|
"styles" : {
|
||||||
"color": "#333"
|
"backgroundColor" : "#FFF",
|
||||||
},
|
"borderRadius" : "5px",
|
||||||
"buttonVisitor": {
|
"title" : {
|
||||||
"color": "#55aaff"
|
"color" : "#333"
|
||||||
|
},
|
||||||
|
"buttonAccept" : {
|
||||||
|
"color" : "#333"
|
||||||
|
},
|
||||||
|
"buttonRefuse" : {
|
||||||
|
"color" : "#333"
|
||||||
|
},
|
||||||
|
"buttonVisitor" : {
|
||||||
|
"color" : "#55aaff"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -19,9 +19,9 @@
|
|||||||
:src="'/' + item.iconPath"
|
:src="'/' + item.iconPath"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
></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>
|
||||||
@@ -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;
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// 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/"; // 开发用电脑
|
||||||
// baseUrl = "http://192.168.110.110:9200/pb/";
|
// baseUrl = "http://192.168.110.110:9200/pb/";
|
||||||
|
|||||||
@@ -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,272 +1,405 @@
|
|||||||
/**
|
/**
|
||||||
* 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启
|
* 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启
|
||||||
*/
|
*/
|
||||||
|
var isIos
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
isIos = (plus.os.name == "iOS")
|
||||||
|
// #endif
|
||||||
|
|
||||||
var isIos
|
// 判断推送权限是否开启
|
||||||
// #ifdef APP-PLUS
|
function judgeIosPermissionPush() {
|
||||||
isIos = (plus.os.name == "iOS")
|
var result = false;
|
||||||
// #endif
|
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 judgeIosPermissionPush() {
|
function judgeIosPermissionLocation() {
|
||||||
var result = false;
|
var result = false;
|
||||||
var UIApplication = plus.ios.import("UIApplication");
|
var cllocationManger = plus.ios.import("CLLocationManager");
|
||||||
var app = UIApplication.sharedApplication();
|
var status = cllocationManger.authorizationStatus();
|
||||||
var enabledTypes = 0;
|
result = (status != 2)
|
||||||
if (app.currentUserNotificationSettings) {
|
console.log("定位权限开启:" + result);
|
||||||
var settings = app.currentUserNotificationSettings();
|
// 以下代码判断了手机设备的定位是否关闭,推荐另行使用方法 checkSystemEnableLocation
|
||||||
enabledTypes = settings.plusGetAttribute("types");
|
/* var enable = cllocationManger.locationServicesEnabled();
|
||||||
console.log("enabledTypes1:" + enabledTypes);
|
var status = cllocationManger.authorizationStatus();
|
||||||
if (enabledTypes == 0) {
|
console.log("enable:" + enable);
|
||||||
console.log("推送权限没有开启");
|
console.log("status:" + status);
|
||||||
} else {
|
if (enable && status != 2) {
|
||||||
result = true;
|
result = true;
|
||||||
console.log("已经开启推送功能!")
|
console.log("手机定位服务已开启且已授予定位权限");
|
||||||
}
|
} else {
|
||||||
plus.ios.deleteObject(settings);
|
console.log("手机系统的定位没有打开或未给予定位权限");
|
||||||
} else {
|
} */
|
||||||
enabledTypes = app.enabledRemoteNotificationTypes();
|
plus.ios.deleteObject(cllocationManger);
|
||||||
if (enabledTypes == 0) {
|
return result;
|
||||||
console.log("推送权限没有开启!");
|
}
|
||||||
} else {
|
|
||||||
result = true;
|
|
||||||
console.log("已经开启推送功能!")
|
|
||||||
}
|
|
||||||
console.log("enabledTypes2:" + enabledTypes);
|
|
||||||
}
|
|
||||||
plus.ios.deleteObject(app);
|
|
||||||
plus.ios.deleteObject(UIApplication);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 判断定位权限是否开启
|
// 判断麦克风权限是否开启
|
||||||
function judgeIosPermissionLocation() {
|
function judgeIosPermissionRecord() {
|
||||||
var result = false;
|
var result = false;
|
||||||
var cllocationManger = plus.ios.import("CLLocationManager");
|
var avaudiosession = plus.ios.import("AVAudioSession");
|
||||||
var status = cllocationManger.authorizationStatus();
|
var avaudio = avaudiosession.sharedInstance();
|
||||||
result = (status != 2)
|
var permissionStatus = avaudio.recordPermission();
|
||||||
console.log("定位权限开启:" + result);
|
console.log("permissionStatus:" + permissionStatus);
|
||||||
// 以下代码判断了手机设备的定位是否关闭,推荐另行使用方法 checkSystemEnableLocation
|
if (permissionStatus == 1684369017 || permissionStatus == 1970168948) {
|
||||||
/* var enable = cllocationManger.locationServicesEnabled();
|
console.log("麦克风权限没有开启");
|
||||||
var status = cllocationManger.authorizationStatus();
|
} else {
|
||||||
console.log("enable:" + enable);
|
result = true;
|
||||||
console.log("status:" + status);
|
console.log("麦克风权限已经开启");
|
||||||
if (enable && status != 2) {
|
}
|
||||||
result = true;
|
plus.ios.deleteObject(avaudiosession);
|
||||||
console.log("手机定位服务已开启且已授予定位权限");
|
return result;
|
||||||
} else {
|
}
|
||||||
console.log("手机系统的定位没有打开或未给予定位权限");
|
|
||||||
} */
|
|
||||||
plus.ios.deleteObject(cllocationManger);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 判断麦克风权限是否开启
|
// 判断相机权限是否开启
|
||||||
function judgeIosPermissionRecord() {
|
function judgeIosPermissionCamera() {
|
||||||
var result = false;
|
var result = false;
|
||||||
var avaudiosession = plus.ios.import("AVAudioSession");
|
var AVCaptureDevice = plus.ios.import("AVCaptureDevice");
|
||||||
var avaudio = avaudiosession.sharedInstance();
|
var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide');
|
||||||
var permissionStatus = avaudio.recordPermission();
|
console.log("authStatus:" + authStatus);
|
||||||
console.log("permissionStatus:" + permissionStatus);
|
if (authStatus == 3) {
|
||||||
if (permissionStatus == 1684369017 || permissionStatus == 1970168948) {
|
result = true;
|
||||||
console.log("麦克风权限没有开启");
|
console.log("相机权限已经开启");
|
||||||
} else {
|
} else {
|
||||||
result = true;
|
console.log("相机权限没有开启");
|
||||||
console.log("麦克风权限已经开启");
|
}
|
||||||
}
|
plus.ios.deleteObject(AVCaptureDevice);
|
||||||
plus.ios.deleteObject(avaudiosession);
|
return result;
|
||||||
return result;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 判断相机权限是否开启
|
// 判断相册权限是否开启
|
||||||
function judgeIosPermissionCamera() {
|
function judgeIosPermissionPhotoLibrary() {
|
||||||
var result = false;
|
var result = false;
|
||||||
var AVCaptureDevice = plus.ios.import("AVCaptureDevice");
|
var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
|
||||||
var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide');
|
var authStatus = PHPhotoLibrary.authorizationStatus();
|
||||||
console.log("authStatus:" + authStatus);
|
console.log("authStatus:" + authStatus);
|
||||||
if (authStatus == 3) {
|
if (authStatus == 3) {
|
||||||
result = true;
|
result = true;
|
||||||
console.log("相机权限已经开启");
|
console.log("相册权限已经开启");
|
||||||
} else {
|
} else {
|
||||||
console.log("相机权限没有开启");
|
console.log("相册权限没有开启");
|
||||||
}
|
}
|
||||||
plus.ios.deleteObject(AVCaptureDevice);
|
plus.ios.deleteObject(PHPhotoLibrary);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断相册权限是否开启
|
// 判断通讯录权限是否开启
|
||||||
function judgeIosPermissionPhotoLibrary() {
|
function judgeIosPermissionContact() {
|
||||||
var result = false;
|
var result = false;
|
||||||
var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
|
var CNContactStore = plus.ios.import("CNContactStore");
|
||||||
var authStatus = PHPhotoLibrary.authorizationStatus();
|
var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0);
|
||||||
console.log("authStatus:" + authStatus);
|
if (cnAuthStatus == 3) {
|
||||||
if (authStatus == 3) {
|
result = true;
|
||||||
result = true;
|
console.log("通讯录权限已经开启");
|
||||||
console.log("相册权限已经开启");
|
} else {
|
||||||
} else {
|
console.log("通讯录权限没有开启");
|
||||||
console.log("相册权限没有开启");
|
}
|
||||||
}
|
plus.ios.deleteObject(CNContactStore);
|
||||||
plus.ios.deleteObject(PHPhotoLibrary);
|
return result;
|
||||||
return result;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 判断通讯录权限是否开启
|
// 判断日历权限是否开启
|
||||||
function judgeIosPermissionContact() {
|
function judgeIosPermissionCalendar() {
|
||||||
var result = false;
|
var result = false;
|
||||||
var CNContactStore = plus.ios.import("CNContactStore");
|
var EKEventStore = plus.ios.import("EKEventStore");
|
||||||
var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0);
|
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0);
|
||||||
if (cnAuthStatus == 3) {
|
if (ekAuthStatus == 3) {
|
||||||
result = true;
|
result = true;
|
||||||
console.log("通讯录权限已经开启");
|
console.log("日历权限已经开启");
|
||||||
} else {
|
} else {
|
||||||
console.log("通讯录权限没有开启");
|
console.log("日历权限没有开启");
|
||||||
}
|
}
|
||||||
plus.ios.deleteObject(CNContactStore);
|
plus.ios.deleteObject(EKEventStore);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断日历权限是否开启
|
// 判断备忘录权限是否开启
|
||||||
function judgeIosPermissionCalendar() {
|
function judgeIosPermissionMemo() {
|
||||||
var result = false;
|
var result = false;
|
||||||
var EKEventStore = plus.ios.import("EKEventStore");
|
var EKEventStore = plus.ios.import("EKEventStore");
|
||||||
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0);
|
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1);
|
||||||
if (ekAuthStatus == 3) {
|
if (ekAuthStatus == 3) {
|
||||||
result = true;
|
result = true;
|
||||||
console.log("日历权限已经开启");
|
console.log("备忘录权限已经开启");
|
||||||
} else {
|
} else {
|
||||||
console.log("日历权限没有开启");
|
console.log("备忘录权限没有开启");
|
||||||
}
|
}
|
||||||
plus.ios.deleteObject(EKEventStore);
|
plus.ios.deleteObject(EKEventStore);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断备忘录权限是否开启
|
// Android权限查询
|
||||||
function judgeIosPermissionMemo() {
|
function requestAndroidPermission(permissionID) {
|
||||||
var result = false;
|
return new Promise((resolve, reject) => {
|
||||||
var EKEventStore = plus.ios.import("EKEventStore");
|
plus.android.requestPermissions(
|
||||||
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1);
|
permissionID.split(","),
|
||||||
if (ekAuthStatus == 3) {
|
// [permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
|
||||||
result = true;
|
function(resultObj) {
|
||||||
console.log("备忘录权限已经开启");
|
var result = 0;
|
||||||
} else {
|
for (var i = 0; i < resultObj.granted.length; i++) {
|
||||||
console.log("备忘录权限没有开启");
|
var grantedPermission = resultObj.granted[i];
|
||||||
}
|
console.log('已获取的权限:' + grantedPermission);
|
||||||
plus.ios.deleteObject(EKEventStore);
|
result = 1
|
||||||
return result;
|
}
|
||||||
}
|
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
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Android权限查询
|
// 使用一个方法,根据参数判断权限
|
||||||
function requestAndroidPermission(permissionID) {
|
function judgeIosPermission(permissionID) {
|
||||||
return new Promise((resolve, reject) => {
|
if (permissionID == "location") {
|
||||||
plus.android.requestPermissions(
|
return judgeIosPermissionLocation()
|
||||||
[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
|
} else if (permissionID == "camera") {
|
||||||
function(resultObj) {
|
return judgeIosPermissionCamera()
|
||||||
var result = 0;
|
} else if (permissionID == "photoLibrary") {
|
||||||
for (var i = 0; i < resultObj.granted.length; i++) {
|
return judgeIosPermissionPhotoLibrary()
|
||||||
var grantedPermission = resultObj.granted[i];
|
} else if (permissionID == "record") {
|
||||||
console.log('已获取的权限:' + grantedPermission);
|
return judgeIosPermissionRecord()
|
||||||
result = 1
|
} else if (permissionID == "push") {
|
||||||
}
|
return judgeIosPermissionPush()
|
||||||
for (var i = 0; i < resultObj.deniedPresent.length; i++) {
|
} else if (permissionID == "contact") {
|
||||||
var deniedPresentPermission = resultObj.deniedPresent[i];
|
return judgeIosPermissionContact()
|
||||||
console.log('拒绝本次申请的权限:' + deniedPresentPermission);
|
} else if (permissionID == "calendar") {
|
||||||
result = 0
|
return judgeIosPermissionCalendar()
|
||||||
}
|
} else if (permissionID == "memo") {
|
||||||
for (var i = 0; i < resultObj.deniedAlways.length; i++) {
|
return judgeIosPermissionMemo()
|
||||||
var deniedAlwaysPermission = resultObj.deniedAlways[i];
|
}
|
||||||
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
|
return false;
|
||||||
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) {
|
function gotoAppPermissionSetting() {
|
||||||
if (permissionID == "location") {
|
if (isIos) {
|
||||||
return judgeIosPermissionLocation()
|
var UIApplication = plus.ios.import("UIApplication");
|
||||||
} else if (permissionID == "camera") {
|
var application2 = UIApplication.sharedApplication();
|
||||||
return judgeIosPermissionCamera()
|
var NSURL2 = plus.ios.import("NSURL");
|
||||||
} else if (permissionID == "photoLibrary") {
|
// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
|
||||||
return judgeIosPermissionPhotoLibrary()
|
var setting2 = NSURL2.URLWithString("app-settings:");
|
||||||
} else if (permissionID == "record") {
|
application2.openURL(setting2);
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 跳转到**应用**的权限页面
|
plus.ios.deleteObject(setting2);
|
||||||
function gotoAppPermissionSetting() {
|
plus.ios.deleteObject(NSURL2);
|
||||||
if (isIos) {
|
plus.ios.deleteObject(application2);
|
||||||
var UIApplication = plus.ios.import("UIApplication");
|
} else {
|
||||||
var application2 = UIApplication.sharedApplication();
|
// console.log(plus.device.vendor);
|
||||||
var NSURL2 = plus.ios.import("NSURL");
|
var Intent = plus.android.importClass("android.content.Intent");
|
||||||
// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
|
var Settings = plus.android.importClass("android.provider.Settings");
|
||||||
var setting2 = NSURL2.URLWithString("app-settings:");
|
var Uri = plus.android.importClass("android.net.Uri");
|
||||||
application2.openURL(setting2);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
plus.ios.deleteObject(setting2);
|
// 检查系统的设备服务是否开启
|
||||||
plus.ios.deleteObject(NSURL2);
|
// var checkSystemEnableLocation = async function () {
|
||||||
plus.ios.deleteObject(application2);
|
function checkSystemEnableLocation() {
|
||||||
} else {
|
if (isIos) {
|
||||||
// console.log(plus.device.vendor);
|
var result = false;
|
||||||
var Intent = plus.android.importClass("android.content.Intent");
|
var cllocationManger = plus.ios.import("CLLocationManager");
|
||||||
var Settings = plus.android.importClass("android.provider.Settings");
|
var result = cllocationManger.locationServicesEnabled();
|
||||||
var Uri = plus.android.importClass("android.net.Uri");
|
console.log("系统定位开启:" + result);
|
||||||
var mainActivity = plus.android.runtimeMainActivity();
|
plus.ios.deleteObject(cllocationManger);
|
||||||
var intent = new Intent();
|
return result;
|
||||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
} else {
|
||||||
var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
|
var context = plus.android.importClass("android.content.Context");
|
||||||
intent.setData(uri);
|
var locationManager = plus.android.importClass("android.location.LocationManager");
|
||||||
mainActivity.startActivity(intent);
|
var main = plus.android.runtimeMainActivity();
|
||||||
}
|
var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
|
||||||
}
|
var result = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER);
|
||||||
|
console.log("系统定位开启:" + result);
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 检查系统的设备服务是否开启
|
let permissionMap = {
|
||||||
// var checkSystemEnableLocation = async function () {
|
"android": {
|
||||||
function checkSystemEnableLocation() {
|
"CAMERA_EXTERNAL_STORAGE": {
|
||||||
if (isIos) {
|
"name": "android.permission.READ_EXTERNAL_STORAGE,android.permission.WRITE_EXTERNAL_STORAGE,android.permission.CAMERA",
|
||||||
var result = false;
|
"title": "相机/相册权限说明",
|
||||||
var cllocationManger = plus.ios.import("CLLocationManager");
|
"content": "便于您使用该功能上传您的照片/图片用于上传用户头像、留言上传图片、申诉反馈上传图片等场景中读取和写入相册和文件内容"
|
||||||
var result = cllocationManger.locationServicesEnabled();
|
},
|
||||||
console.log("系统定位开启:" + result);
|
"CAMERA": {
|
||||||
plus.ios.deleteObject(cllocationManger);
|
"name": "android.permission.CAMERA",
|
||||||
return result;
|
"title": "相机权限说明",
|
||||||
} else {
|
"content": "便于您使用该功能上传您的照片/图片用于上传用户头像、留言上传图片、申诉反馈上传图片等场景中拍摄图片"
|
||||||
var context = plus.android.importClass("android.content.Context");
|
},
|
||||||
var locationManager = plus.android.importClass("android.location.LocationManager");
|
// "EXTERNAL_STORAGE": {
|
||||||
var main = plus.android.runtimeMainActivity();
|
// "name": "android.permission.READ_EXTERNAL_STORAGE,android.permission.WRITE_EXTERNAL_STORAGE",
|
||||||
var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
|
// "title": "相册权限说明",
|
||||||
var result = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER);
|
// "content": "便于您使用该功能上传您的照片/图片/视频及用于上传工单故障、维修图片、扫码识别设备等信息、意见反馈上传图片、上传设备、客户、设备图片等场景中读取和写入相册和文件内容"
|
||||||
console.log("系统定位开启:" + result);
|
// },
|
||||||
return result
|
// "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.02",
|
"versionName" : "1.0.15",
|
||||||
"versionCode" : 1002,
|
"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
11
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": {
|
||||||
@@ -579,7 +588,7 @@
|
|||||||
"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;">
|
||||||
|
|||||||
@@ -931,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: "继续付款",
|
||||||
@@ -1078,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({
|
content:'apple内购订单不支持继续支付,请重新发起支付申请并完成支付',
|
||||||
title: "提示",
|
confirmText:'好的',
|
||||||
showCancel: false,
|
showCancel:false
|
||||||
content:
|
})
|
||||||
"很抱歉,当前订单属于苹果系统内购订单,安卓系统无法完成支付操作,您可切换到苹果系统进行支付,也可以取消该订单,并重新下单",
|
|
||||||
});
|
|
||||||
} 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;
|
||||||
@@ -947,16 +947,8 @@ 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,
|
||||||
@@ -984,21 +976,25 @@ 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({
|
content:'apple内购订单不支持继续支付,请重新发起支付申请并完成支付',
|
||||||
title: "提示",
|
confirmText:'好的',
|
||||||
showCancel: false,
|
showCancel:false
|
||||||
content:
|
})
|
||||||
"很抱歉,当前订单属于苹果系统内购订单,安卓系统无法完成支付操作,您可切换到苹果系统进行支付,也可以取消该订单,并重新下单",
|
// if (this.isAndorid) {
|
||||||
});
|
// uni.showModal({
|
||||||
} else {
|
// title: "提示",
|
||||||
this.iphonepay(payItem);
|
// showCancel: false,
|
||||||
}
|
// content:
|
||||||
|
// "很抱歉,当前订单属于苹果系统内购订单,安卓系统无法完成支付操作,您可切换到苹果系统进行支付,也可以取消该订单,并重新下单",
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// this.iphonepay(payItem);
|
||||||
|
// }
|
||||||
}else if (payItem.paymentMethod == 4){
|
}else if (payItem.paymentMethod == 4){
|
||||||
console.log('天医币二次支付')
|
console.log('天医币二次支付')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
<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"
|
||||||
style="background-color: #fff"
|
style="background-color: #fff"
|
||||||
>
|
>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
v-for="(v, i) in dataList"
|
v-for="(v, i) in dataList"
|
||||||
:class="`video_item ${currentVideo&¤tVideo.id == v.id ? 'hot' : ''}`"
|
:class="`video_item ${currentVideo&¤tVideo.id == v.id ? 'hot' : ''}`"
|
||||||
@@ -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);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -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
@@ -11,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>
|
||||||
|
|
||||||
@@ -327,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",
|
||||||
@@ -334,9 +338,12 @@ 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.screenLoading = false;
|
||||||
|
|
||||||
this.currentCateIndex = this.options.videoIndex
|
this.currentCateIndex = this.options.videoIndex
|
||||||
@@ -345,6 +352,7 @@ export default {
|
|||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
plus.screen.unlockOrientation(); //解除锁定屏幕方向
|
plus.screen.unlockOrientation(); //解除锁定屏幕方向
|
||||||
plus.screen.lockOrientation("portrait-primary");
|
plus.screen.lockOrientation("portrait-primary");
|
||||||
|
|
||||||
this.getCourseDescriptionData();
|
this.getCourseDescriptionData();
|
||||||
|
|
||||||
// this.getUserInfo()
|
// this.getUserInfo()
|
||||||
@@ -445,33 +453,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
@@ -489,13 +470,7 @@ export default {
|
|||||||
customerOid: uni.getStorageSync("customerOid"),
|
customerOid: uni.getStorageSync("customerOid"),
|
||||||
...this.taiHuClassInfo,
|
...this.taiHuClassInfo,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
// $mars.progressBegin('申请中...');
|
|
||||||
// $mars.post(customerType, 'applyRelearn', data, function (ret) {
|
|
||||||
// api.hideProgress();
|
|
||||||
|
|
||||||
// fnLoadDataGrid();
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//课程详情
|
//课程详情
|
||||||
|
|||||||
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"
|
||||||
|
|||||||
@@ -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'])
|
||||||
@@ -122,7 +124,7 @@
|
|||||||
//页面显示
|
//页面显示
|
||||||
onShow() {
|
onShow() {
|
||||||
// 隐藏原生的tabbar
|
// 隐藏原生的tabbar
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
// this.getCoursePriceList()
|
// this.getCoursePriceList()
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
@@ -854,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,
|
||||||
@@ -208,7 +207,8 @@
|
|||||||
plus.screen.unlockOrientation();
|
plus.screen.unlockOrientation();
|
||||||
plus.screen.lockOrientation("portrait-primary");
|
plus.screen.lockOrientation("portrait-primary");
|
||||||
// #endif
|
// #endif
|
||||||
this.getData(this.courseId)
|
this.getData(this.courseId)
|
||||||
|
this.getOS()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
console.log('触底');
|
console.log('触底');
|
||||||
@@ -225,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) {
|
||||||
@@ -885,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 = []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
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,10 +848,25 @@ 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;
|
||||||
},
|
},
|
||||||
onHandleClickBuy() {
|
onHandleClickBuy() {
|
||||||
console.log(
|
console.log(
|
||||||
this.selectGoodsData,
|
this.selectGoodsData,
|
||||||
"this.selectGoodsDatathis.selectGoodsDatathis.selectGoodsData"
|
"this.selectGoodsDatathis.selectGoodsDatathis.selectGoodsData"
|
||||||
@@ -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,
|
||||||
|
|||||||
@@ -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"
|
||||||
@@ -176,67 +218,9 @@
|
|||||||
></view
|
></view
|
||||||
>
|
>
|
||||||
</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">
|
||||||
<view class="xiugai boxShadow box_fillet">
|
<view class="xiugai boxShadow box_fillet">
|
||||||
<common-list
|
<common-list
|
||||||
@@ -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, // 显示电子书相关
|
||||||
@@ -613,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -671,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 {
|
||||||
@@ -703,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -724,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 {
|
||||||
@@ -762,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;
|
||||||
@@ -782,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;
|
||||||
@@ -824,7 +809,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.box_fillet {
|
.box_fillet {
|
||||||
border-radius: 40rpx;
|
border-radius: 20rpx;
|
||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
@@ -833,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 {
|
||||||
padding: 0;
|
margin-bottom: 32rpx;
|
||||||
|
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;
|
||||||
@@ -990,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,8 +208,12 @@ 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;
|
break;
|
||||||
|
case "checkVersion":
|
||||||
|
this.getNewVersion()
|
||||||
|
break;
|
||||||
case "pageJump":
|
case "pageJump":
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: row.url,
|
url: row.url,
|
||||||
@@ -227,26 +222,8 @@ 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;
|
||||||
@@ -431,16 +400,7 @@ export default {
|
|||||||
this.showSearchList = false;
|
this.showSearchList = false;
|
||||||
// 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;
|
||||||
@@ -449,12 +409,9 @@ export default {
|
|||||||
url: "book/medicaldes/typeList?label=" + type,
|
url: "book/medicaldes/typeList?label=" + type,
|
||||||
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, "二级分类获取成功");
|
||||||
@@ -510,16 +467,7 @@ 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,8 +373,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="currentEditType == 'avatar'">
|
<template v-if="currentEditType == 'avatar'" >
|
||||||
<u-upload
|
<view class="" @click="checkPermision">
|
||||||
|
<u-upload
|
||||||
:fileList="fileAvatar"
|
:fileList="fileAvatar"
|
||||||
@afterRead="afterRead"
|
@afterRead="afterRead"
|
||||||
@delete="deletePic"
|
@delete="deletePic"
|
||||||
@@ -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,29 +181,52 @@
|
|||||||
//方法
|
//方法
|
||||||
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("关闭订单失败");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
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,'二次支付的订单号')
|
});
|
||||||
// }
|
let orderInfo = {
|
||||||
// var restoreFlag = true; // 调用支付接口时标记 restoreFlag = true , 实际应用请将标记存储在 storage 中
|
|
||||||
this.setUserInfo({
|
|
||||||
restoreFlag: true
|
|
||||||
});
|
|
||||||
console.log(this.userInfo, "更新后的用户信息");
|
|
||||||
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,
|
||||||
@@ -448,7 +505,11 @@
|
|||||||
that.payType = e;
|
that.payType = e;
|
||||||
},
|
},
|
||||||
//ios充值
|
//ios充值
|
||||||
iosPay() {
|
iosPay() {
|
||||||
|
// 苹果内购实现思路:
|
||||||
|
// 1.先确认支付通道是否包含苹果内购
|
||||||
|
// 2.检查一下是否存在上次未处理完的订单(主要是支付成功没有走回调的订单),异常订单直接关闭掉,成功没有走回调的提交给后台进行验证
|
||||||
|
// 3.请求并创建新的订单
|
||||||
this.iphonepay();
|
this.iphonepay();
|
||||||
},
|
},
|
||||||
// 充值
|
// 充值
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
<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>
|
||||||
@@ -35,22 +38,22 @@
|
|||||||
<text>吴门医述</text>
|
<text>吴门医述</text>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="newLeve2">
|
<view class="newLeve2">
|
||||||
<view class="home_nar nomargin" 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">
|
||||||
<image :src="item.icon" mode="aspectFit"></image>
|
<image :src="item.icon" mode="aspectFit"></image>
|
||||||
<text>{{item.title}}</text>
|
<text>{{item.title}}</text>
|
||||||
</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>
|
||||||
|
|
||||||
@@ -386,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
|
||||||
@@ -1057,13 +1061,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.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 {
|
||||||
color: #3361a5;
|
color: #3361a5;
|
||||||
@@ -1113,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;
|
||||||
@@ -1349,6 +1355,7 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
border-top: 1px solid #eee;
|
border-top: 1px solid #eee;
|
||||||
|
padding-top: 4rpx;
|
||||||
// padding-bottom:2rpx;
|
// padding-bottom:2rpx;
|
||||||
}
|
}
|
||||||
.home_nar {
|
.home_nar {
|
||||||
@@ -1371,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;
|
||||||
@@ -1399,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{
|
||||||
|
|||||||
@@ -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,8 +97,8 @@
|
|||||||
<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" v-if="submitClickNum > 0">
|
||||||
<view class="loginHelp">
|
<!-- <view class="loginHelp"> -->
|
||||||
<text>登录遇到问题?</text><text class="link" @click="onPageJump('/pages/user/workOrder','login')">去反馈问题</text>
|
<text>登录遇到问题?</text><text class="link" @click="onPageJump('/pages/user/workOrder','login')">去反馈问题</text>
|
||||||
</view>
|
</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;">
|
||||||
@@ -122,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">
|
||||||
@@ -249,8 +249,9 @@
|
|||||||
yszcText: {},
|
yszcText: {},
|
||||||
quShow: false,
|
quShow: false,
|
||||||
quCodeList: [], // 国家区域码
|
quCodeList: [], // 国家区域码
|
||||||
quCode: 86,
|
quCode: '86',
|
||||||
submitClickNum:0, // 登陆按钮点击次数
|
submitClickNum:0, // 登陆按钮点击次数
|
||||||
|
isAndorid : true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//第一次加载
|
//第一次加载
|
||||||
@@ -264,6 +265,7 @@
|
|||||||
pname: 'com.tencent.mm',
|
pname: 'com.tencent.mm',
|
||||||
action: "weixin://"
|
action: "weixin://"
|
||||||
});
|
});
|
||||||
|
this.getOS()
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
//页面显示
|
//页面显示
|
||||||
@@ -277,6 +279,17 @@
|
|||||||
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({
|
||||||
@@ -434,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'
|
||||||
@@ -507,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'
|
||||||
@@ -523,7 +538,7 @@
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.$base.mailRegular.test(this.email)) {
|
if (!this.$base.mailRegular.test(this.email)) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '邮箱格式不正确',
|
title: '邮箱格式不正确',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
|||||||
@@ -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({
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<view class="input_box">
|
<view class="input_box">
|
||||||
<uni-forms-item label="" name="contactInformation" label-width="0">
|
<uni-forms-item label="" name="contactInformation" label-width="0">
|
||||||
<text class="input_tit"><i>*</i>联系电话:</text>
|
<text class="input_tit"><i>*</i>联系电话:</text>
|
||||||
{{reversedMessage}}
|
{{reversedMessage}}
|
||||||
<view class="in">
|
<view class="in">
|
||||||
<input type="number" placeholder-style="font-size:26rpx" @input="telInput"
|
<input type="number" placeholder-style="font-size:26rpx" @input="telInput"
|
||||||
v-model="form.contactInformation" placeholder="请输入与您联系的手机号" />
|
v-model="form.contactInformation" placeholder="请输入与您联系的手机号" />
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
<view class="input_box">
|
<view class="input_box">
|
||||||
<text class="input_tit">问题截图:</text>
|
<text class="input_tit">问题截图:</text>
|
||||||
<view class="in" style="border: none;">
|
<view class="in" style="border: none;" @click="checkPermision">
|
||||||
<u-upload :fileList="fileList1" @afterRead="addPic" @delete="deletePic" multiple :maxCount="4"
|
<u-upload :fileList="fileList1" @afterRead="addPic" @delete="deletePic" multiple :maxCount="4"
|
||||||
width="40" height="40" :previewFullImage="true">
|
width="40" height="40" :previewFullImage="true">
|
||||||
</u-upload>
|
</u-upload>
|
||||||
@@ -78,6 +78,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import $http from '@/config/requestConfig.js';
|
import $http from '@/config/requestConfig.js';
|
||||||
|
import permission from "@/js_sdk/wa-permission/permission.js"
|
||||||
import {
|
import {
|
||||||
mapState,
|
mapState,
|
||||||
mapMutations
|
mapMutations
|
||||||
@@ -137,35 +138,35 @@
|
|||||||
typeLIst: [
|
typeLIst: [
|
||||||
// { value: 0, text: "请选择" },
|
// { value: 0, text: "请选择" },
|
||||||
{
|
{
|
||||||
value: 1,
|
value: "1",
|
||||||
text: "登陆相关问题"
|
text: "登陆相关问题"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 2,
|
value: "2",
|
||||||
text: "账号相关问题"
|
text: "账号相关问题"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 3,
|
value: "3",
|
||||||
text: "订单相关问题"
|
text: "订单相关问题"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 4,
|
value: "4",
|
||||||
text: "购买相关问题"
|
text: "购买相关问题"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: "5",
|
||||||
text: "VIP相关问题"
|
text: "VIP相关问题"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 6,
|
value: "6",
|
||||||
text: "充值相关问题"
|
text: "充值相关问题"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 7,
|
value: "7",
|
||||||
text: "网络暴力举报"
|
text: "网络暴力举报"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 8,
|
value: "8",
|
||||||
text: "其他"
|
text: "其他"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -177,11 +178,11 @@
|
|||||||
this.pageType = e.name
|
this.pageType = e.name
|
||||||
switch (this.pageType) {
|
switch (this.pageType) {
|
||||||
case "login":
|
case "login":
|
||||||
this.form.type = 1
|
this.form.type = '1'
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "order":
|
case "order":
|
||||||
this.form.type = 3
|
this.form.type = '3'
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,8 +208,14 @@
|
|||||||
// console.log('键盘输入',e);
|
// console.log('键盘输入',e);
|
||||||
this.telError = false
|
this.telError = false
|
||||||
},
|
},
|
||||||
addPic(e) {
|
async checkPermision(){
|
||||||
// console.log("添加图片");
|
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
|
||||||
|
if (result != 1) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async addPic(e) {
|
||||||
|
console.log("添加图片");
|
||||||
let that = this;
|
let that = this;
|
||||||
for (var i = 0; i < e.file.length; i++) {
|
for (var i = 0; i < e.file.length; i++) {
|
||||||
//console.log(i,e.file[i].url)
|
//console.log(i,e.file[i].url)
|
||||||
@@ -318,15 +325,20 @@
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import '@/style/mixin.scss';
|
@import '@/style/mixin.scss';
|
||||||
|
::v-deep .uni-forms-item{
|
||||||
|
margin-bottom: 26rpx !important;
|
||||||
|
}
|
||||||
|
.input_tit{
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
.page {
|
.page {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
padding: 0 65rpx;
|
padding: 0 65rpx;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
padding: 60rpx 0 40rpx 0;
|
padding: 30rpx 0 40rpx 0;
|
||||||
font-size: 60rpx;
|
font-size: 40rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
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 = {
|
||||||
|
|
||||||
|
|||||||
3
uni.scss
@@ -65,4 +65,5 @@ $uni-font-size-title:40upx;
|
|||||||
$uni-color-subtitle: #555555; // 二级标题颜色
|
$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}
|
||||||
|
|
||||||