8 Commits

Author SHA1 Message Date
@fawn-nine
60f3ad7cb7 超V专享加限制 2024-09-27 11:11:23 +08:00
@fawn-nine
7f17a51c8c 1 2024-09-19 11:45:30 +08:00
@fawn-nine
54a69954dd 支付相关调整 2024-09-19 11:35:36 +08:00
@fawn-nine
e421621155 商品结算 2024-09-18 15:42:17 +08:00
cebe7d7021 wm 2024-09-09 11:21:05 +08:00
@fawn-nine
85c2782b8a 暂存 2024-08-28 10:37:11 +08:00
@fawn-nine
78a1c5ad98 修改课程介绍页面 2024-08-22 17:00:19 +08:00
@fawn-nine
7208cc44c2 修改请求等待时间 2024-08-15 16:45:31 +08:00
10 changed files with 3407 additions and 3313 deletions

View File

@@ -6,8 +6,9 @@ if (process.env.NODE_ENV === 'development') {
// socketUrl = "ws://localhost:6001/";
// baseUrl = "https://twin-ui.com/demo/";
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.110:9200/pb/"; // 磊哥
baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
// baseUrl = "http://59.110.212.44:9200/pb/";
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
// baseUrl = "http://192.168.110.110:9200/pb/";
@@ -17,6 +18,7 @@ if (process.env.NODE_ENV === 'development') {
// 生产环境11
// baseUrl = "http://59.110.212.44:9100/pb/";
// baseUrl = "https://testapi.nuttyreading.com/";
// baseUrl = "http://192.168.110.110:9200/pb/";//磊哥
baseUrl = "https://api.nuttyreading.com/"; //1
// baseUrl = "ws://twin-ui.com:6001/";
// socketUrl = "ws://twin-ui.com:6001/";

View File

@@ -1,273 +1,270 @@
{
"name" : "吴门医述",
"appid" : "__UNI__C7475A8",
"description" : "吴门医述",
"networkTimeout" : {
"request" : 3000
},
"transformPx" : false,
"icons" : [
{
"sizes" : "分辨率192x192",
"src" : "图片路径"
}
],
"versionName" : "1.0.15",
"versionCode" : 1015,
"app-plus" : {
"nvueCompiler" : "weex",
"compatible" : {
"ignoreVersion" : true
},
"screenOrientation" : [
"portrait-primary",
"portrait-secondary",
"landscape-primary",
"landscape-secondary"
],
"privacy" : {
"prompt" : "template",
"template" : {
"title" : "用户协议和隐私政策",
"message" : "请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href='https://wumen.taihumed.com/agreement.html'>《用户协议》</a>和<a href='https://wumen.taihumed.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意",
"buttonRefuse" : "暂不同意"
}
},
"modules" : {
"Payment" : {},
"Share" : {},
"Camera" : {},
"OAuth" : {},
"VideoPlayer" : {}
},
"distribute" : {
"apple" : {
"devices" : "universal"
},
// "UIBackgroundModes" : [ "audio" ]
"android" : {
"permissionPhoneState" : {
"request" : "none",
"prompt" : "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许。"
},
"permissionExternalStorage" : {
"request" : "none",
"prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
},
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"minSdkVersion" : 21,
"targetSdkVersion" : 30,
"schemes" : "medicine"
},
"sdkConfigs" : {
"ad" : {},
"maps" : {},
"share" : {
"weixin" : {
"appid" : "wx6b17b40171dea988",
"UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__C7475A8/"
}
},
"payment" : {
"alipay" : {
"__platform__" : [ "ios", "android" ]
},
"appleiap" : {},
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wx6b17b40171dea988",
"UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__C7475A8/"
}
},
"oauth" : {},
"push" : {}
},
"splashscreen" : {
"iosStyle" : "common",
"androidStyle" : "default",
"useOriginalMsgbox" : true
},
"ios" : {
"dSYMs" : false,
// "UIBackgroundModes" : [ "audio" ], // 背景播放音乐
"capabilities" : {
"entitlements" : {
"com.apple.developer.associated-domains" : [ "applinks:verification.nuttyreading.com" ]
}
},
"idfa" : false,
"urltypes" : "medicine",
"urlschemewhitelist" : "nuttyreading,zmzm",
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用",
"NSCameraUsageDescription" : "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用",
"NSPhotoLibraryAddUsageDescription" : "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用"
}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
},
"compilerVersion" : 3,
"nvueLaunchMode" : "fast",
"splashscreen" : {
"alwaysShowBeforeRender" : false
},
"nativePlugins" : {},
"uniStatistics" : {
"enable" : true
},
"safearea" : {
//安全区域配置仅iOS平台生效
"bottom" : {
// 底部安全区域配置
"offset" : "none" // 底部安全区域偏移,"none"表示不空出安全区域,"auto"自动计算空出安全区域,默认值为"none"
}
}
},
// 5+App特有相关
"quickapp" : {},
// 快应用特有相关
"mp-weixin" : {
"setting" : {
"urlCheck" : false,
"es6" : true,
"postcss" : true,
"minified" : true
},
"usingComponents" : true,
"appid" : "wxd3ba52b7661b36be",
"permission" : {
"scope.userLocation" : {
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
}
},
"uniStatistics" : {
"enable" : true
}
},
"h5" : {
"template" : "template.h5.html",
"router" : {
"mode" : "hash",
"base" : "/uniappDemo/"
},
"optimization" : {
"treeShaking" : {
"enable" : true
}
},
"uniStatistics" : {
"enable" : true
}
},
"_spaceID" : "mp-3614b80b-2d75-4462-a481-4998f8187274",
"uniStatistics" : {
"version" : "2",
"enable" : true
},
"mp-alipay" : {
"uniStatistics" : {
"enable" : true
}
},
"mp-baidu" : {
"uniStatistics" : {
"enable" : true
}
},
"mp-jd" : {
"uniStatistics" : {
"enable" : true
}
},
"mp-kuaishou" : {
"uniStatistics" : {
"enable" : true
}
},
"mp-lark" : {
"uniStatistics" : {
"enable" : true
}
},
"mp-qq" : {
"uniStatistics" : {
"enable" : true
}
},
"mp-toutiao" : {
"uniStatistics" : {
"enable" : true
}
},
"quickapp-webview-huawei" : {
"uniStatistics" : {
"enable" : true
}
},
"quickapp-webview-union" : {
"uniStatistics" : {
"enable" : true
}
}
"name": "吴门医述",
"appid": "__UNI__C7475A8",
"description": "吴门医述",
"networkTimeout": {
"request": 15000
},
"transformPx": false,
"icons": [{
"sizes": "分辨率192x192",
"src": "图片路径"
}],
"versionName": "1.0.18",
"versionCode": 1018,
"app-plus": {
"nvueCompiler": "weex",
"compatible": {
"ignoreVersion": true
},
"screenOrientation": [
"portrait-primary",
"portrait-secondary",
"landscape-primary",
"landscape-secondary"
],
"privacy": {
"prompt": "template",
"template": {
"title": "用户协议和隐私政策",
"message": "请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href='https://wumen.taihumed.com/agreement.html'>《用户协议》</a>和<a href='https://wumen.taihumed.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept": "同意",
"buttonRefuse": "暂不同意"
}
},
"modules": {
"Payment": {},
"Share": {},
"Camera": {},
"OAuth": {},
"VideoPlayer": {}
},
"distribute": {
"apple": {
"devices": "universal"
},
// "UIBackgroundModes" : [ "audio" ]
"android": {
"permissionPhoneState": {
"request": "none",
"prompt": "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许。"
},
"permissionExternalStorage": {
"request": "none",
"prompt": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
},
"permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
"minSdkVersion": 21,
"targetSdkVersion": 30,
"schemes": "medicine"
},
"sdkConfigs": {
"ad": {},
"maps": {},
"share": {
"weixin": {
"appid": "wx6b17b40171dea988",
"UniversalLinks": "https://verification.nuttyreading.com/uni-universallinks/__UNI__C7475A8/"
}
},
"payment": {
"alipay": {
"__platform__": ["ios", "android"]
},
"appleiap": {},
"weixin": {
"__platform__": ["ios", "android"],
"appid": "wx6b17b40171dea988",
"UniversalLinks": "https://verification.nuttyreading.com/uni-universallinks/__UNI__C7475A8/"
}
},
"oauth": {},
"push": {}
},
"splashscreen": {
"iosStyle": "common",
"androidStyle": "default",
"useOriginalMsgbox": true
},
"ios": {
"dSYMs": false,
// "UIBackgroundModes" : [ "audio" ], // 背景播放音乐
"capabilities": {
"entitlements": {
"com.apple.developer.associated-domains": ["applinks:verification.nuttyreading.com"]
}
},
"idfa": false,
"urltypes": "medicine",
"urlschemewhitelist": "nuttyreading,zmzm",
"privacyDescription": {
"NSPhotoLibraryUsageDescription": "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用",
"NSCameraUsageDescription": "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用",
"NSPhotoLibraryAddUsageDescription": "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用"
}
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
}
},
"compilerVersion": 3,
"nvueLaunchMode": "fast",
"splashscreen": {
"alwaysShowBeforeRender": false
},
"nativePlugins": {},
"uniStatistics": {
"enable": true
},
"safearea": {
//安全区域配置仅iOS平台生效
"bottom": {
// 底部安全区域配置
"offset": "none" // 底部安全区域偏移,"none"表示不空出安全区域,"auto"自动计算空出安全区域,默认值为"none"
}
}
},
// 5+App特有相关
"quickapp": {},
// 快应用特有相关
"mp-weixin": {
"setting": {
"urlCheck": false,
"es6": true,
"postcss": true,
"minified": true
},
"usingComponents": true,
"appid": "wxd3ba52b7661b36be",
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"uniStatistics": {
"enable": true
}
},
"h5": {
"template": "template.h5.html",
"router": {
"mode": "hash",
"base": "/uniappDemo/"
},
"optimization": {
"treeShaking": {
"enable": true
}
},
"uniStatistics": {
"enable": true
}
},
"_spaceID": "mp-3614b80b-2d75-4462-a481-4998f8187274",
"uniStatistics": {
"version": "2",
"enable": true
},
"mp-alipay": {
"uniStatistics": {
"enable": true
}
},
"mp-baidu": {
"uniStatistics": {
"enable": true
}
},
"mp-jd": {
"uniStatistics": {
"enable": true
}
},
"mp-kuaishou": {
"uniStatistics": {
"enable": true
}
},
"mp-lark": {
"uniStatistics": {
"enable": true
}
},
"mp-qq": {
"uniStatistics": {
"enable": true
}
},
"mp-toutiao": {
"uniStatistics": {
"enable": true
}
},
"quickapp-webview-huawei": {
"uniStatistics": {
"enable": true
}
},
"quickapp-webview-union": {
"uniStatistics": {
"enable": true
}
}
}
// 小程序特有相关
//

View File

@@ -1088,10 +1088,22 @@ export default {
// 商品内容跳转
goDetail(id, data) {
console.log("data at line 1277:", data);
console.log("data at line 1277:订单详情参数", data);
if (data.delFlag == -1) {
this.$commonJS.showToast("商品已下架");
} else {
}else if(data.goodsType == '05'){
if(data.courseIds && data.courseIds.length > 0){
uni.navigateTo({
url: `/pages/course/courseDetail?id=${data.courseIds[0].courseId}`,
});
}else{
uni.showToast({
title: "课程数据出错",
icon: "none"
});
}
} else {
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/goods/index/index?navTitle=''&title=''&id=${id}`,

View File

@@ -50,7 +50,7 @@
: ''
}`"
>
<view class="image_box" style="margin-right: 10rpx">
<view class="image_box" style="margin-right: 10rpx; ">
<image
:src="slotProps.row.productImages"
mode="aspectFit"
@@ -58,12 +58,17 @@
></image>
</view>
<view :class="`goods_info `">
<view :class="`goods_info flex_box just`" style="justify-content: space-between;">
<view class="name">{{ slotProps.row.productName }}</view>
<view class="price" style="color: #258feb"
>{{ slotProps.row.activityPrice?slotProps.row.activityPrice:slotProps.row.price }}</view
></view
>
<view class="flex_box">
<text style="color: #999; text-decoration: line-through; margin-right: 20rpx;"
v-if="slotProps.row.activityPrice > 0 && slotProps.row.activityPrice < slotProps.row.price" >{{slotProps.row.price}}</text>
<view class="price" style="color: #258feb"
>{{ slotProps.row.activityPrice?slotProps.row.activityPrice:slotProps.row.price }}</view
></view
>
</view>
</view>
<!-- <text v-if="slotProps.row.conditions!='03'">试听</text> -->

View File

@@ -3,24 +3,24 @@
<view style="width: 100%; height: 200px">
<view v-if="showCountDown" class="showCountDownd" style="">
<view class="">
<text class="nextText">{{secondCountDown}} 秒后播放下一个视频</text><br/>
<view >
<text class="cancelNext" @click="hideNextVideo">取消下一个</text>
<!-- <text class="cancelNext" @click="replayVideo">重新播放</text> -->
<text class="nextText">{{secondCountDown}} 秒后播放下一个视频</text><br />
<view>
<text class="cancelNext" @click="hideNextVideo">取消下一个</text>
<!-- <text class="cancelNext" @click="replayVideo">重新播放</text> -->
</view>
<!-- <view class="cancelNext" @click="hideNextVideo">重新播放</view> -->
</view>
</view>
<view v-if="show"
style="height: 100%;display: flex;align-items:center;justify-content:center;color: #fff;font-size: 38rpx;text-align: center;">
{{errorTxt}}</view>
{{errorTxt}}
</view>
<div class="" v-else style="background-color: #000" ref="videoContent" @tap="renderScript.handleClick"
id="url-player-test" :videoData="videoData" :winWidth="winWidth" :winHeight="winHeight"
:currentVideoList="currentVideoList" :firstTime="firstTime" :isfresh="isfresh" :platform="platform"
:isSetFirstTime="isSetFirstTime" :isChange="isChange" :change:videoData="renderScript.receiveMsg"
:replayVideoFlag="replayVideoFlag"
:change:winWidth="renderScript.receiveWinWidth" :change:winHeight="renderScript.receiveWinHeight"
:change:firstTime="renderScript.receiveFirstTime"
:replayVideoFlag="replayVideoFlag" :change:winWidth="renderScript.receiveWinWidth"
:change:winHeight="renderScript.receiveWinHeight" :change:firstTime="renderScript.receiveFirstTime"
:change:replayVideoFlag="renderScript.receiveReplayVideoFlag"
:change:isSetFirstTime="renderScript.receiveisSetFirstTime"
:change:isfresh="renderScript.receiveIsfresh" :change:platform="renderScript.receiveplatform"
@@ -71,7 +71,7 @@
} from "vuex";
export default {
props: ["currentVideo", "currentVideoList", "videoTitle",'secondCountDown'],
props: ["currentVideo", "currentVideoList", "videoTitle", 'secondCountDown'],
data() {
return {
reaquestFlag: false,
@@ -83,13 +83,13 @@
isChange: false,
isControl: true,
timer: null,
replayVideoFlag:false,
replayVideoFlag: false,
// secondCountDown: 5,
showCountDown: false,
playEndBlank:false,
playEndBlank: false,
// videoTitle: "",
videoList: [],
replayVideoLock:false,// 重播操作锁
replayVideoLock: false, // 重播操作锁
firstTime: 0,
options: {},
playAuth: "",
@@ -142,40 +142,42 @@
},
methods: {
replayVideo(){
if(!this.replayVideoFlag){
replayVideo() {
if (!this.replayVideoFlag) {
this.getLive(true, this.currentVideo)
console.log('this.currentVideo',this.currentVideo.id);
this.hideNextVideo()
console.log('this.currentVideo', this.currentVideo.id);
this.hideNextVideo()
this.replayVideoFlag = true
}
},
replayVideoFlagFalse(){
console.log('复原replayVideoFlag',this.replayVideoFlag);
replayVideoFlagFalse() {
console.log('复原replayVideoFlag', this.replayVideoFlag);
this.replayVideoFlag = false
},
UnlockChangeVideo(){
UnlockChangeVideo() {
this.$emit('unlockChangeVideo')
},
hideNextVideo(){
hideNextVideo() {
this.showCountDown = false
this.playEndBlank = false
this.$emit('hideNextVideo')
},
loadNextVideo() {
loadNextVideo() {
this.playEndBlank = true
var _list = [...this.currentVideoList]
_list = _list.map(item => { return item.id})
var thisIndex = _list.findIndex(item=>{
_list = _list.map(item => {
return item.id
})
var thisIndex = _list.findIndex(item => {
return item == this.currentVideo.id
})
console.log('播放列表',_list,this.currentVideo.id, thisIndex);
if(thisIndex < this.currentVideoList.length-1){
console.log('播放列表', _list, this.currentVideo.id, thisIndex);
if (thisIndex < this.currentVideoList.length - 1) {
this.showCountDown = true
this.$emit('startNextVideoCountDown')
}
},
openShow(data) {
@@ -233,7 +235,7 @@
this.videoId = this.options.video;
console.log("这是苹果视屏id", this.videoId);
await this.getLive(isChange,this.options);
await this.getLive(isChange, this.options);
},
// 配置播放项
async getData(data, isChange) {
@@ -303,7 +305,7 @@
},
// 获取播放凭证
async getLive(isChange, newVideoData) {
console.log('获取播放凭证',newVideoData.id);
console.log('获取播放凭证11111111111111', newVideoData);
if (this.reaquestFlag) {
uni.showToast({
title: '操作太快了,歇一下吧',
@@ -332,7 +334,7 @@
},
})
.then(async (res) => {
this.reaquestFlag = false
if (this.$platform == 'ios') {
if (this.currentVideo.type == 1 && res.video.m3u8Url == null || this.currentVideo
@@ -451,7 +453,7 @@
var curStatus = null
var diff = 0
var pauseTime = 0
var myplayer = undefined
var myplayer = undefined
import $ from 'jquery'
export default {
components: {
@@ -481,7 +483,7 @@
},
methods: {
handleClick(event, ownerInstance) {
console.log('是否了走了点击video事件', event)
console.log('是否了走了点击video事件', event)
},
emitData(event, ownerInstance) {
var that = this;
@@ -492,24 +494,24 @@
},
receiveReplayVideoFlag(newValue, oldValue, ownerVm, vm) {
console.log('newValue重新播放',newValue,myplayer);
console.log('newValue重新播放', newValue, myplayer);
ReplayVideoFlag = newValue
if(newValue){
if (newValue) {
$('.videoContent8').click()
// ReplayVideoFlag = newValue
// // myplayer.replay()
// $('.videoContent7').click()
// myplayer.seek(0)
// // myplayer.replay()
// $('.videoContent7').click()
// myplayer.seek(0)
// myplayer.play()
}
},
emitReplayVideoFlagFalse(event, ownerInstance) {
ownerInstance.callMethod('replayVideoFlagFalse')
ownerInstance.callMethod('replayVideoFlagFalse')
},
emitUnlockChangeVideo(event, ownerInstance) {
ownerInstance.callMethod('UnlockChangeVideo')
ownerInstance.callMethod('UnlockChangeVideo')
},
async receiveFirstTime(newValue, oldValue, ownerVm, vm) {
@@ -576,10 +578,10 @@
},
// renderjs阿里云播放器引入与配置
getLive() {
console.log('这是这只只是666666:', this.firstTime, this.videoData)
$('#url-player-test').empty();
console.log('这是这只只是666666:', this.firstTime, this.videoData)
$('#url-player-test').empty();
pauseTime = 0
var fullScreenButtonComponent = Aliplayer.Component({
/**
@@ -614,7 +616,7 @@
this.$html.show();
// this.$html.hide();
},
});
// console.log('这是查看是否获取到hlstoken', this.videoData)
var playerOptions = {
@@ -760,9 +762,9 @@
$('.videoContent9').click()
})
player.on('play', function() {
console.log('开始播放------');
console.log('开始播放------');
$('.videoContent7').click()
if(pauseTime > 0){
if (pauseTime > 0) {
player.seek(pauseTime);
}
})
@@ -772,21 +774,21 @@
// if(ReplayVideoFlag){
// player.seek(0);
// }else{
var videoDurationTimes = parseInt(player.getDuration())
// var firstTime = parseInt(player.getCurrentTime())
console.log('视频总长度',parseInt(player.getDuration()),parseInt(player.getCurrentTime()));
if(videoData.firstTime < videoDurationTimes){
var videoDurationTimes = parseInt(player.getDuration())
// var firstTime = parseInt(player.getCurrentTime())
console.log('视频总长度', parseInt(player.getDuration()), parseInt(player.getCurrentTime()));
if (videoData.firstTime < videoDurationTimes) {
player.seek(videoData.firstTime);
}else{
player.seek(0);
}
} else {
player.seek(0);
}
//}
})
myplayer.on('playing', function() {
console.log('正在播放...')
})
myplayer.on('timeupdate', function() {
let that = this
var _time = parseInt(player.getCurrentTime())
@@ -808,12 +810,12 @@
$('.videoContent2').click()
$('.videoContent6').click()
})
player.on('pause', function() {
player.on('pause', function() {
pauseTime = parseInt(player.getCurrentTime())
player.pause(true)
console.log('触发暂停', pauseTime)
console.log('触发暂停', pauseTime)
})
myplayer.on('error', function() {
console.log('播放出错')
$('.videoContent5').click()
@@ -873,8 +875,8 @@
//数据变化
videoData = newValue
if (videoData) {
return
console.log('切换后的播放数据videoData',videoData.type);
return
console.log('切换后的播放数据videoData', videoData.type);
if (videoData.type == 1) {
if (videoData.m3u8Url != '' && videoData.m3u8Url != null) {
// myplayer.source(videoData.m3u8Url)
@@ -942,29 +944,40 @@
}
</script>
<style>
.cancelNext{display: inline-block; margin-right: 20rpx;
border-radius: 10rpx; margin-top: 10rpx;
padding: 10rpx 20rpx !important; background-color: #fff !important;
color: #000; text-align: center; line-height: 50rpx;}
.cancelNext {
display: inline-block;
margin-right: 20rpx;
border-radius: 10rpx;
margin-top: 10rpx;
padding: 10rpx 20rpx !important;
background-color: #fff !important;
color: #000;
text-align: center;
line-height: 50rpx;
}
/* .cancelNext:last-child{margin-left: 10rpx;} */
.nextText{}
.showCountDownd {
box-sizing: border-box;
height: 100%; width: 100%; background-color: rgba(0, 0, 0, 0.6);
.nextText {}
.showCountDownd {
box-sizing: border-box;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content:flex-end;
justify-content: flex-end;
color: #fff;
font-size: 38rpx;
text-align: center;
position: absolute;
top: 0; right: 10rpx;
top: 0;
right: 10rpx;
z-index: 4;
text{
}
text {}
}
.container {

View File

@@ -16,20 +16,23 @@
left: 0;
width: 100%;
z-index: 10;
" type="warning" @click="handleClickGetVip" :title="goBuyTitle" :show-icon="true"></u-alert>
<template slot="rightSlot" slot-scope="slotProps">
<text class="saveBtn vipBtn flexbox buyBtn" v-if="goBuyType == 0">
立即购买
</text>
<text class="flexbox" style="color: #f0f0f0" v-if="goBuyType == 1">
立即续费
</text>
<text class="saveBtn vipBtn flexbox" v-if="goBuyType == 2">
立即升级
</text>
" type="warning" @click="handleClickGetVip" :title="goBuyTitle" :show-icon="true">
<template slot="rightSlot" slot-scope="slotProps">
<text class="saveBtn vipBtn flexbox buyBtn" v-if="goBuyType == 0">
立即购买
</text>
<text class="flexbox" style="color: #f0f0f0" v-if="goBuyType == 1">
立即续费
</text>
<text class="saveBtn vipBtn flexbox" style="padding: 8rpx;font-size: 24rpx;" v-if="goBuyType == 2">
立即升级
</text>
<text class="saveBtn vipBtn flexbox" style="padding: 8rpx;font-size: 24rpx;" v-if="goBuyType == 3">
立即升级
</text>
<view> </view>
</template>
<view> </view>
</template>
</u-alert>
<!-- <scroll-view scroll-y="true" class="scroll-Y"> -->
@@ -48,24 +51,18 @@
</view>
<view class="containerBg" v-if="course.content && course.content != ''">
<view class="prof">
<view style="
position: relative;
display: flex;
align-items: center;
" @click="isHideCourseInfo = !isHideCourseInfo">
<view style="position: relative; display: flex; align-items: center">
<view :class="`${isHideCourseInfo ? 'hidden2' : ''}`"
style="width: calc(100% - 50rpx); font-size: 30rpx;" v-html="course.content">
style="width: calc(100% - 50rpx); font-size: 30rpx" v-html="course.content">
</view>
<!-- <text
style="
<text @click="isHideCourseInfo = !isHideCourseInfo" style="
position: absolute;
bottom: 0;
right: 0;
color: #838588;
"
>
{{ isHideCourseInfo ? "展开" : "收起" }}
</text> -->
">
{{ isHideCourseInfo ? "展开" : "收起" }}
</text>
</view>
</view>
</view>
@@ -75,44 +72,49 @@
<view class="containerBg2">
<!-- 目录 -->
<view :class="['coursePart','flexbox', userMsg.vip != 0 ? 'vipBgColor':'']"
v-if="librayList.length > 1">
<view :class="['item','flexbox',curId == item.id? 'active': '' ]"
v-for="(item, index) in librayList" :key="index" @click="clicklib(item,index)">
<view class=""><text>{{item.title}}</text></view>
<view :class="[
'coursePart',
'flexbox',
userMsg.vip != 0 ? 'vipBgColor' : '',
]" v-if="librayList.length > 1">
<view :class="['item', 'flexbox', curId == item.id ? 'active' : '']"
v-for="(item, index) in librayList" :key="index" @click="clicklib(item, index)">
<view class=""><text>{{ item.title }}</text></view>
</view>
</view>
<!-- end -->
<template v-if="librayList[curIndex]">
<view :class="['endBox',userMsg.vip != 0 ? 'vipBgColor':'']"
<view :class="['endBox', userMsg.vip != 0 ? 'vipBgColor' : '']"
v-if="librayList[curIndex].isBuy == 1 || userMsg.vip != 0">
<!-- 已经可以观看的情况 -->
<view class="box">
<view class="flexbox" v-if="userMsg.vip != 0">
<!-- vip到期时间 -->
<text>VIP畅学权益有效期截止到{{userMsg.userVip.endTime}} </text>
<view class="flexbox" v-if="userMsg.vip != 0">
<!-- vip到期时间 -->
<text>VIP畅学权益有效期截止到{{ userMsg.userVip.endTime }}
</text>
<!-- <uni-tag type="warning" text="去学习"></uni-tag> -->
</view>
<view class="flexbox" v-else>
<template v-if="librayList[curIndex].startTime == null">
<text>当前目录还未开始学习</text>
<template v-if="librayList[curIndex].startTime == null">
<text>当前目录还未开始学习</text>
</template>
<template v-else>
<!-- 实际购买课程到期时间 -->
<text style="line-height: 50rpx;">课程有效期截止到{{librayList[curIndex].endTime}} </text>
<text style="line-height: 50rpx">课程有效期截止到{{ librayList[curIndex].endTime }}
</text>
<!-- 自己买的可以续费 -->
<text class="xufeiBtn"
@click="handleClickGetGoodsList(librayList[curIndex])">续费</text>
</template>
</template>
</view>
</view>
</view>
<view v-else style="padding: 20rpx; padding-bottom: 0;">
<view v-else style="padding: 20rpx; padding-bottom: 0">
<view class="libOther">
<!-- 没有观看权限的时候 -->
<view class="text">
您未购买此目录课程或已到期购买后或开通超级VIP 即可学习本目录课程
您未购买此目录课程或已到期购买后或开通超级VIP
即可学习本目录课程
</view>
<view class="tag-view flex_box">
<u-button class="btn" type="warning" size="small"
@@ -126,38 +128,47 @@
</template>
<view class="shiting_content">
<view :class="['chapter_content',userMsg.vip != 0 ? 'vipchapter_content' : '']"
v-if="chapterList.length > 0">
<view :class="[
'chapter_content',
userMsg.vip != 0 ? 'vipchapter_content' : '',
]" v-if="chapterList.length > 0">
<view class="vipSee" v-if="userMsg && userMsg.vip != 0">
<text>VIP畅学权益生效中</text>
</view>
<view @click="gotoDetail(item, index)" class="item" v-for="(item, index) in chapterList"
:key="index">
<view class="item_videoList">
<view class="flexbox" style="align-items: center;">
<view
:class="['textBox','flex_box', librayList[curIndex].isBuy == 0 ? 'lock' : '']">
<view class="flexbox" style="align-items: center">
<view :class="[
'textBox',
'flex_box',
librayList[curIndex].isBuy == 0 ? 'lock' : '',
]">
<text class="hidden1">{{ item.title }}</text>
<!-- {{item.isAudition}}-{{librayList[curIndex].isBuy}}-{{userMsg.vip}} -->
<uni-tag
v-if="item.isAudition == 1 && librayList[curIndex].isBuy == 0 && userMsg.vip == 0"
style="margin-left: 10rpx" :inverted="true" text="试听" size="mini"
type="success" />
<template
v-if="librayList[curIndex] && librayList[curIndex].isBuy == 1 || userMsg.vip != 0">
<uni-tag v-if="item.isLearned == 0" style="margin-left: 10rpx;"
<uni-tag v-if="
item.isAudition == 1 &&
librayList[curIndex].isBuy == 0 &&
userMsg.vip == 0
" style="margin-left: 10rpx" :inverted="true" text="试听" size="mini" type="success" />
<template v-if="
(librayList[curIndex] &&
librayList[curIndex].isBuy == 1) ||
userMsg.vip != 0
">
<uni-tag v-if="item.isLearned == 0" style="margin-left: 10rpx"
:inverted="true" text="未学" size="mini" type="primary" />
<uni-tag v-if="item.isLearned == 1" style="margin-left: 10rpx;"
<uni-tag v-if="item.isLearned == 1" style="margin-left: 10rpx"
:inverted="true" text="已学" size="mini" type="success" />
</template>
</view>
<view class="shitingTag">
<u-icon
v-if="librayList[curIndex].isBuy == 0 && userMsg.vip == 0 && item.isAudition == 0"
name="lock" color="#258feb" size="28"></u-icon>
<u-icon v-if="
librayList[curIndex].isBuy == 0 &&
userMsg.vip == 0 &&
item.isAudition == 0
" name="lock" color="#258feb" size="28"></u-icon>
</view>
</view>
</view>
</view>
@@ -165,7 +176,7 @@
<view v-else>暂无章节内容</view>
</view>
</view>
<view class=" completionBg">
<view class="completionBg">
<uni-section class="mb-10" style="padding: 0 20rpx" title="学习进度" type="line"
v-if="librayList.length > 0 && librayList[curIndex].completion > 0">
<view class="progress-box">
@@ -319,7 +330,6 @@
</view>
</view>
</u-popup>
</view>
<common-select-goods ref="commonSelectGoods" :selectGoodsData="selectGoodsData" :goodsList="goodsList"
@@ -370,14 +380,14 @@
import emojiList1 from "../../bkhumor-emojiplus/emoji/biaoqin.js";
import emotion from "@/bkhumor-emojiplus/components/bkhumor-emojiplus/bkhumor-emojiplus.vue";
import $http from "@/config/requestConfig.js";
import permission from "@/js_sdk/wa-permission/permission.js"
import permission from "@/js_sdk/wa-permission/permission.js";
var clear;
import {
mapState
} from "vuex";
export default {
data() {
return {
return {
goodsList: [],
currentCateIndex: 0,
protocolShow: false,
@@ -452,7 +462,7 @@
fatherIndex: null,
supportFlag: false,
selectGoodsData: {},
buyOptions: [
// {
// icon: 'chat',
@@ -483,7 +493,7 @@
startStudyForMF: "sociology/course/startStudyForMF",
},
isAndorid: true,
oprateOsName:'',
oprateOsName: "",
};
},
//第一次加载
@@ -498,9 +508,7 @@
// this.getCateList(this.courseId)
// await this.getData(e.id);
this.getSayList();
this.getOS()
this.getOS();
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
@@ -517,12 +525,12 @@
async onShow() {
// 隐藏原生的tabbar
uni.hideTabBar();
console.log('this.courseId', this.courseId);
console.log("this.courseId", this.courseId);
await this.getData(this.courseId);
// #ifdef APP-PLUS
plus.screen.unlockOrientation();
plus.screen.lockOrientation("portrait-primary");
// #endif
// #endif
},
onUnload() {
this.selectGoodsData = {};
@@ -540,7 +548,7 @@
// this.searchList = []
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
uni.stopPullDownRefresh();
},
onReachBottom() {
console.log("触底");
@@ -560,7 +568,7 @@
let oprateOs = "";
oprateOs = uni.getSystemInfoSync().platform;
this.oprateOsName = uni.getSystemInfoSync().platform;
console.log('oprateOs',oprateOs)
console.log("oprateOs", oprateOs);
if (oprateOs == "android") {
this.isAndorid = true;
} else {
@@ -568,9 +576,9 @@
}
},
async checkPermision() {
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE");
if (result != 1) {
return false
return false;
}
},
haveSelected(data) {
@@ -640,18 +648,25 @@
async gotoDetail(v, courseIndex) {
console.log("准备进入学习页面", v);
this.currentCateIndex = courseIndex;
let _myurl = ''
let _myurl = "";
// if(this.oprateOsName == 'ios'){
// _myurl = '/pages/course/chapterDetail'
// }else{
// h5 和安卓
_myurl = '/pages/course/chapterDetailAndorid'
// h5 和安卓
_myurl = "/pages/course/chapterDetailAndorid";
// }
if (this.librayList[this.curIndex].isBuy == 1 || v.isAudition == 1 ||
this.vip.type != "0") {
let noRecored = false
v.isAudition == 1 && this.userMsg.vip == 0 && this.librayList[this.curIndex].isBuy == 0 ?
noRecored = true : ''
if (
this.librayList[this.curIndex].isBuy == 1 ||
v.isAudition == 1 ||
this.vip.type == "1" ||
this.vip.type == "2"
) {
let noRecored = false;
v.isAudition == 1 &&
this.userMsg.vip == 0 &&
this.librayList[this.curIndex].isBuy == 0 ?
(noRecored = true) :
"";
uni.navigateTo({
url: `${_myurl}?navTitle=${this.pageTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&noRecored=${noRecored}`,
});
@@ -664,8 +679,8 @@
this.$forceUpdate();
},
onHandleClickBuy(e) {
console.log("this.selectGoodsData at line 589:", this.selectGoodsData);
console.log("this.selectGoodsData at line 589:", this.selectGoodsData);
var mynavData = JSON.stringify({
goods: [this.selectGoodsData],
typeId: 0,
@@ -685,7 +700,7 @@
//获取相关关联课程商品
handleClickGetGoodsList(v) {
// console.log("data at line 313:", data);
if (v.type == 0) {
//免费
@@ -702,13 +717,20 @@
},
})
.then(async (res) => {
console.log("res at line 493:", res);
console.log("res at line 493:", res);
if (res.code == 0) {
this.getCourseDescriptionData();
// this.$commonJS.showToast("");
}
this.$forceUpdate();
});
} else if (v.type == 2 && this.userMsg.vip != 1) {
uni.showModal({
title: '提示',
content: '当前课程目录是超V专享,开通超V可观看',
confirmText: '好的',
showCancel: false
})
} else {
this.$http
.request({
@@ -722,7 +744,7 @@
"Content-Type": "application/json",
},
})
.then(async (res) => {
.then(async (res) => {
if (res.productList.length > 0) {
this.goodsList = res.productList;
this.selectGoodsData = this.goodsList[0];
@@ -733,18 +755,18 @@
}
this.$forceUpdate();
})
});
}
},
getUserInfo() {
this.$http.post("common/user/getUserInfo").then((res) => {
console.log("res at line 505:", res);
this.userMsg = res.result
this.userMsg = res.result;
if (res.result.userVip) {
this.vip = res.result.userVip;
} else {
this.vip = {
type: 0
type: 0,
};
}
});
@@ -1146,101 +1168,117 @@
url: `/pages/course/myCourseLearn?id=${this.course.id}`,
});
},
async getData(id) {
async getData(id) {
this.courseList = [];
// console.log("at line 1167:", "调用了几次");
var that = this;
await $http
.request({
url: "sociology/course/getCourseDetail",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
id: id,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
if (res.code == 0) {
this.course = res.data.course;
//0 购买 1 续费 2 升级
// console.log("this.vip.type at line 1045:", this.vip);
switch (this.vip.type) {
case 0:
this.goBuyTitle = "购买VIP,即可免费观看吴门医述所有课程";
this.goBuyType = 0;
break;
case 1 || 2:
var vipName = "";
if (this.vip.type == 1) {
vipName = "超级VIP";
}
if (this.vip.type == 2) {
vipName = "吴门医述VIP";
}
//超级VIP
this.goBuyTitle = `尊贵的${vipName},您的有效期到 ${
var that = this;
await $http
.request({
url: "sociology/course/getCourseDetail",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
id: id,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
if (res.code == 0) {
this.course = res.data.course;
//0 购买 1 续费 2 升级
// console.log("this.vip.type at line 1045:", this.vip);
switch (this.vip.type) {
case 0:
this.goBuyTitle = "购买VIP,即可免费观看吴门医述所有课程";
this.goBuyType = 0;
break;
case 1:
var vipName = "";
if (this.vip.type == 1) {
vipName = "超级VIP";
}
//超级VIP
this.goBuyTitle = `尊贵的${vipName},您的有效期到 ${
this.vip.endTime && this.vip.endTime.split(" ")[0]
}`;
this.goBuyType = 1;
break;
this.goBuyType = 1;
break;
case 2:
var vipName = "";
case 3:
//众妙之门
this.goBuyTitle =
"尊贵的众妙之门VIP,升级至超级VIP,即可免费观看吴门医述所有课程";
this.goBuyType = 2;
break;
}
this.$forceUpdate();
this.pageTitle = this.course.title;
this.librayList = [...res.data.catalogues];
console.log('获取课程详情=》',res.data);
// for (let i = 0; i < that.librayList.length; i++) {
// var list = await that.getChapterList(that.librayList[i]);
// console.log("list at line 1222:", list);
// that.courseList[i] = [...list];
// // console.log("that.courseList at line 1238:", that.courseList);
// }
that.$forceUpdate();
if (this.librayList.length > 0) {
if(this.catalogueId){
this.curId = this.catalogueId
let _list = this.librayList
_list = _list.map( item => item.id)
// console.log('_list过滤后的_list',_list);
this.curIndex = _list.findIndex((element) => element == this.catalogueId)
console.log('其他页面返回来_list过滤后的curIndex',this.curIndex,this.catalogueId);
}else{
this.catalogueId = this.librayList[0].id;
this.curId = this.librayList[0].id;
this.curIndex = 0
console.log('首次加载');
}
this.chapterList = await this.getChapterList(this.catalogueId)
// console.log('目录列表', this.librayList)
// console.log('外面得到的方法列表', this.chapterList);
if (
res.data.shopProductList &&
res.data.shopProductList.length > 0
) {
this.tjProList = res.data.shopProductList;
} else {
this.tjProList;
if (this.vip.type == 2) {
vipName = "吴门医述VIP";
}
// console.log("list at line 1233:", list);
}
//超级VIP
this.goBuyTitle = `尊贵的${vipName},您的有效期到 ${
this.vip.endTime && this.vip.endTime.split(" ")[0]
}`;
this.goBuyType = 2;
break;
case 3:
//众妙之门
this.goBuyTitle =
"尊贵的众妙之门VIP,升级至超级VIP,即可免费观看吴门医述所有课程";
this.goBuyType = 2;
break;
}
})
.catch((e) => {
console.log(e, "获取目录数据报错");
});
},
this.$forceUpdate();
this.pageTitle = this.course.title;
this.librayList = [...res.data.catalogues];
console.log("获取课程详情=》", res.data);
// for (let i = 0; i < that.librayList.length; i++) {
// var list = await that.getChapterList(that.librayList[i]);
// console.log("list at line 1222:", list);
// that.courseList[i] = [...list];
// // console.log("that.courseList at line 1238:", that.courseList);
// }
that.$forceUpdate();
if (this.librayList.length > 0) {
if (this.catalogueId) {
this.curId = this.catalogueId;
let _list = this.librayList;
_list = _list.map((item) => item.id);
// console.log('_list过滤后的_list',_list);
this.curIndex = _list.findIndex(
(element) => element == this.catalogueId
);
console.log(
"其他页面返回来_list过滤后的curIndex",
this.curIndex,
this.catalogueId
);
} else {
this.catalogueId = this.librayList[0].id;
this.curId = this.librayList[0].id;
this.curIndex = 0;
console.log("首次加载");
}
this.chapterList = await this.getChapterList(this.catalogueId);
// console.log('目录列表', this.librayList)
// console.log('外面得到的方法列表', this.chapterList);
if (
res.data.shopProductList &&
res.data.shopProductList.length > 0
) {
this.tjProList = res.data.shopProductList;
} else {
this.tjProList;
}
// console.log("list at line 1233:", list);
}
}
})
.catch((e) => {
console.log(e, "获取目录数据报错");
});
},
goBuy() {
$http
.request({
@@ -1318,7 +1356,7 @@
if (item.id == this.curId) {
return;
}
this.catalogueId = item.id
this.catalogueId = item.id;
this.curIndex = index;
this.curId = item.id;
this.chapterList = await this.getChapterList(item.id);
@@ -1347,9 +1385,8 @@
})
.then(async (res) => {
if (res.code == 0 && res.chapterList.length > 0) {
list = res.chapterList;
// console.log("方法里面得到的章节列表:", list);
// console.log("方法里面得到的章节列表:", list);
} else {
list = [];
}
@@ -1370,18 +1407,23 @@
<style lang="scss" scoped>
@import "@/style/mixin.scss";
.completionBg { padding: 10rpx 0;
background-color: #fff; border-bottom: 1px solid #eee;
}
.completionBg {
padding: 10rpx 0;
background-color: #fff;
border-bottom: 1px solid #eee;
}
.endBox {
// @include theme("vipbtnbg");
// @include theme("vipbtnbg");
color: #333;
font-size: 26rpx;
// margin: 20rpx 0;
padding: 10rpx 20rpx;
.box{
.box {
// background-color: #258feb;
}
}
.flexbox {
justify-content: space-between;
}
@@ -1396,7 +1438,7 @@
}
img {
width: 20px;
max-width: 260rpx;
}
.u-upload__button {
@@ -1478,7 +1520,9 @@
}
.xufeiBtn {
display: block; line-height: 50rpx; height: 50rpx;
display: block;
line-height: 50rpx;
height: 50rpx;
padding: 0 10rpx;
border: 1px solid #333;
border-radius: 10rpx;
@@ -1488,7 +1532,7 @@
border: 1px solid #fff;
border-radius: 10rpx;
text-align: center;
background-color: rgba(0, 0, 0, .4);
background-color: rgba(0, 0, 0, 0.4);
padding: 10rpx;
.text {
@@ -1623,11 +1667,10 @@
top: 0;
font-size: 24rpx;
background-image: linear-gradient(90deg, #6429db 0%, #0075ed 100%);
// @include theme("btn_bg");
// @include theme("btn_bg");
color: #fff;
padding: 10rpx;
border-radius: 0 50rpx 50rpx 0;
}
.leve {
@@ -1902,7 +1945,6 @@
}
.price {
// text-align: center;
font-size: 26rpx;
font-weight: bold;
@@ -1991,7 +2033,7 @@
.item {
justify-content: center;
align-items: center;
color: #fff;
color: #fff;
width: 100%;
text-align: center;
padding: 16rpx 0;
@@ -1999,7 +2041,7 @@
border-radius: 20rpx 20rpx 0 0;
border: 1px solid #fff;
border-bottom: none;
background-color: rgba(0, 0, 0, .4);
background-color: rgba(0, 0, 0, 0.4);
text {
font-size: 30rpx;
@@ -2192,7 +2234,11 @@
/deep/.u-icon__icon--warning {
color: #fff !important;
}
/deep/.uni-tag{border-width: 2rpx !important;}
/deep/.uni-tag {
border-width: 2rpx !important;
}
/deep/.uni-section {
background: transparent !important;
}
@@ -2382,7 +2428,6 @@
}
}
.commonDetailPage {}
.course_info_box {

View File

@@ -877,7 +877,8 @@ export default {
productImages: this.selectGoodsData.productImages,
productId: this.selectGoodsData.productId,
productName: this.selectGoodsData.productName,
price: this.selectGoodsData.activityPrice?this.selectGoodsData.activityPrice:this.selectGoodsData.price,
activityPrice:this.selectGoodsData.activityPrice,
price: this.selectGoodsData.price,
goodsType: this.selectGoodsData.goodsType,
},
],

View File

@@ -53,15 +53,25 @@
<view class="normal_box">
<view class="normal_box_top" style="justify-content: space-between">
<view class="curriulum_title">{{ v.productName }} </view>
<view class="price_box">
<!-- <view class="price_box">
<text class="price" style="margin-right: 0">
{{ v.price }}
{{ v.activityPrice && v.activityPrice > 0 ? v.activityPrice : v.price}}
</text>
</view>
</view> -->
</view>
<view style="width: 100%; text-align: right">
x 1
<!-- <view class=""></view> -->
<view style="width: 100% !important; text-align: right;" class=" ">
<!-- <view class="flexbox" style="justify-content: space-between; align-items: center;"> -->
<!-- -->
<text style="color: #999; text-decoration: line-through; margin-right: 20rpx;"
v-if="v.activityPrice > 0 && v.activityPrice < v.price" >原价:{{v.price}}</text>
<text class="" style="margin-right: 26rpx">
{{ v.activityPrice && v.activityPrice > 0 ? v.activityPrice : v.price}}
</text>
<text>x 1</text>
<!-- </view> -->
<!-- <u-number-box v-model="number" style="float: right">
<view slot="minus" class="minus">
<u-icon name="minus" size="12"></u-icon>
@@ -81,7 +91,7 @@
</view>
<view class="pay_box" style="margin-top: 20rpx">
<view @click="openOrderModal(v)" class="curriulum_title_box goods_item pay_item"
v-for="(v, i) in orderInfoList">
v-for="(v, i) in orderInfoList" :key="i">
<view class="top">
<view class="left">
<text> {{ v.text }}</text>
@@ -114,7 +124,7 @@
<view class="order_top common_radius_box color_shandow goods_box pay_box">
<view class="title">价格明细</view>
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in priceBreakdownList">
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in priceBreakdownList" :key="i">
<view class="top">
<view class="left">
<image v-if="v.imgUrl" class="pay_item_img" :src="v.imgUrl" mode="aspectFil"
@@ -162,6 +172,7 @@
</view>
<view class="order_top common_radius_box color_shandow goods_box pay_box">
<view class="title">支付方式</view>
<!-- 商品是安卓环境支付或者商品列表中没有课程 -->
<template v-if="isAndorid || !isAndorid && !haveCourse">
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payList">
<view :class="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'">
@@ -191,7 +202,7 @@
</template>
<!-- ios 支付列表 -->
<template v-else>
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payListIOS">
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payListIOS" :key="i">
<view :class="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'">
<view class="left">
<image class="pay_item_img" :src="v.imgUrl" mode="aspectFil" :style="v.style">
@@ -411,6 +422,7 @@
},
data() {
return {
historyOrderInfo:undefined, //上一个订单的参数
isDefaultCurrency: false,
isShowAddress: false,
jfNumber: 0,
@@ -483,6 +495,7 @@
"margin-left": "30rpx",
},
modalInfo: {},
canjump:true, // 是否可以跳转到其他页面
currentCateIndex: 0,
show: false,
playData: {},
@@ -866,7 +879,7 @@
var s = 0;
var that = this;
for (var i = this.goodsDataList.length - 1; i >= 0; i--) {
s += this.goodsDataList[i].price ? this.goodsDataList[i].price : 0;
s += this.goodsDataList[i].activityPrice && this.goodsDataList[i].activityPrice > 0 ? this.goodsDataList[i].activityPrice : this.goodsDataList[i].price;
}
that.totalPrice = s;
//
@@ -928,6 +941,7 @@
}
},
async goBuyJie() {
console.log('this.buyingFlag',this.buyingFlag);
if (this.buyingFlag) {
uni.showToast({
title: '操作太频繁了,休息下吧',
@@ -947,6 +961,7 @@
setTimeout(() => {
this.nowClick = true;
}, 5000);
// let youPre = {
// id: "",
// coupons: {
@@ -969,7 +984,8 @@
this.$commonJS.showToast("请选择收货地址");
return false;
}
}
}
let data = {
buyType: this.options.typeId, //0- 商品页直接下单 1- 购物车结算
userId: this.userInfo.id, //下单人ID
@@ -997,9 +1013,48 @@
appName: "wumen",
come: "2",
};
console.log("data at line 477:", data);
var productList = [...data.productList]
var thisproduct = productList.map(item => {
return item.productId+"_"+item.quantity
})
thisproduct = thisproduct.join(',')
console.log("data at line 477:", data);
// console.log('成功信息',product,thisproduct,data.addressId, data.realMoney);
if(this.historyOrderInfo &&
thisproduct == this.historyOrderInfo.product &&
data.addressId == this.historyOrderInfo.addressId &&
this.historyOrderInfo.realMoney == data.realMoney){
that.canjump = false
uni.showModal({
title:'提示',
content:'您短时间内有一笔相同金额的订单,是否确定继续下单?',
cancelText:'点错了',
confirmText:'继续操作',
success: function(res) {
that.canjump = true
if (res.confirm) {
that.buyingFlag = false
console.log('用户点击确定',that.buyingFlag);
that.submitorder(data)
}
else{
that.buyingFlag = false
}
}
})
}else{
that.submitorder(data)
}
},
async submitorder(data){
uni.showLoading({
title:'正在请求订单'
})
// this.buyingFlag = false
console.log('进来请求了吗?');
let that = this
await $http
.request({
// url: "book/buyOrder/buySave",
@@ -1012,8 +1067,19 @@
},
})
.then(async (res) => {
console.log("res at line 598:", res);
if (res.code == 0) {
that.buyingFlag = false
var product = data.productList.map(item => {
return item.productId+"_"+item.quantity
})
product = product.join(',')
that.historyOrderInfo = {
'product':product,
'addressId':data.addressId,
'realMoney':data.realMoney
}
console.log("res at line 598系统下单返回结果:", res);
if (res.code == 0) {
if (res.orderSn == null) {
uni.showToast({
title: "失败,请重新下单",
@@ -1022,12 +1088,12 @@
});
} else {
console.log("that.payType at line 607:", that.payType);
uni.showToast({
title: "下单成功,即将进行支付",
icon:'none'
})
if (that.payType == 2) {
// 常规支付
uni.showToast({
title: "正在支付",
icon: "loading",
});
// 常规支付
await setPay({
typePay: "alipay",
subject: "order",
@@ -1041,13 +1107,14 @@
title: "加载中",
});
console.log(res, "支付支付");
if (res.success) {
this.buyingFlag = false
if (res.success) {
uni.hideLoading()
uni.showToast({
title: "支付成功",
});
setTimeout(() => {
if (that.goToInfo.type == 1) {
if(that.canjump){
if (that.goToInfo.type == 1 ) {
uni.switchTab({
url: `${that.goToInfo.url}?type=order`,
});
@@ -1059,22 +1126,23 @@
url: `${that.goToInfo.url}?backType=order`,
});
}
}
}, 1000);
} else {
uni.hideLoading()
console.log("失败失败失败");
this.buyingFlag = false
// this.buyingFlag = false
// that.$commonJS.showToast('支付是失败')
setTimeout(() => {
console.log("延迟调用 失败提示");
uni.showToast({
title: "支付失败",
image: "../../../static/icon/ic_close.png",
});
}, 0);
// setTimeout(() => {
// uni.navigateTo({
// url: './orderList'
// });
@@ -1082,7 +1150,7 @@
}
}
);
} else if (this.payType == 1) {
} else if (that.payType == 1) {
// 微信支付
let data1 = {
orderSn: res.orderSn,
@@ -1091,27 +1159,27 @@
};
setWXPay(data1, (res) => {
if (res.success) {
this.buyingFlag = false
// this.buyingFlag = false
uni.hideLoading()
uni.showToast({
title: "支付成功",
});
setTimeout(() => {
if(that.canjump){
if (that.goToInfo.type == 1) {
uni.switchTab({
url: `${that.goToInfo.url}?type=order`,
});
} else {
// uni.navigateBack({
// delta: 2,
// });
// uni.n
} else {
uni.redirectTo({
url: `${that.goToInfo.url}?backType=order`,
});
}
}
}, 1000);
} else {
this.buyingFlag = false
// this.buyingFlag = false
uni.hideLoading()
console.log(res, "微信支付111111111111111");
if (res.data.errMsg.indexOf("User canceled") != -1) {
uni.showToast({
@@ -1128,14 +1196,16 @@
}
}
});
} else if (this.payType == 4) {
this.buyingFlag = false
} else if (that.payType == 4) {
that.buyingFlag = false
// 天医币支付
uni.hideLoading()
uni.showToast({
title: "购买成功",
icon: "success",
});
setTimeout(() => {
if(that.canjump){
if (that.goToInfo.type == 1) {
uni.switchTab({
url: `${that.goToInfo.url}?type=order`,
@@ -1145,13 +1215,16 @@
url: `${that.goToInfo.url}?backType=order`,
});
}
}
}, 1000);
}
}
}
}).catch(e => {
that.buyingFlag = false
uni.hideLoading()
});
},
radioChange(index) {
if (index == this.selectPayIndex) {
return
@@ -1864,6 +1937,7 @@
background-color: #fff;
.curriulum_title {
// width: calc(100% - 80rpx);
width: calc(100% - 80rpx);
font-weight: 500;
font-size: 30rpx;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff