代码合并
This commit is contained in:
commit
168665eebc
|
|
@ -22,7 +22,7 @@
|
|||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
"playground" : "custom",
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-ios"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
10
main.js
10
main.js
|
|
@ -34,7 +34,6 @@ Vue.use(httpApi, app)
|
|||
|
||||
app.$mount()
|
||||
|
||||
|
||||
// #ifdef APP
|
||||
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
|
|
@ -43,15 +42,10 @@ let isIos = sysInfo.platform == 'ios'
|
|||
if (isIos) {
|
||||
const originNavigateTo = uni.navigateTo
|
||||
|
||||
uni.navigateTo = (params) => {
|
||||
|
||||
console.log("自定义 navigate 。。。。。。。。。。");
|
||||
|
||||
uni.navigateTo = (params) => {
|
||||
let jsonParam = JSON.parse(JSON.stringify(params))
|
||||
|
||||
|
||||
|
||||
if (isIos && jsonParam.url.includes('/me/detail/detail')) {
|
||||
console.log('iOS 跳转视频也');
|
||||
jsonParam.url = jsonParam.url.replace('/me/detail/detail', '/me/detail/detailIOS')
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
"VideoPlayer" : {},
|
||||
"Camera" : {},
|
||||
"Record" : {},
|
||||
"Push" : {},
|
||||
"OAuth" : {}
|
||||
"OAuth" : {},
|
||||
"Push" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
|
|
@ -63,7 +63,12 @@
|
|||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
"dSYMs" : false,
|
||||
"urltypes" : "com.hnsiyao.duanju",
|
||||
"privacyDescription" : {
|
||||
"NSPhotoLibraryUsageDescription" : "获取您的相册读取权限,目的是为了在我的资料页面使用相册读取功能,修改上传头像",
|
||||
"NSCameraUsageDescription" : "获取您的摄像头权限,目的是为了在我的资料页面使用摄像头功能,修改上传头像"
|
||||
}
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@
|
|||
</view>
|
||||
<text class=""
|
||||
style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin: 20rpx 0; auto;text-align: left;width: 100%;">
|
||||
{{this.courseDetailsId}}
|
||||
{{getRedEnvelopeTips}}
|
||||
</text>
|
||||
<view class="pay-content">
|
||||
<view class="pay-content-item" @click="payVideo(1)">
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
{{countPrice*scale}}金币解锁整部视频
|
||||
</text>
|
||||
</view>
|
||||
<view class="pay-content-item" @click="payVideo(2)">
|
||||
<view v-if="isShowMoneyPay" class="pay-content-item" @click="payVideo(2)">
|
||||
<text class="pay-content-items">
|
||||
{{countPrice}}元解锁单集视频
|
||||
</text>
|
||||
|
|
@ -369,6 +369,7 @@
|
|||
getRedEnvelopeTips: '',
|
||||
scale: 1,
|
||||
paddingBottom: '0',
|
||||
isShowMoneyPay: true,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -492,6 +493,13 @@
|
|||
|
||||
console.log('this bottom padding = ' + this.paddingBottom);
|
||||
|
||||
httpsRequest.getT("app/common/type/919", {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||
}
|
||||
});
|
||||
},
|
||||
onLoad(e) {
|
||||
let that = this
|
||||
|
|
@ -711,7 +719,10 @@
|
|||
// #endif
|
||||
// APP支付宝支付
|
||||
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId + '?payType=' + paytype, {}).then(ret => {
|
||||
plus.runtime.openURL(ret.data.h5Url)
|
||||
// plus.runtime.openURL(ret.data.h5Url)
|
||||
uni.navigateTo({
|
||||
url: '/pages/pays/pays?ordersId=' + this.ordersId + '&url=' + ret.data.h5Url
|
||||
});
|
||||
// this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
|
||||
});
|
||||
} else if (this.openWay == 3) {
|
||||
|
|
@ -1051,7 +1062,7 @@
|
|||
// const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId);
|
||||
// this.videoList = [this.meunList[index]]
|
||||
this.current = index
|
||||
if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) {
|
||||
if (this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type) {
|
||||
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
|
||||
return;
|
||||
}
|
||||
|
|
@ -1399,8 +1410,8 @@
|
|||
} else { //不能播放则需要购买
|
||||
this.openPay()
|
||||
}
|
||||
if ( t == 'select') {
|
||||
this.selectPlay(this.videoList[this.current],this.current,true)
|
||||
if (t == 'select') {
|
||||
this.selectPlay(this.videoList[this.current], this.current, true)
|
||||
}
|
||||
this.$forceUpdate();
|
||||
//插入历史记录
|
||||
|
|
|
|||
|
|
@ -185,8 +185,8 @@
|
|||
<!-- 追剧悬浮 -->
|
||||
<!-- <drag-button v-if="shodrag && shodrags" @clickClose="clickClose" :videoInfo="videoInfo" :isDock="true"
|
||||
:existTabBar="true" @btnClick="btnClick" /> -->
|
||||
<u-image @click="goMsg('/me/choujiang/choujiang')" :src="`../../static/red-pack-new.gif`"
|
||||
style="width: 200rpx;height: 200rpx;position: fixed;right: 30rpx;bottom: 180rpx;"></u-image>
|
||||
<u-image v-if="isShowMoneyPay" @click="goMsg('/me/choujiang/choujiang')" :src="`../../static/red-pack-new.gif`"
|
||||
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;"></u-image>
|
||||
<!-- #ifdef H5 -->
|
||||
<div v-if="isWeixin"
|
||||
style="width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;">
|
||||
|
|
@ -209,6 +209,7 @@
|
|||
import recommendVideo from '../../components/recommendVideo/recommendVideo.vue'
|
||||
import activityComp from '../../components/activityComp/activityComp.vue'
|
||||
import dragButton from "@/components/drag-button/drag-button.vue";
|
||||
import httpsRequest from '../../common/httpRequest.js'
|
||||
export default {
|
||||
components: {
|
||||
videoList,
|
||||
|
|
@ -260,6 +261,7 @@
|
|||
isWeixin: false,
|
||||
isIos: true,
|
||||
scrollTop: 0,
|
||||
isShowMoneyPay: true,
|
||||
};
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
|
|
@ -279,7 +281,6 @@
|
|||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
console.log(e);
|
||||
this.scrollTop = e.scrollTop
|
||||
},
|
||||
onLoad(options) {
|
||||
|
|
@ -293,6 +294,7 @@
|
|||
|
||||
// #endif
|
||||
|
||||
console.log(options, '22222222222222222')
|
||||
if (uni.getStorageSync('qdCode')) {
|
||||
this.qdCode = uni.getStorageSync('qdCode')
|
||||
}
|
||||
|
|
@ -435,6 +437,14 @@
|
|||
this.shodrag = false
|
||||
this.videoInfo = []
|
||||
}
|
||||
|
||||
httpsRequest.getT("app/common/type/919", {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||
}
|
||||
});
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.page < this.pages) {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
我的积分
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="statistics-box-item" @click="goNav('/me/invite/cashDetail')">
|
||||
<view v-if="isShowMoneyPay" class="statistics-box-item" @click="goNav('/me/invite/cashDetail')">
|
||||
<view class="statistics-box-item-top">
|
||||
{{userInfo.amount || '0.00'}}
|
||||
</view>
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
转盘抽奖
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="tool-box-content-item flex align-center justify-center flex-wrap"
|
||||
<view v-if="isShowMoneyPay" class="tool-box-content-item flex align-center justify-center flex-wrap"
|
||||
@click="goNav('/me/invite/index')">
|
||||
<view class="tool-box-content-item-img">
|
||||
<image src="../../static/images/me/vfx.png" mode=""></image>
|
||||
|
|
@ -184,7 +184,7 @@
|
|||
观看历史
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="rate>0" class="tool-box-content-item flex align-center justify-center flex-wrap"
|
||||
<view v-if="rate>0 && isShowMoneyPay" class="tool-box-content-item flex align-center justify-center flex-wrap"
|
||||
@click="goNav('/me/invite/inviteDet')">
|
||||
<view class="tool-box-content-item-img">
|
||||
<image src="../../static/images/me/vtd.png" mode=""></image>
|
||||
|
|
@ -257,6 +257,7 @@
|
|||
|
||||
<script>
|
||||
import ttMsg from '../../components/ttMsg/ttMsg.vue'
|
||||
import httpsRequest from '../../common/httpRequest.js'
|
||||
export default {
|
||||
components: {
|
||||
ttMsg
|
||||
|
|
@ -292,6 +293,7 @@
|
|||
kmPaySel: '否',
|
||||
isWxIosPay: true, //微信下是否显示支付功能
|
||||
userInfo: {},
|
||||
isShowMoneyPay: true,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
|
@ -354,6 +356,15 @@
|
|||
this.rate = 0
|
||||
}
|
||||
this.avatar = uni.getStorageSync('avatar') ? uni.getStorageSync('avatar') : '../../static/images/logo.png'
|
||||
|
||||
httpsRequest.getT("app/common/type/919", {}).then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 0) {
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//兑换卡密
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
ordersId:'',
|
||||
timer:null,
|
||||
maxAjaxNum:5,
|
||||
ajaxNum:0,
|
||||
ordersId: '',
|
||||
timer: null,
|
||||
maxAjaxNum: 5,
|
||||
ajaxNum: 0,
|
||||
url: null, //要打开的外部链接
|
||||
viewerUrl: '/hybrid/html/web/viewer.html',
|
||||
webviewStyles: {
|
||||
|
|
@ -22,38 +22,41 @@
|
|||
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
// #ifdef APP-PLUS
|
||||
// console.log('App plus2')
|
||||
// var currentWebview = this.$mp.page.$getAppWebview() //获取当前页面的webview对象
|
||||
// setTimeout(function() {
|
||||
// wv = currentWebview.children()[0]
|
||||
// wv.setStyle({
|
||||
// scalable: true
|
||||
// })
|
||||
// }, 1000); //如果是页面初始化调用时,需要延时一下
|
||||
// #endif
|
||||
},
|
||||
onReady() {},
|
||||
onShow() {
|
||||
console.log(this.ordersId);
|
||||
|
||||
httpsRequest.getT("/app/wuyou/queryOrder/"+this.ordersId, {}).then(res => {
|
||||
|
||||
httpsRequest.getT("/app/wuyou/queryOrder/" + this.ordersId, {}).then(res => {
|
||||
console.log(res.data);
|
||||
|
||||
if(res.data ==1){
|
||||
|
||||
if (res.data == 1) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title:'支付成功',
|
||||
icon:'none'
|
||||
})
|
||||
this.timer= setTimeout(()=>{
|
||||
clearTimeout(this.timer)
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
console.log("is ios ", isIos);
|
||||
if (isIos) {
|
||||
uni.navigateBack()
|
||||
},500)
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1500)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none'
|
||||
})
|
||||
this.timer = setTimeout(() => {
|
||||
clearTimeout(this.timer)
|
||||
uni.navigateBack()
|
||||
}, 500)
|
||||
}
|
||||
} else {
|
||||
// #ifdef APP
|
||||
uni.showLoading({
|
||||
title:'支付中'
|
||||
title: '支付中'
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
|
|
@ -69,29 +72,8 @@
|
|||
onLoad: function(option) {
|
||||
console.log(option)
|
||||
this.url = option.url
|
||||
this.ordersId=option.ordersId
|
||||
console.log('this.ordersId'+this.ordersId);
|
||||
|
||||
// this.url="https://jiaoyu.xianmxkj.com/file/uploadPath/2023/03/08/b6c0dd4821cc9ce70c897adca3ad22c2.pdf"
|
||||
// h5,使用h5访问的时候记得跨域
|
||||
// #ifdef H5
|
||||
// this.url="https://jiaoyu.xianmxkj.com/file/uploadPath/2023/03/08/b6c0dd4821cc9ce70c897adca3ad22c2.pdf"
|
||||
// this.url = `${this.viewerUrl}?file=${encodeURIComponent(option.url)}`;
|
||||
// this.url = `${this.viewerUrl}?file=${'https://jiaoyu.xianmxkj.com/file/uploadPath/2023/03/08/b6c0dd4821cc9ce70c897adca3ad22c2.pdf'}`;
|
||||
// #endif
|
||||
|
||||
// 在安卓和ios手机上
|
||||
// 判断是手机系统:安卓,使用pdf.js
|
||||
// #ifdef APP-PLUS
|
||||
// if(plus.os.name === 'Android') {
|
||||
// this.url = `${this.viewerUrl}?file=${encodeURIComponent(option.url)}`;
|
||||
// }
|
||||
// // ios,直接访问pdf所在路径
|
||||
// else {
|
||||
// this.url = encodeURIComponent(option.url);
|
||||
// }
|
||||
// #endif
|
||||
|
||||
this.ordersId = option.ordersId
|
||||
console.log('this.ordersId' + this.ordersId);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -11,27 +11,36 @@
|
|||
<u-image class="task_icon2 u-relative" src="../../static/images/me/task_icon2.png"></u-image>
|
||||
</view>
|
||||
|
||||
<view class="content signIn margin-lr padding bg-white u-relative" v-if="list.length" style="margin-bottom: 32rpx;">
|
||||
<view class="content signIn margin-lr padding bg-white u-relative" v-if="isShowMoneyPay" style="margin-bottom: 32rpx;">
|
||||
<view class="title flex justify-between">
|
||||
<view>已连续签到 <text class="num">3</text> 天</view>
|
||||
<view class="dk flex">
|
||||
<view>已连续签到 <text class="num">{{signDays}}</text> 天</view>
|
||||
<!-- <view class="dk flex">
|
||||
<text style="margin-right: 20rpx;">打卡提醒</text>
|
||||
<u-switch v-model="checked" size="35" active-color="#EA9EA8 "></u-switch>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="signInList flex justify-between">
|
||||
<text class="line"></text>
|
||||
<view class="signIn-Item" v-for="(item,index) in signInList" :key="index">
|
||||
<image class="signIn_icon" src="../../static/images/signIn_icon1.png" mode="">
|
||||
<view class="signIn-Item"
|
||||
:class="{active: item.showText == '待签到'||item.showText == '未签到'||item.showText == '已签到'}"
|
||||
v-for="(item,index) in signInList" :key="index"
|
||||
>
|
||||
<image class="signIn_icon" v-if="item.showText == '未签到'" src="../../static/images/signIn_icon2.png" mode="">
|
||||
<image class="signIn_icon" v-if="item.showText == '已签到'" src="../../static/images/signIn_icon3.png" mode="">
|
||||
<image class="signIn_icon" v-if="item.showText != '未签到'&&item.showText != '已签到'" src="../../static/images/signIn_icon1.png" mode="">
|
||||
<view class="radius"></view>
|
||||
<view class="_label">{{item.name}}</view>
|
||||
<view class="_label">{{item.showText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<viwe>连续签到7天即可享受惊喜大礼包</viwe>
|
||||
<view class="tishi">连续签到7天即可获得7元奖励</view>
|
||||
|
||||
<view class="signInBtn">
|
||||
<view>点击签到</view>
|
||||
<view class="signInBtn" v-if="signInBtn=='已签到'">
|
||||
<view>{{signInBtn}}</view>
|
||||
<view class="signInBtnBg"></view>
|
||||
</view>
|
||||
<view class="signInBtn" v-else @click="taskReceive(15)">
|
||||
<view>{{signInBtn}}</view>
|
||||
<view class="signInBtnBg"></view>
|
||||
</view>
|
||||
|
||||
|
|
@ -39,7 +48,9 @@
|
|||
|
||||
<view class="content margin-lr padding bg-white u-relative" v-if="list.length">
|
||||
|
||||
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index">
|
||||
<view class="cell flex justify-between" v-for="(item,index) in list" :key="index"
|
||||
v-if="(item.buttonUrl=='/me/invite/index'&&isShowMoneyPay)||item.buttonUrl!='/me/invite/index'"
|
||||
>
|
||||
<view class="cell_left flex">
|
||||
<view class="cell_title flex">
|
||||
<view class="u-font-28 text-bold title" :style="{alignSelf: item.rewardImg?'center':'flex-start'}">{{ item.title}}</view>
|
||||
|
|
@ -72,6 +83,7 @@
|
|||
},
|
||||
list: [],
|
||||
checked:false,
|
||||
signDays: 0,
|
||||
signInList: [
|
||||
{ name: '第一天' },
|
||||
{ name: '第二天' },
|
||||
|
|
@ -81,12 +93,50 @@
|
|||
{ name: '第六天' },
|
||||
{ name: '第七天' },
|
||||
],
|
||||
signInBtn: '点击签到',
|
||||
isShowMoneyPay: true,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getTaskdata()
|
||||
this.getsignIn()
|
||||
this.$Request.getT("app/common/type/919", {}).then(res => {
|
||||
if (res.code == 0) {
|
||||
const sysInfo = uni.getSystemInfoSync();
|
||||
let isIos = sysInfo.platform == 'ios'
|
||||
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getsignIn() {
|
||||
this.$Request.getT('app/userSignRecord/getUserSignData', {}).then(res => {
|
||||
if (res.code == 0 ) {
|
||||
this.signInList = res.data.recordList
|
||||
this.signDays = res.data.signDays
|
||||
this.signInList.map((item,index)=>{
|
||||
if (item.showText == '待签到'&&index>0) {
|
||||
this.signInBtn = this.signInList[index-1].status == 0 ? '重新签到' : '点击签到'
|
||||
}
|
||||
let someDate = new Date(item.signDay); // 假设这是需要判断的日期
|
||||
if (item.signDay && this.isToday(someDate)) {
|
||||
this.signInBtn = '已签到'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
isToday (date) {
|
||||
const today = new Date();
|
||||
return date.getDate() === today.getDate() // 比较日期
|
||||
&& date.getMonth() === today.getMonth() // 比较月份
|
||||
&& date.getFullYear() === today.getFullYear(); // 比较年份
|
||||
},
|
||||
/**
|
||||
* 跳转
|
||||
* @param {Object} item
|
||||
|
|
@ -123,16 +173,16 @@
|
|||
this.$Request.getT('app/taskCenter/taskReceive', data).then(res => {
|
||||
if (res.code == 0 ) {
|
||||
uni.showToast({
|
||||
title: '领取成功',
|
||||
title: id==15?'签到成功':'领取成功',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.getTaskdata()
|
||||
this.getsignIn()
|
||||
},1000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
@ -312,8 +362,20 @@
|
|||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
.signIn-Item.active{
|
||||
.radius{
|
||||
background-color: #EA9EA8;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
.tishi{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
color: #7F7F7F;
|
||||
}
|
||||
|
||||
.signInBtn{
|
||||
width: 355rpx;
|
||||
height: 64rpx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue