53 Commits
dwb ... gaohao

Author SHA1 Message Date
GaoHao
14486e14d1 配置更新 2025-02-06 11:11:23 +08:00
GaoHao
3b1c7ea31f 下载页面优化 2025-02-06 09:34:02 +08:00
GaoHao
be21975449 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/new_app into test 2025-02-05 14:01:21 +08:00
GaoHao
19f6cadae7 红包明细加载优化 2025-02-05 14:01:02 +08:00
9dbf88174e h5首页增加关闭h5访问通知 2025-02-05 13:32:07 +08:00
93f4aca944 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into ymf 2025-01-23 14:58:03 +08:00
GaoHao
9a33f5ebb1 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/new_app into test 2025-01-22 18:27:18 +08:00
GaoHao
65a6cb04e9 任务页面优化 2025-01-22 18:27:04 +08:00
d522437135 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into ymf 2025-01-22 14:23:31 +08:00
GaoHao
ab588d4123 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into test 2025-01-22 14:21:06 +08:00
GaoHao
a1c95f7f1b 公告H5优化 2025-01-22 14:21:02 +08:00
duan
0c5e5798ea 修改首页列表布局,和h5红包显示 2025-01-22 13:56:05 +08:00
6f1149fae2 增加打包后去除console.log打印 2025-01-22 13:53:54 +08:00
GaoHao
b4a7890f8a Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/new_app into test 2025-01-22 13:44:58 +08:00
GaoHao
08b63c3a88 H5生成接口地址修改 2025-01-22 13:44:37 +08:00
8f0729606e Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into ymf 2025-01-22 11:41:19 +08:00
91e8d66941 修复视频播放控制条兼容问题,修改部分代码逻辑,去除部分打印代码 2025-01-22 11:41:09 +08:00
1550bcd19c 剔除无用代码 2025-01-22 11:39:59 +08:00
GaoHao
f8bd53596b 提现优化更新 2025-01-22 10:38:43 +08:00
fa809e7b0b Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into ymf 2025-01-21 17:25:42 +08:00
896287e5cf 暂时使用原生进度条。自定义进度条调试中 2025-01-21 17:25:32 +08:00
GaoHao
ef55dc901e 个人中心优化 2025-01-21 17:22:26 +08:00
1be09bf67a 修复视频不显示支付次数问题 2025-01-21 15:20:05 +08:00
GaoHao
d1153659cb 名字更新 2025-01-21 14:44:46 +08:00
duan
fffcdf483b 修改olode为onshow 2025-01-20 16:16:36 +08:00
duan
f0e2797e8e 添加领取接口 2025-01-20 15:15:52 +08:00
GaoHao
46ac9db29d 广告回调修改 2025-01-20 15:09:04 +08:00
GaoHao
3fbca65f86 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into test 2025-01-20 14:56:43 +08:00
GaoHao
3b472eac65 任务看广告优化 2025-01-20 14:55:07 +08:00
duan
d7a8578b0a 领取接口 2025-01-20 14:52:51 +08:00
duan
2ba92103f9 弹窗判断 2025-01-20 14:32:54 +08:00
GaoHao
a60986d0ca Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/new_app into test 2025-01-20 14:13:51 +08:00
GaoHao
88cdceb780 实名认证页面优化 2025-01-20 14:13:35 +08:00
duan
6422392967 签到领取 2025-01-20 13:40:53 +08:00
duan
fe79e54917 修改onShow 2025-01-20 11:46:15 +08:00
GaoHao
ec8e849bf5 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/new_app into test 2025-01-20 11:44:30 +08:00
GaoHao
d7626a24b8 处理版本更新tabbar隐藏问题 2025-01-20 11:44:14 +08:00
duan
6cc92c111f 修改状态 2025-01-20 11:43:26 +08:00
GaoHao
2d5c5d2ba9 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/new_app into test 2025-01-20 11:15:55 +08:00
GaoHao
f67ff84af3 版本更新优化 2025-01-20 11:15:28 +08:00
GaoHao
c72c0e9baf 版本更新优化 2025-01-20 11:13:45 +08:00
duan
0a25834082 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into test 2025-01-20 10:55:58 +08:00
duan
ec35f4bfb1 修改报错 2025-01-20 10:55:55 +08:00
GYJ
949403dd0d test 2025-01-20 10:50:06 +08:00
duan
c05ee20821 优化审核代码 2025-01-20 10:48:44 +08:00
duan
b5d902a99d 版本判断 2025-01-20 10:47:42 +08:00
duan
ccf9625f41 版本 2025-01-20 10:47:01 +08:00
duan
bb197f1236 版本号提交 2025-01-20 10:45:21 +08:00
duan
8674f1974d 判断版本号 2025-01-20 10:44:47 +08:00
duan
1674a62fec 提交判断版本号 2025-01-20 10:42:53 +08:00
duan
18549d562f 代码找回 2025-01-20 10:07:52 +08:00
duan
45316112b4 合并代码 2025-01-20 09:51:11 +08:00
f29542844a 解决store/common报错问题 2025-01-18 10:02:03 +08:00
24 changed files with 567 additions and 264 deletions

View File

@@ -2,7 +2,7 @@
"version" : "1.0", "version" : "1.0",
"configurations" : [ "configurations" : [
{ {
"playground" : "standard", "playground" : "custom",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
}, },
{ {

View File

@@ -27,7 +27,8 @@ export const getUserSignData = (data) => {
export const receiveGoods = (data) => { export const receiveGoods = (data) => {
return http.request({ return http.request({
url: 'taskCenter/receiveGoods', url: 'taskCenter/receiveGoods',
data data,
method: 'POST',
}) })
} }
// 任务-签到 // 任务-签到

View File

@@ -138,3 +138,13 @@ export function playStatus(data) {
data data
}) })
} }
// 获取支付次数提示
export function getPayTips(data){
return http.request({
url: 'course/getRedEnvelopeTips',
method: 'GET',
data
})
}

View File

@@ -1,12 +1,12 @@
//打包时修改env的值即可 //打包时修改env的值即可
const env='test' //test , production,local const env='production' //test , production,local
export const encryptKey='1234567890123456' // http数据加解密的key export const encryptKey='1234567890123456' // http数据加解密的key
export const apiUrl='/czg/' export const apiUrl='/czg/'
export const h5Config = { export const h5Config = {
production: 'https://dj-h5.hnsiyao.cn', production: 'https://web.hnsiyao.cn',
test: 'https://web-api.hnsiyao.cn', test: 'https://web-api.hnsiyao.cn',
local: 'http://192.168.1.41:8100' local: 'http://192.168.1.41:8100'
} }

View File

@@ -1,26 +1,31 @@
<template> <template>
<view class="item" @appear="appear" @disappear="disappear" @click.stop :style="{height:height+'px'}" :key="index"> <view class="item" @appear="appear" @disappear="disappear" @click.stop :style="{height:height+'px'}" :key="index">
<video class="u-flex-1 video" :show-fullscreen-btn="false" @controlstoggle="controlstoggles" v-if="showVideo" <!-- :controls="showControls" -->
play-btn-position="center" <video class=" video" :show-fullscreen-btn="false" @controlstoggle="controlstoggles" v-if="showVideo"
:show-center-play-btn="false" play-btn-position="bottom" :show-center-play-btn="true" :show-play-btn="true" @click.stop="videoClick()"
:show-play-btn="false" @loadedmetadata="loadedmetadata" @timeupdate="timeupdate" @waiting="waiting()" object-fit="cover"
:controls="true" @loadeddata="waiting()" @pause="onpause"
@click.stop="videoClick()"
@loadedmetadata="loadedmetadata"
@timeupdate="timeupdate" @waiting="waiting()" object-fit="cover" @pause="onpause"
@play="videoPlay('myVideo'+item.courseDetailsId,item.courseDetailsId)" :play-strategy="2" @play="videoPlay('myVideo'+item.courseDetailsId,item.courseDetailsId)" :play-strategy="2"
:show-loading="true" codec="software" :muted="false" :loop="loop" :show-loading="true" codec="software" :muted="false" :loop="loop" :enable-progress-gesture="false"
:enable-progress-gesture="false" :poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId" :poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId" :autoplay="autoplay" @ended="ended"
:autoplay="autoplay" @ended="ended" :id="'myVideo'+item.courseDetailsId" :src="item.videoUrl"></video> :id="'myVideo'+item.courseDetailsId" :src="item.videoUrl"></video>
<image class="poster" v-else @click.stop="posterClick" :src="item.titleImg"
mode="aspectFill"> <image class="poster" v-else @click.stop="posterClick" :src="item.titleImg" mode="aspectFill">
</image> </image>
<!-- #ifdef APP -->
<view class="play-icon" v-if="videoIsLoadedmetadata&&showVideo&&!isPlying" @click.stop="videoClick()" :style="playStyle"> <view class="control-play-cover" v-if="showControls&&isIos" @click="playCoverClick()">
<image class="icon" src="@/static/images/play.png" mode=""></image>
</view> </view>
<!-- #endif -->
<!-- <view class="progress" v-if="showVideo&&!isPlying" @click.stop>
<progress-vue @touchstart="progressScroll" @touchend="progressScrollEnd"></progress-vue>
</view> -->
<!-- <view class="play-icon" v-if="showVideo&&!isPlying" @click.stop="playIconClick()" :style="playStyle">
<image class="icon" src="@/static/images/play.png" mode=""></image>
</view> -->
<view class="info" v-if="!isCommand" :style="infoStyle"> <view class="info" v-if="!isCommand" :style="infoStyle">
<text class="color-fff" v-if="item.courseDetailsName">{{item.courseDetailsName}}</text> <text class="color-fff" v-if="item.courseDetailsName">{{item.courseDetailsName}}</text>
@@ -64,6 +69,10 @@
<script setup> <script setup>
import * as Api from '@/api/video/index.js' import * as Api from '@/api/video/index.js'
// #ifdef APP
const domModule = uni.requireNativePlugin('dom')
// #endif
import progressVue from './progress.vue'
import { import {
computed, computed,
nextTick, nextTick,
@@ -79,6 +88,10 @@
// #endif // #endif
const props = defineProps({ const props = defineProps({
isIos:{
type: Boolean,
default: false
},
isAndriod: { isAndriod: {
type: Boolean, type: Boolean,
default: false default: false
@@ -153,22 +166,47 @@
type: Number, type: Number,
default: 1 default: 1
}, },
showControls: { showAndriod: {
type: Boolean, type: Boolean,
default: true default: false
} }
}) })
let isWaiting = ref(true)
function waiting() {
console.log('waiting');
isWaiting.value = true
}
let showControls = ref(props.showAndriod?false:true)
let playPercent = ref(0)
let autoplay = ref(props.item.videoUrl ? true : false) let autoplay = ref(props.item.videoUrl ? true : false)
const emits = defineEmits(['controlstoggles', 'disappear', 'appear', 'waiting', 'videoPlay', 'ended', 'dianzanClick', const emits = defineEmits(['controlstoggles', 'disappear', 'appear', 'waiting', 'videoPlay', 'ended', 'dianzanClick',
'share', 'zhuijuClick', 'popupShow', 'itemMounted', 'toDetail', 'showInfo', 'playStatusChange' 'share', 'zhuijuClick', 'popupShow', 'itemMounted', 'toDetail', 'playStatusChange', 'progressScroll',
'progressScrollEnd'
]) ])
function progressScroll(e) {
emits('progressScroll')
}
function progressScrollEnd(e) {
emits('progressScrollEnd')
}
function posterClick() { function posterClick() {
if (!props.item.videoUrl) { if (!props.item.videoUrl) {
popupShow('pay', props.item) popupShow('pay', props.item)
} }
} }
function controlstoggles(e) { function controlstoggles(e) {
showControls.value = e.detail.show
emits('controlstoggles', e) emits('controlstoggles', e)
} }
@@ -179,21 +217,16 @@
emits('toDetail') emits('toDetail')
} }
function waiting() {
}
let videoIsLoadedmetadata = ref(false) let videoIsLoadedmetadata = ref(false)
function loadedmetadata() { function loadedmetadata() {
console.log('loadedmetadata');
videoIsLoadedmetadata.value = true videoIsLoadedmetadata.value = true
} }
let isPlying = ref(false) let isPlying = ref(false)
watch(() => isPlying.value, (newval) => {
console.log(newval);
emits('showInfo', newval)
})
//是否是第一次加载时的播放,不是暂停再播放 //是否是第一次加载时的播放,不是暂停再播放
@@ -216,6 +249,7 @@
} }
function timeupdate(e) { function timeupdate(e) {
playPercent.value = e.detail.currentTime * 100 / e.detail.duration
//隐藏loding //隐藏loding
uni.hideLoading() uni.hideLoading()
if (isPlayFinish) { if (isPlayFinish) {
@@ -229,31 +263,45 @@
} }
} }
let videoBar = null
let watingTimer = null
function videoPlay() { function videoPlay() {
if (isFirstPlay && !isPlayFinish) { if (isFirstPlay && !isPlayFinish) {
sendPlayStatus('start') sendPlayStatus('start')
} }
isFirstPlay = false isFirstPlay = false
isPlying.value = true isPlying.value = true
clearTimeout(watingTimer)
watingTimer = setTimeout(() => {
isWaiting.value = false
}, 1000)
// showControls.value = false
// #ifdef H5 // #ifdef H5
emits('controlstoggles', { videoBar = videoBar ? videoBar : document.querySelector('.uni-video-bar');
detail: { videoBar.style.cssText = 'display:none;';
show: false
}
})
// #endif // #endif
// #ifdef APP
if (!props.showAndriod) {}
// #endif
} }
function onpause() { function onpause() {
isPlying.value = false isPlying.value = false
// showControls.value = true
// #ifdef H5 // #ifdef H5
emits('controlstoggles', { videoBar = videoBar ? videoBar : document.querySelector('.uni-video-bar');
detail: { videoBar.style.cssText = '';
show: true
}
})
// #endif // #endif
} }
@@ -278,8 +326,36 @@
emits('popupShow', key) emits('popupShow', key)
} }
function playCoverClick() {
console.log('playCoverClick');
if (video) {
if (isPlying.value) {
video.pause()
} else {
video.play()
}
}
}
function playIconClick(){
if (video) {
if (isPlying.value) {
video.pause()
} else {
video.play()
}
}
}
function videoClick() { function videoClick() {
console.log('videoClick'); console.log('videoClick');
// #ifdef APP
// 兼容ios控制条和信息展示不同步
if (isPlying.value&&showControls.value) {
return
}
// #endif
if (video) { if (video) {
if (isPlying.value) { if (isPlying.value) {
video.pause() video.pause()
@@ -312,8 +388,6 @@
} }
const showVideo = computed(() => { const showVideo = computed(() => {
if (props.isAndriod) { if (props.isAndriod) {
console.log('props.nowIndex === props.index ');
console.log(props.nowIndex,props.index );
return (props.nowIndex === props.index && props.item.videoUrl) ? true : false return (props.nowIndex === props.index && props.item.videoUrl) ? true : false
} else { } else {
return props.current === props.index && props.item.videoUrl return props.current === props.index && props.item.videoUrl
@@ -330,7 +404,6 @@
video = uni.createVideoContext('myVideo' + props.item.courseDetailsId) video = uni.createVideoContext('myVideo' + props.item.courseDetailsId)
video.playbackRate(props.playSpeeds) video.playbackRate(props.playSpeeds)
video.play() video.play()
console.log('init play');
} }
} catch (error) { } catch (error) {
console.error('------') console.error('------')
@@ -344,7 +417,6 @@
} }
}) })
watch(() => showVideo.value, (newval) => { watch(() => showVideo.value, (newval) => {
console.log('showVideo change:' + newval);
if (newval) { if (newval) {
isFirstPlay = true isFirstPlay = true
isPlayFinish = false isPlayFinish = false
@@ -377,15 +449,29 @@
} }
}) })
const infoStyle = computed(() => { const infoStyle = computed(() => {
// #ifdef H5
return { return {
transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?0:'-750rpx'})` transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?0:'-750rpx'})`
} }
// #endif
return {
transform: `translateX(${(showControls.value||!props.item.videoUrl)?0:'-750rpx'})`
}
// return {
// transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?0:'-750rpx'})`
// }
}) })
const rightStyle = computed(() => { const rightStyle = computed(() => {
// #ifdef H5
return { return {
transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?'0':60}px)` transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?'0':60}px)`
} }
// #endif
return {
transform: `translateX(${(showControls.value||!props.item.videoUrl)?'0':60}px)`
}
}) })
</script> </script>
@@ -396,6 +482,12 @@
position: relative; position: relative;
} }
/* 假设控制条的类名为 uni-video-controls */
.uni-video-controls {
transition: none !important;
-webkit-transition: none !important;
}
.box { .box {
/* #ifdef H5 */ /* #ifdef H5 */
flex: 1; flex: 1;
@@ -509,6 +601,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.play-icon { .play-icon {
position: absolute; position: absolute;
left: 0; left: 0;
@@ -518,6 +611,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
$icon-size: 80rpx; $icon-size: 80rpx;
.icon { .icon {
width: $icon-size; width: $icon-size;
height: $icon-size; height: $icon-size;
@@ -541,8 +635,28 @@
} }
} }
.progress {
padding: 20rpx;
position: absolute;
bottom: 20rpx;
left: 0;
right: 0;
z-index: 1;
}
.zhifubao { .zhifubao {
width: 56rpx; width: 56rpx;
height: 56rpx; height: 56rpx;
} }
.control-play-cover {
position: absolute;
left: 10px;
bottom: 0;
width: 38px;
height: 44px;
// background-color: red;
background-color: transparent;
z-index: 1;
}
</style> </style>

View File

@@ -1,26 +1,38 @@
<template> <template>
<list v-if="showAndriod" :bounce="false" :loadmoreoffset="wHeight*3" :show-scrollbar="false" ref="listBox" <list v-if="showAndriod" :bounce="false" :loadmoreoffset="wHeight*3" :show-scrollbar="false" ref="listBox"
:pagingEnabled="true" @loadmore="loadmore" :scrollable="true"> :pagingEnabled="true" @loadmore="loadmore" :scrollable="scrollable">
<cell v-for="(item,index) in list" :key="item.courseDetailsId" :ref="setRefList(index)"> <cell v-for="(item,index) in list" :key="item.courseDetailsId" :ref="setRefList(index)">
<view class="swipers-items" :style="boxStyle" @longpress="popupShow('speed')"> <view class="swipers-items" :style="boxStyle" @longpress="popupShow('speed')">
<list-item-vue :total="list.length" :item="item" :current="current" :isCollect="isCollect" <list-item-vue :total="list.length" :item="item" :current="current" :isCollect="isCollect"
:isAndriod="isAndriod" :isTabbar="isTabbar" @playStatusChange="playStatusChange" :height="wHeight" :isAndriod="isAndriod"
:showAndriod="showAndriod"
:isIos="isIos"
:isH5="isH5"
:isTabbar="isTabbar" @playStatusChange="playStatusChange" :height="wHeight"
:isCommand="isCommand" :showControls="control.showControls" @toDetail="toDetail(item,index)" :isCommand="isCommand" :showControls="control.showControls" @toDetail="toDetail(item,index)"
@itemMounted="itemMounted" @controlstoggles="controlstoggles" :index="index" :instance="instance" @itemMounted="itemMounted" @controlstoggles="controlstoggles" :index="index" :instance="instance"
:nowIndex="nowIndex" @appear="appear($event,item,index)" :playSpeeds="playSpeeds" :nowIndex="nowIndex" @appear="appear($event,item,index)" :playSpeeds="playSpeeds"
@disappear="disappear($event, item,index)" @dianzanClick="dianzanClick(item,index)" @disappear="disappear($event, item,index)" @dianzanClick="dianzanClick(item,index)"
@share="share(item)" @zhuijuClick="zhuijuClick(item)" @share="share(item)" @zhuijuClick="zhuijuClick(item)"
@progressScroll="progressScroll"
@progressScrollEnd="progressScrollEnd"
@popupShow="popupShow($event,item,index)"></list-item-vue> @popupShow="popupShow($event,item,index)"></list-item-vue>
</view> </view>
</cell> </cell>
</list> </list>
<view v-if="isH5||isIos" class=" w-full box" style="width: 100vw;"> <view v-if="isH5||isIos" class=" w-full box" style="width: 100vw;">
<swiper @longpress="popupShow('speed')" :style="{height:wHeight+'px'}" v-if="videoList.length" <swiper
@longpress="popupShow('speed')"
:style="{height:wHeight+'px'}" v-if="videoList.length"
@change="swiperChange" :current="current" :circular="true" vertical class="u-flex-1" @change="swiperChange" :current="current" :circular="true" vertical class="u-flex-1"
@transition="transition" :indicator-dots="false" :autoplay="false" :interval="0" :duration="200"> @transition="transition" :indicator-dots="false" :autoplay="false" :interval="0" :duration="200">
<swiper-item v-for="(item,index) in videoList" :key="index"> <swiper-item v-for="(item,index) in videoList" :key="index">
<list-item-vue :total="list.length" :item="item" :isCommand="isCommand" :height="wHeight" <list-item-vue :total="list.length" :item="item" :isCommand="isCommand" :height="wHeight"
:isAndriod="isAndriod" :isTabbar="isTabbar" @playStatusChange="playStatusChange" :isAndriod="isAndriod"
:showAndriod="showAndriod"
:isIos="isIos"
:isH5="isH5"
:isTabbar="isTabbar" @playStatusChange="playStatusChange"
:showControls="control.showControls" :current="current" :isCollect="isCollect" :showControls="control.showControls" :current="current" :isCollect="isCollect"
@toDetail="toDetail(item,index)" @controlstoggles="controlstoggles" :playSpeeds="playSpeeds" @toDetail="toDetail(item,index)" @controlstoggles="controlstoggles" :playSpeeds="playSpeeds"
:index="index" :nowIndex="nowIndex" @dianzanClick="dianzanClick(item,index)" @share="share(item)" :index="index" :nowIndex="nowIndex" @dianzanClick="dianzanClick(item,index)" @share="share(item)"
@@ -146,7 +158,7 @@
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('pay')"></up-icon> <up-icon name="close" :size="16" color="#333" bold @click="popupClose('pay')"></up-icon>
</view> </view>
<view class="u-m-t-30"> <view class="u-m-t-30">
<text class=" color-999 u-font-24">每日前10次付款均可获取抽奖机会抽奖保底抽中付款金额等额红包红包可直接提现当前为第1次付款</text> <text class=" color-999 u-font-24">{{paytips}} </text>
</view> </view>
<view class="colo-333 pay-list font-bold u-font-28 u-m-t-20"> <view class="colo-333 pay-list font-bold u-font-28 u-m-t-20">
<view class="pay-list-item" v-if="info&&info.price" @click="payBtnClick('money','all')"> <view class="pay-list-item" v-if="info&&info.price" @click="payBtnClick('money','all')">
@@ -261,6 +273,17 @@
onUnmounted onUnmounted
} from 'vue'; } from 'vue';
let scrollable=ref(true)
function progressScroll(){
scrollable.value=false
}
function progressScrollEnd(){
scrollable.value=true
}
let isH5 = false let isH5 = false
// #ifdef H5 // #ifdef H5
isH5 = true isH5 = true
@@ -273,6 +296,7 @@
const refPoster = ref(null) const refPoster = ref(null)
let paytips=ref('')
const props = defineProps({ const props = defineProps({
list: { list: {
type: Array, type: Array,
@@ -309,6 +333,8 @@
} }
} }
}) })
const control = reactive({ const control = reactive({
showBack: true, showBack: true,
showControls: true showControls: true
@@ -328,7 +354,6 @@
}) })
function controlstoggles(e) { function controlstoggles(e) {
console.log(e);
control.showControls = e.detail.show control.showControls = e.detail.show
control.showBack = control.showControls control.showBack = control.showControls
} }
@@ -459,7 +484,6 @@
if (isFirst) { if (isFirst) {
$mountedComponents[index] = true $mountedComponents[index] = true
} }
console.log('appear:' + index);
if (!initing) { if (!initing) {
cacheIndex = index cacheIndex = index
} }
@@ -594,10 +618,8 @@
function goListPosition(index) { function goListPosition(index) {
clearTimeout(positonmer) clearTimeout(positonmer)
console.log('goListPosition:' + index)
const el = refList.value[index] const el = refList.value[index]
if (initing) { if (initing) {
console.log($mountedComponents);
if (!$mountedComponents[index]) { if (!$mountedComponents[index]) {
positonmer = setTimeout(() => { positonmer = setTimeout(() => {
goListPosition(index) goListPosition(index)
@@ -634,7 +656,7 @@
} }
} }
function popupShow(key = 'show', item, index) { async function popupShow(key = 'show', item, index) {
console.log(key, item, 'debug'); console.log(key, item, 'debug');
console.log('key' + popup[key]); console.log('key' + popup[key]);
console.log('popupShow'); console.log('popupShow');
@@ -648,6 +670,11 @@
xuanjiInit() xuanjiInit()
// #endif // #endif
} }
if(key=='pay'){
const res=await Api.getPayTips()
console.log(res);
paytips.value=res
}
popup[key] = true popup[key] = true
if (item) { if (item) {
popup.data = item popup.data = item
@@ -827,7 +854,6 @@
const lastIndex = listLen - 1 const lastIndex = listLen - 1
const index = props.list.findIndex(v => v.courseDetailsId == item.courseDetailsId) const index = props.list.findIndex(v => v.courseDetailsId == item.courseDetailsId)
nowIndex.value = index nowIndex.value = index
console.log('setVideoList nowIndex' + index);
let position = '' let position = ''
if (index === 0) { if (index === 0) {
position = 'start' position = 'start'
@@ -862,7 +888,6 @@
videoList.value = [props.list[index + 1], props.list[index - 1], item] videoList.value = [props.list[index + 1], props.list[index - 1], item]
} }
} }
console.log(videoList.value, 'debug');
if (!item.videoUrl) { if (!item.videoUrl) {
nextTick(() => { nextTick(() => {
setTimeout(() => { setTimeout(() => {

View File

@@ -0,0 +1,68 @@
<template>
<view class="progress-box">
<view class="line" :style="{width:percent+'px'}">
</view>
<view class="block" @touchstart="progressTouchStart" @touchmove="progressTouchMove"
:style="{transform:'translateX('+percent+'px)'}"
@touchend="progressTouchEnd"></view>
</view>
</template>
<script setup>
import {
ref
} from 'vue';
const props=defineProps({
})
let percent=ref(50)
//进度条
let progressIsTouch = false
let start = 0
function progressTouchStart(e) {
console.log(e);
start = e.touches[0].clientX
progressIsTouch = true
}
function progressTouchMove(e) {
console.log(e);
const step = 1;
playPercent.value += step
}
function progressTouchEnd(e) {
console.log(e);
progressIsTouch = false
}
</script>
<style lang="scss" scoped>
.progress-box {
border-radius: 20px;
height: 5px;
margin: 4px 0;
background-color: rgba(255, 255, 255, .6);
box-shadow: 0 0 1px #eee;
flex-direction: row;
overflow: visible;
.line {
background-color: #fff;
border-radius: 20px;
overflow: visible;
}
$block-size: 8px;
.block {
top: -1px;
left: 0;
position: absolute;
z-index: 2;
width: $block-size;
height: $block-size;
background-color: #fff;
border-radius: 50%;
box-shadow: 0 0 1px #eee;
}
}
</style>

View File

@@ -73,8 +73,6 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
// http响应码不正确 // http响应码不正确
if (statusCode != 200 && statusCode != 204 && statusCode != 201) { if (statusCode != 200 && statusCode != 204 && statusCode != 201) {
isShowErrorToast = true; isShowErrorToast = true;
data.message =
data.message == "Bad credentials" ? "用户名或密码错误" : data.message;
infoBox.showToast(data.message || "服务器异常"); infoBox.showToast(data.message || "服务器异常");
return Promise.reject(bodyData); // 跳转到catch函数 return Promise.reject(bodyData); // 跳转到catch函数
} }
@@ -122,14 +120,12 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
} }
if (res.code == 401) { if (res.code == 401) {
infoBox.showToast(res.message || "请登录").then(() => {
uni.redirectTo({ uni.redirectTo({
url: "/pages/login/login", url: "/pages/login/login",
}); });
reject(); reject();
});
} }
if (res.code != 0) { if (res.code != 0&&res.code != 401) {
infoBox.showToast(res.msg).then(() => {}); infoBox.showToast(res.msg).then(() => {});
reject(); reject();
} }

View File

@@ -1,9 +1,9 @@
{ {
"name" : "duanju-app-v3", "name" : "斯耀短剧",
"appid" : "__UNI__E0B05B1", "appid" : "__UNI__E0B05B1",
"description" : "", "description" : "",
"versionName" : "2.3.4", "versionName" : "1.2.5",
"versionCode" : 234, "versionCode" : 125,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@@ -32,7 +32,8 @@
{ {
"path": "pages/task/index", "path": "pages/task/index",
"style": { "style": {
"navigationBarTitleText": "任务大厅" "navigationBarTitleText": "任务大厅",
"navigationStyle": "custom"
} }
}, { }, {
"path": "pages/chasingDrama/index", "path": "pages/chasingDrama/index",

View File

@@ -35,7 +35,7 @@
.contentlist { .contentlist {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 10rpx; margin-top: 10rpx;
padding: 0 26rpx; padding: 0 26rpx;
@@ -44,17 +44,19 @@
border-radius: 21rpx 21rpx 21rpx 21rpx; border-radius: 21rpx 21rpx 21rpx 21rpx;
width: 30%; width: 30%;
margin-top: 20rpx; margin-top: 20rpx;
text-align: center;
>view { >view {
font-weight: 400; font-weight: 400;
font-size: 25rpx; font-size: 25rpx;
text-align: left; text-align: left;
margin-left: 10rpx;
} }
} }
.liststyle:last-child { // .liststyle:last-child {
// margin-right: auto; // margin-right: auto;
// margin-left: 6rpx; // margin-left: 6rpx;
} // }
} }
</style> </style>

View File

@@ -10,7 +10,7 @@
</view> --> </view> -->
</view> </view>
<template v-if="datas.setindexdata"> <template v-if="datas.isExamine">
<view class="gongao"> <view class="gongao">
<view class="gongaoicon"> <view class="gongaoicon">
公告 公告
@@ -42,27 +42,37 @@
</view> </view>
</view> </view>
<contentlist :list='datas.list'></contentlist> <contentlist :list='datas.list'></contentlist>
<image v-if="datas.setindexdata" @click="goMsg()" src="@/static/index/red-pack-new.gif" <image v-if="datas.isExamine" @click="goMsg()" src="@/static/index/red-pack-new.gif"
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></image> style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></image>
<up-modal :show="datas.version.show" :confirm-text="datas.version.confirmText" <up-modal :show="datas.version.show" :confirm-text="datas.version.confirmText"
:showCancelButton="datas.version.cancelText!=''" @confirm='confirmUpdateVersion' :title="datas.version.title" :showCancelButton="datas.version.cancelText!=''" @cancel="cancelUpdateVersion" @confirm='confirmUpdateVersion'
:title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)" @cancel="datas.version.show = false"> :title="datas.version.title" :title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)">
<view class="" style="padding-top: 30rpx;text-align: left;"> <view class="" style="padding-top: 30rpx;text-align: left;">
<scroll-view scroll-y="true" style="max-height: 50vh;"> <scroll-view scroll-y="true" style="max-height: 50vh;">
<rich-text style="color:#666" :nodes="datas.version.content"></rich-text> <!-- <rich-text style="color:#666" :nodes="datas.version.content"></rich-text> -->
<view style="text-align: justify;font-size: 18px;color: #666;" v-html="datas.version.content"></view>
</scroll-view> </scroll-view>
</view> </view>
</up-modal> </up-modal>
<up-modal :show="datas.ruleShow" v-if="$common.isIosExamine&&!datas.version.show" confirm-text="知道了" title="规则说明"
:title="datas.rule_title" :title-style="{fontWeight:'700'}" @confirm="ruleConfirm" <!-- h5关闭通知 -->
<!-- #ifdef H5 -->
<up-modal :show="datas.stopShow"
cancel-text="知道了"
show-cancel-button
confirm-text="去下载" title="重要通知"
@cancel="stopCancel"
:title="datas.rule_title" :title-style="{fontWeight:'700'}" @confirm="stopConfirm"
confirm-color="rgb(255, 117, 129)"> confirm-color="rgb(255, 117, 129)">
<view class="u-p-30 u-text-left"> <view class="color-red u-text-left">
<scroll-view scroll-y="true" style="max-height: 50vh;"> <text>2025年2月8日将关闭网页访问请及时下载最新APP</text>
<rich-text style="text-align: justify;font-size: 18px;color: #666;"
:nodes="datas.rule_content"></rich-text>
</scroll-view>
</view> </view>
</up-modal> </up-modal>
<!-- #endif -->
</template> </template>
<script setup> <script setup>
@@ -94,14 +104,18 @@
} from '@/store/common.js' } from '@/store/common.js'
const $common = useCommonStore() const $common = useCommonStore()
onShow(() => { onShow(() => {
console.log('cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(), 'debug') // console.log('cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(), 'debug')
// 判断ios是否审核 // 判断ios是否审核
$common.init() $common.init()
let sysInfo = uni.getSystemInfoSync() // #ifdef H5
let isIos = sysInfo.platform == 'ios' datas.isExamine = $common.isIosExamine
if (isIos) { // #endif
datas.setindexdata = $common.isIosExamine // let sysInfo = uni.getSystemInfoSync()
} // let isIos = sysInfo.platform == 'ios'
// if (isIos) {
// datas.setindexdata = $common.setversion
// console.log(datas.setindexdata,'seaeasdas')
// }
}) })
let datas = reactive({ let datas = reactive({
noticeList: [], //公告列表 noticeList: [], //公告列表
@@ -110,7 +124,7 @@
list: [], // 底部短剧内容 list: [], // 底部短剧内容
page: 1, // 首页推荐分页 page: 1, // 首页推荐分页
stopShow:true,//h5关闭弹窗
ruleShow: false, ruleShow: false,
rule_title: '', // 首页弹窗标题 rule_title: '', // 首页弹窗标题
rule_content: '', // 首页弹窗内容 rule_content: '', // 首页弹窗内容
@@ -123,14 +137,14 @@
content: "", content: "",
confirmText: "", confirmText: "",
cancelText: "", cancelText: "",
downloadLink: ""
}, },
setindexdata :"false" setindexdata: false
}) })
onLoad(() => { onLoad(() => {
versionUpdate() versionUpdate()
getMsg() getMsg()
getrecomVideo() getrecomVideo()
datas.isExamine = $common.isIosExamine || 0
}) })
onReady(() => { onReady(() => {
if (!uni.getStorageSync('ruleShow')) { if (!uni.getStorageSync('ruleShow')) {
@@ -151,31 +165,40 @@
getrecomVideo() getrecomVideo()
}) })
function stopConfirm(){
datas.stopShow=false
uni.navigateTo({
url:'/pages/login/download'
})
}
function stopCancel(){
datas.stopShow=false
}
function versionUpdate() { function versionUpdate() {
//#ifdef APP-PLUS //#ifdef APP-PLUS
plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定 plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定
//获取当前系统版本信息 //获取当前系统版本信息
plus.runtime.getProperty(plus.runtime.appid, widgetInfo => { plus.runtime.getProperty(plus.runtime.appid, widgetInfo => {
//请求后台接口 解析数据 对比版本 //请求后台接口 解析数据 对比版本
selectNewApp().then(res => { selectNewApp().then(async res => {
res = res[0]; res = res[0];
console.log(uni.getSystemInfoSync().platform == 'ios', 1101)
let version; let version;
if (uni.getSystemInfoSync().platform == 'android') { if (uni.getSystemInfoSync().platform == 'android') {
version = res.version version = res.version
} }
if (uni.getSystemInfoSync().platform == 'ios') { if (uni.getSystemInfoSync().platform == 'ios') {
version = res.iosVersion version = res.iosVersion
$common.setversion(widgetInfo.version, version)
} }
version = res.version let isVersion = await $common.setversion(widgetInfo.version, version)
// && uni.getSystemInfoSync().platform == 'android' datas.isExamine = $common.isIosExamine
if (widgetInfo.version < version) { console.log(isVersion, '')
let downloadLink = ''; if (isVersion == 1) {
let androidLink = res.androidWgtUrl; datas.version.downloadLink = res.androidWgtUrl;
let iosLink = res.iosWgtUrl;
datas.version.show = true; datas.version.show = true;
datas.version.title = "发现新版本"; datas.version.title = "发现新版本";
datas.version.content = res.des; datas.version.content = res.des;
uni.hideTabBar()
if (res.method == "true") { if (res.method == "true") {
datas.version.confirmText = "立即更新" datas.version.confirmText = "立即更新"
} else { } else {
@@ -189,6 +212,11 @@
//#endif //#endif
} }
function cancelUpdateVersion() {
uni.showTabBar()
datas.version.show = false
}
function confirmUpdateVersion() { function confirmUpdateVersion() {
// plus.runtime.openURL(config.baseUrl + '/pages/login/appEq') // plus.runtime.openURL(config.baseUrl + '/pages/login/appEq')
linkTo('/pages/login/download') linkTo('/pages/login/download')
@@ -199,7 +227,7 @@
}); });
if (uni.getSystemInfoSync().platform == 'android') { if (uni.getSystemInfoSync().platform == 'android') {
uni.downloadFile({ uni.downloadFile({
url: androidLink, url: datas.version.downloadLink,
success: downloadResult => { success: downloadResult => {
console.log(downloadResult) console.log(downloadResult)
if (downloadResult.statusCode === 200) { if (downloadResult.statusCode === 200) {
@@ -222,7 +250,7 @@
}); });
} }
if (uni.getSystemInfoSync().platform == 'ios') { if (uni.getSystemInfoSync().platform == 'ios') {
plus.runtime.openURL(iosLink, function(res) {}); plus.runtime.openURL(datas.version.downloadLink, function(res) {});
} }
} }

View File

@@ -4,9 +4,9 @@
<view class="content"> <view class="content">
<image class="logo" src="/static/download/appLogo.png"></image> <image class="logo" src="/static/download/appLogo.png"></image>
<view style="font-size: 40rpx;margin-top: 22rpx;color: #FFFFFF;font-weight: bold;">斯耀短剧APP</view> <view style="font-size: 40rpx;margin-top: 22rpx;color: #FFFFFF;font-weight: bold;">{{data.confirmBtn}}</view>
<view style="font-size: 28rpx;margin-top: 16rpx;color: #FFFFFF;font-weight: bold;">海量电子榨菜 免费又过瘾</view> <view style="font-size: 28rpx;margin-top: 16rpx;color: #FFFFFF;font-weight: bold;">海量电子榨菜 免费又过瘾</view>
<button class="confirm-btn" @click="download">{{data.confirmBtn}}</button> <button class="confirm-btn" @click="download">点击下载{{data.confirmBtn}}</button>
</view> </view>
@@ -32,7 +32,7 @@
// #ifdef H5 // #ifdef H5
let u = window.navigator.userAgent; let u = window.navigator.userAgent;
if ( uni.getSystemInfoSync().platform == 'ios') { if ( uni.getSystemInfoSync().platform == 'ios') {
data.confirmBtn = "跳转网页版首页" data.confirmBtn = "顺享短剧APP"
} }
if ( u.toLowerCase().indexOf('micromessenger') !== -1) { if ( u.toLowerCase().indexOf('micromessenger') !== -1) {
data.isWeixin = true data.isWeixin = true
@@ -45,55 +45,23 @@
console.log(uni.getSystemInfoSync().platform == 'android') console.log(uni.getSystemInfoSync().platform == 'android')
if (uni.getSystemInfoSync().platform == 'android') { if (uni.getSystemInfoSync().platform == 'android') {
commonType(49).then(res => { commonType(49).then(res => {
console.log(res)
if (res && res.value) { if (res && res.value) {
// #ifndef H5 // #ifndef H5
plus.runtime.openURL(res.value, function(res) { plus.runtime.openURL(res.value, function(res) {});
});
// #endif // #endif
// #ifdef H5 // #ifdef H5
uni.setClipboardData({
data: res.value,
success: r => {
// this.$queue.showToast('邀请码复制成功');
uni.showToast({
title: '邀请码复制成功',
icon: 'none',
});
}
});
window.location.href = res.value; window.location.href = res.value;
// #endif // #endif
} }
}); });
} else { } else {
commonType(50).then(res => {
if (res && res.value) {
// #ifndef H5 // #ifndef H5
plus.runtime.openURL(res.value, function(res) { plus.runtime.openURL('https://apps.apple.com/cn/app/%E9%A1%BA%E4%BA%AB%E7%9F%AD%E5%89%A7/id6740074541', function(res) {});
});
// #endif // #endif
// #ifdef H5 // #ifdef H5
uni.setClipboardData({ window.location.href = 'https://apps.apple.com/cn/app/%E9%A1%BA%E4%BA%AB%E7%9F%AD%E5%89%A7/id6740074541';
data: res.value,
success: r => {
uni.showToast({
title: '邀请码复制成功',
icon: 'none',
});
}
});
uni.switchTab({
url: '/pages/index/index'
})
// window.location.href = res.data.value;
// #endif // #endif
} }
});
}
} }
</script> </script>

View File

@@ -179,7 +179,7 @@ onPullDownRefresh(async () => {
}, 500); }, 500);
}); });
onLoad(() => { onShow(() => {
if(uni.getStorageSync('token')){ if(uni.getStorageSync('token')){
selectByUserIdAjax(); selectByUserIdAjax();
collectVideoSummaryAjax(); collectVideoSummaryAjax();

View File

@@ -12,11 +12,11 @@
<input v-model="data.userInfo.userName" align="right" placeholder="请输入用户名" /> <input v-model="data.userInfo.userName" align="right" placeholder="请输入用户名" />
</template> </template>
</up-cell> </up-cell>
<up-cell title="手机"> <!-- <up-cell title="手机">
<template #value> <template #value>
<input :disabled="data.userInfo.phone?true:false" v-model="data.userInfo.phone" align="right" placeholder="请输入联系电话" /> <input v-model="data.userInfo.phone" align="right" placeholder="请输入联系电话" />
</template> </template>
</up-cell> </up-cell> -->
</up-cell-group> </up-cell-group>
<view class="save" @click="save">保存</view> <view class="save" @click="save">保存</view>
</view> </view>
@@ -62,7 +62,8 @@
if (index === 0) { if (index === 0) {
// 用户点击了预览当前图片 // 用户点击了预览当前图片
// 可以自己实现当前头像链接的读取 // 可以自己实现当前头像链接的读取
let url = data.userInfo.avatar; console.log()
let url = data.userInfo.avatar||'../../static/default/avatar.png';
let arr = [] let arr = []
arr.push(url) arr.push(url)
uni.previewImage({ uni.previewImage({
@@ -108,20 +109,20 @@
}) })
return return
} }
if (!data.userInfo.phone) { // if (!data.userInfo.phone) {
uni.showToast({ // uni.showToast({
title: "手机号不能空", // title: "手机号不能空",
icon: "none" // icon: "none"
}) // })
return // return
} // }
if (checkPhone(data.userInfo.phone) == false) { // if (checkPhone(data.userInfo.phone) == false) {
uni.showToast({ // uni.showToast({
title: "手机号格式不正确", // title: "手机号格式不正确",
icon: "none" // icon: "none"
}) // })
return // return
} // }
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
@@ -132,7 +133,7 @@
let res = await updateUsers({ let res = await updateUsers({
userName: data.userInfo.userName, userName: data.userInfo.userName,
avatar: data.userInfo.avatar, avatar: data.userInfo.avatar,
phone: data.userInfo.phone, // phone: data.userInfo.phone,
}) })
uni.showToast({ uni.showToast({
title: '保存成功', title: '保存成功',
@@ -141,7 +142,7 @@
let userInfo = uni.getStorageSync('userInfo'); let userInfo = uni.getStorageSync('userInfo');
userInfo.userName = data.userInfo.userName userInfo.userName = data.userInfo.userName
userInfo.avatar = data.userInfo.avatar userInfo.avatar = data.userInfo.avatar
userInfo.phone = data.userInfo.phone // userInfo.phone = data.userInfo.phone
uni.setStorageSync('userInfo', userInfo); uni.setStorageSync('userInfo', userInfo);
setTimeout(function() { setTimeout(function() {
uni.navigateBack() uni.navigateBack()

View File

@@ -76,7 +76,8 @@
<up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title="data.rule_title" :title-style="{fontWeight:'700'}" @confirm="ruleConfirm" confirm-color="rgb(255, 117, 129)"> <up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title="data.rule_title" :title-style="{fontWeight:'700'}" @confirm="ruleConfirm" confirm-color="rgb(255, 117, 129)">
<view class="u-p-30 u-text-left"> <view class="u-p-30 u-text-left">
<scroll-view scroll-y="true" style="max-height: 50vh;" > <scroll-view scroll-y="true" style="max-height: 50vh;" >
<rich-text style="text-align: justify;font-size: 18px;color: #666;" :nodes="data.rule_content"></rich-text> <!-- <rich-text style="text-align: justify;font-size: 18px;color: #666;" :nodes="data.rule_content"></rich-text> -->
<view style="text-align: justify;font-size: 18px;color: #666;" v-html="data.rule_content"></view>
</scroll-view> </scroll-view>
</view> </view>
</up-modal> </up-modal>
@@ -100,7 +101,7 @@
import { commonType } from '@/api/init.js'; import { commonType } from '@/api/init.js';
import { linkTo } from '@/utils/app.js'; import { linkTo } from '@/utils/app.js';
let data = reactive({ const data = reactive({
ruleShow: false, ruleShow: false,
rule_title: "", rule_title: "",
rule_content: "", rule_content: "",
@@ -135,6 +136,7 @@
getCanCash() getCanCash()
announcement({type: 1}).then(res=>{ announcement({type: 1}).then(res=>{
data.ruleList = res data.ruleList = res
ruleInit() ruleInit()
}) })
@@ -163,6 +165,7 @@
getMoneyDetail(); getMoneyDetail();
}) })
function ruleInit(){ function ruleInit(){
data.rule_content = ""
data.rule_title = data.ruleList[data.ruleIndex].title data.rule_title = data.ruleList[data.ruleIndex].title
data.rule_content = data.ruleList[data.ruleIndex].content data.rule_content = data.ruleList[data.ruleIndex].content
} }
@@ -175,7 +178,7 @@
title: "暂未配置规则", title: "暂未配置规则",
icon: 'none' icon: 'none'
}) })
return return false;
} }
ruleInit() ruleInit()
data.ruleShow = true data.ruleShow = true
@@ -184,6 +187,7 @@
* 规则确认 * 规则确认
*/ */
function ruleConfirm() { function ruleConfirm() {
console.log(1)
data.ruleShow = false data.ruleShow = false
data.ruleIndex++ data.ruleIndex++
if( data.ruleIndex >= data.ruleList.length) { if( data.ruleIndex >= data.ruleList.length) {
@@ -301,7 +305,37 @@
* 全部提现赋值 * 全部提现赋值
*/ */
function setAllMoney() { function setAllMoney() {
data.money = data.mayMoney.toFixed(2) data.money = getMoneys(data.mayMoney)
}
/**
*
* 金额格式化
* money:金额
* 保留两位小数&不四舍五入
*/
function getMoneys (money) {
if (!money || isNaN(money)) return "0.00";
let num = parseFloat(money + '') + '';
num = parseInt(money * 100 + '') / 100 + ''
let reg = /(-?\d+)(\d{4})/;
while (reg.test(num)) {
num = num.replace(reg, "$1,$2");
}
let idx = num.indexOf('.')
if (idx === -1) {
num = num + '.00'
}
if (idx > 0) {
let num_per = num.substring(0, idx) + '.'
let num_next = num.substring(idx + 1).padEnd(2, '0')
num = num_per + num_next
}
return num;
} }
/** /**
@@ -338,7 +372,7 @@
*/ */
function getcashMoney() { function getcashMoney() {
selectUserMoney().then(res => { selectUserMoney().then(res => {
data.mayMoney = res.amount || 0 data.mayMoney = getMoneys(res.amount) || 0
}) })
} }

View File

@@ -55,7 +55,7 @@
moneyType : data.moneyType, moneyType : data.moneyType,
viewType: data.viewType, viewType: data.viewType,
}).then(res => { }).then(res => {
data.totalCount = res.total; data.totalCount = res.totalCount;
if ( res.records.length > 0) { if ( res.records.length > 0) {
data.list = [...data.list,...res.records]; data.list = [...data.list,...res.records];
} }

View File

@@ -1,16 +1,20 @@
<template> <template>
<view class="containerView"> <view class="containerView">
<up-cell-group label-width="80" :border="false"> <up-cell-group label-width="80" :border="false">
<up-cell :label-style="{ width: '100rpx' }" title="姓名"> <up-cell>
<template #title> <view style="width: 90px;">姓名</view></template>
<template #right-icon> <up-input border="none" v-model="data.certName" placeholder="请输入姓名"></up-input> </template> <template #right-icon> <up-input border="none" v-model="data.certName" placeholder="请输入姓名"></up-input> </template>
</up-cell> </up-cell>
<up-cell title="身份证号码"> <up-cell>
<template #title> <view style="width: 90px;">身份证号码</view></template>
<template #right-icon> <up-input border="none" v-model="data.certNum" placeholder="请输入身份证号码"></up-input> </template> <template #right-icon> <up-input border="none" v-model="data.certNum" placeholder="请输入身份证号码"></up-input> </template>
</up-cell> </up-cell>
<up-cell title="银行卡号码"> <up-cell>
<template #title> <view style="width: 90px;">银行卡号码</view></template>
<template #right-icon> <up-input border="none" v-model="data.accountNo" placeholder="请输入银行卡号码"></up-input> </template> <template #right-icon> <up-input border="none" v-model="data.accountNo" placeholder="请输入银行卡号码"></up-input> </template>
</up-cell> </up-cell>
<up-cell title="手机号"> <up-cell>
<template #title> <view style="width: 90px;">手机号</view></template>
<template #right-icon> <up-input border="none" v-model="data.mobile" placeholder="请输入银行预留号码"></up-input> </template> <template #right-icon> <up-input border="none" v-model="data.mobile" placeholder="请输入银行预留号码"></up-input> </template>
</up-cell> </up-cell>
</up-cell-group> </up-cell-group>
@@ -125,7 +129,9 @@
page { page {
background: #FFFFFF; background: #FFFFFF;
} }
.u-cell__body__content{
flex: 0!important;
}
.containerView { .containerView {
padding:30rpx; padding:30rpx;
position: relative; position: relative;

View File

@@ -1,6 +1,5 @@
<template> <template>
<view style="background-color: #F3F4F8;"> <view class="container">
<view class="task_bg u-absolute"> <view class="task_bg u-absolute">
<image class="task_bg" src="@/static/task/task_bg.png"></image> <image class="task_bg" src="@/static/task/task_bg.png"></image>
</view> </view>
@@ -50,7 +49,8 @@
<view v-else class="btn u-font-24 text-bold disabled"> <view v-else class="btn u-font-24 text-bold disabled">
{{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}`) }} {{ item.type == 1 ? item.buttonTitle : item.number ? `${item.discNumber}/${item.number}` : ( item.discNumber <= 0 ? item.buttonTitle : `剩余${item.discNumber}`) }}
</view> </view>
<view v-if=" item.buttonUnderContent && item.buttonUnderUrl " class="u-font-22 tip" style="text-align: center;" <view v-if=" item.buttonUnderContent && item.buttonUnderUrl " class="u-font-22 tip"
style="text-align: center;"
@click="goNav({id: item.id,buttonUrl: item.buttonUnderUrl, jumpType: 1,title: item.title, disabled: item.disabled, discNumber: item.discNumber})"> @click="goNav({id: item.id,buttonUrl: item.buttonUnderUrl, jumpType: 1,title: item.title, disabled: item.disabled, discNumber: item.discNumber})">
{{ item.buttonUnderContent}} {{ item.buttonUnderContent}}
</view> </view>
@@ -226,7 +226,12 @@
}) })
onReady(() => { onReady(() => {
nextTick(() => { nextTick(() => {
datas.urlCallback = {
userId: uni.getStorageSync('userInfo').userId,
extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
}
datas.adRewardedVideoloadNum = 0 datas.adRewardedVideoloadNum = 0
adRewarded.value.load(); adRewarded.value.load();
}) })
}) })
@@ -250,6 +255,10 @@
} }
datas.adRewardedVideoloadNum++ datas.adRewardedVideoloadNum++
setTimeout(() => { setTimeout(() => {
datas.urlCallback = {
userId: uni.getStorageSync('userInfo').userId,
extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
}
adRewarded.value.load(); adRewarded.value.load();
}, 1000); // 10 }, 1000); // 10
console.log("广告加载失败") console.log("广告加载失败")
@@ -274,6 +283,10 @@
let res = await state({ let res = await state({
extraKey: datas.urlCallback.extra extraKey: datas.urlCallback.extra
}) })
datas.urlCallback = {
userId: uni.getStorageSync('userInfo').userId,
extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
}
uni.showToast({ uni.showToast({
title: '获得' + $common.freeDuration + '分钟免费时长', title: '获得' + $common.freeDuration + '分钟免费时长',
icon: 'none' icon: 'none'
@@ -283,6 +296,7 @@
} }
} }
async function goNav(item, url) { async function goNav(item, url) {
console.log(item, url, '调试111')
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 , // jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 , // type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
if (url) { if (url) {
@@ -345,10 +359,8 @@
}); });
return return
} }
datas.urlCallback = {
userId: uni.getStorageSync('userId'), console.log(datas.urlCallback)
extra: uni.getStorageSync('userId') + "" + new Date().getTime(),
}
adRewarded.value.show(); adRewarded.value.show();
} else { } else {
uni.switchTab({ uni.switchTab({
@@ -360,42 +372,38 @@
if (item.title && item.title.indexOf('每周打卡奖励') != -1) { if (item.title && item.title.indexOf('每周打卡奖励') != -1) {
buttonUrl = item.buttonUrl + '?source=2' buttonUrl = item.buttonUrl + '?source=2'
uni.navigateTo({
url: buttonUrl
})
} }
if (item.title && item.title.indexOf('每月打卡奖励1') != -1) { if (item.title && item.title.indexOf('每月打卡奖励1') != -1) {
buttonUrl = item.buttonUrl + '?source=3' buttonUrl = item.buttonUrl + '?source=3'
uni.navigateTo({
url: buttonUrl
})
} }
if (item.title && item.title.indexOf('每月打卡奖励2') != -1) { if (item.title && item.title.indexOf('每月打卡奖励2') != -1) {
let res = await taskReceive({ // let res = await taskReceive({
id: item.id // id: item.id
}) // })
if (res.code == 0) { // if (res.code == 0) {
uni.showToast({ // uni.showToast({
title: res.id == 15 ? '签到成功' : '领取成功', // title: res.id == 15 ? '签到成功' : '领取成功',
icon: 'none' // icon: 'none'
}) // })
setTimeout(() => { // setTimeout(() => {
getTaskdata() // getTaskdata()
getsignIn() // getsignIn()
}, 1000) // }, 1000)
} else { // } else {
uni.showToast({ // uni.showToast({
title: res.msg, // title: res.msg,
icon: 'none' // icon: 'none'
}) // })
} // }
// buttonUrl = buttonUrl =
// `${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}` `${item.buttonUrl}?standard=${item.discNumber == null ? true : false}&taskId=${item.id}`
} }
uni.navigateTo({
url: buttonUrl
})
} else if (item.jumpType == 3) { } else if (item.jumpType == 3) {
uni.switchTab({ uni.switchTab({
@@ -436,6 +444,19 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
page{
// min-height: 100vh;
}
.container{
/* #ifdef H5 */
min-height: calc(100vh - 96rpx);
/* #endif */
/* #ifndef H5 */
min-height: 100vh;
/* #endif */
background-color: #F3F4F8;
padding-top: 2rpx;
}
.u-absolute { .u-absolute {
position: absolute; position: absolute;
} }
@@ -446,8 +467,8 @@
} }
.icon { .icon {
position: relative; position: absolute;
padding: 32rpx; padding: 122rpx 32rpx 32rpx 32rpx;
.icon_title { .icon_title {
color: #000000; color: #000000;
@@ -475,13 +496,13 @@
.contentTop { .contentTop {
border-radius: 16rpx; border-radius: 16rpx;
top: -115rpx; // top: -115rpx;
padding: 20rpx; padding: 20rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
position: relative; position: relative;
background-color: #ffffff; background-color: #ffffff;
color: #666666; color: #666666;
margin: 32rpx; margin: 282rpx 32rpx 32rpx 32rpx;
>view:first-child { >view:first-child {
>image { >image {
@@ -538,7 +559,7 @@
.content { .content {
border-radius: 16rpx; border-radius: 16rpx;
top: -115rpx; // top: -115rpx;
padding: 28rpx; padding: 28rpx;
background-color: #ffffff; background-color: #ffffff;
color: #666666; color: #666666;
@@ -546,9 +567,8 @@
margin-right: 32rpx; margin-right: 32rpx;
position: relative; position: relative;
border-radius: 16rpx; border-radius: 16rpx;
top: -115rpx;
padding: 28rpx; padding: 28rpx;
margin-bottom: 32rpx;
.cell { .cell {
padding: 32rpx 0; padding: 32rpx 0;
border-bottom: 2rpx solid #EBEBEB; border-bottom: 2rpx solid #EBEBEB;

View File

@@ -57,10 +57,11 @@
getCurrentInstance getCurrentInstance
} from 'vue' } from 'vue'
import { import {
onLoad onLoad,onShow
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
import { import {
selectTaskCenterUserReward selectTaskCenterUserReward,
receiveGoods
} from '@/api/task/index.js' } from '@/api/task/index.js'
let datas = reactive({ let datas = reactive({
list: [], list: [],
@@ -82,6 +83,8 @@
if (options.taskId) { if (options.taskId) {
datas.taskId = options.taskId datas.taskId = options.taskId
} }
})
onShow(()=>{
getList() getList()
}) })
// 去兑换 // 去兑换

View File

@@ -98,7 +98,6 @@
} }
onLoad((opt) => { onLoad((opt) => {
Object.assign(options, opt) Object.assign(options, opt)
console.log(options);
init() init()
}) })

View File

@@ -67,23 +67,39 @@ export const useCommonStore = defineStore("common", {
} }
}, },
setversion(a, b) { setversion(a, b) {
// a是當前應用的版本號 b是接口拿的 return new Promise(async (resolve, reject) => {
let appversion = (a.split('.').join('')) * 1 this.isExamines = await this.compare(a, b)
let resversion = (b.split('.').join('')) * 1 console.log('判斷值-' + this.isExamines)
console.log('當前版本-' + appversion, '接口版本-' + resversion, '返回-' + this.isIosExamine,'判斷值-'+this.isExamines) resolve(this.isExamines)
if (appversion > resversion) { })
// 再審核 },
this.isExamines = 1 // 判断版本号
compare(version1, version2) {
let arr1 = version1.split(".");
let arr2 = version2.split(".");
let length = Math.max(arr1.length, arr2.length);
for (let i = 0; i < length; i++) {
const n1 = Number(arr1[i] || 0)
const n2 = Number(arr2[i] || 0)
// version1 > version2 返回1如果 version1 < version2 返回-1不然返回0
// 当前版 n1 接口版本是 n2
// 1小于2 更新弹窗、抽奖等显示
if (n1 < n2) return 1
// 1大于2 更新弹窗、抽奖不显示
if (n1 > n2) return -1
} }
// APP等于2 更新弹窗不显示‘抽奖显示
return 0
} }
}, },
getters: { getters: {
isIosExamine: function() { isIosExamine: function() {
console.log(this.isExamines)
if (!this.isIos) { if (!this.isIos) {
return true return true
} }
if (this.isExamines == 1) { if (this.isExamines == -1) {
return false return false
} }
return true return true

11
vue.config.js Normal file
View File

@@ -0,0 +1,11 @@
module.exports = {
productionSourceMap: false, // 生产打包时不输出map文件增加打包速度
configureWebpack: config => {
if (process.env.NODE_ENV === 'production') {
config.optimization.minimizer[0].options.terserOptions.compress.warnings = false
config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true
config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log']
}
}
}