This commit is contained in:
wwz
2024-12-24 10:59:23 +08:00
12 changed files with 1127 additions and 239 deletions

View File

@@ -26,6 +26,17 @@ module.exports = {
}, },
logout: function() { logout: function() {
let that = this; let that = this;
// 获取当前页面实例
const pages = getCurrentPages();
// 获取当前页面的实例
const currentPage = pages[pages.length - 1];
// 获取页面路径
const pagePath = currentPage.route
const systemInfo = uni.getSystemInfoSync();
const isIOS = /iOS/.test(systemInfo.platform);
if ( pagePath == "pages/task/index") {
return;
}
uni.removeStorageSync("token") uni.removeStorageSync("token")
uni.removeStorageSync("userId") uni.removeStorageSync("userId")
uni.removeStorageSync("phone") uni.removeStorageSync("phone")

View File

@@ -177,8 +177,9 @@
}, },
toGift() { toGift() {
console.log('1'); console.log('1');
uni.navigateTo({ uni.navigateTo({
url: '/me/gift/gift' url: '/me/gift/gift?source='+this.source
}) })
}, },
// 重新生成 // 重新生成

View File

@@ -520,7 +520,6 @@
this.wHeight = sysInfo.screenHeight this.wHeight = sysInfo.screenHeight
this.boxStyle.height = this.wHeight + 5; this.boxStyle.height = this.wHeight + 5;
// 记录跳转过来的视频总id跟单集id // 记录跳转过来的视频总id跟单集id
console.log(e)
if (e.id) { if (e.id) {
this.courseId = e.id; this.courseId = e.id;
if (e.courseDetailsId && e.courseDetailsId != 'null') { if (e.courseDetailsId && e.courseDetailsId != 'null') {
@@ -595,6 +594,7 @@
}, },
appear(e, index) { appear(e, index) {
this.courseDetailsId = e;
// 清除已经设置的定时器 // 清除已经设置的定时器
clearTimeout(this.appearTimeout); clearTimeout(this.appearTimeout);
@@ -1056,6 +1056,12 @@
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney) // this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else { } else {
if ( res.status && res.status == 1) {
this.showPay = false //关闭购买选择弹窗
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,
true);
return;
}
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'

View File

@@ -1322,6 +1322,12 @@
} }
} else { } else {
if ( res.status && res.status == 1) {
this.showPay = false //关闭购买选择弹窗
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,
true);
return;
}
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'

View File

@@ -2,11 +2,20 @@
<view class="min-page bg-gray u-font-28"> <view class="min-page bg-gray u-font-28">
<view class="block bg-fff border-r-18 default-box-padding"> <view class="block bg-fff border-r-18 default-box-padding">
<view> <view>
<view>兑换账</view> <view>中奖用户手机</view>
<view class="border u-m-t-24 u-p-l-24" style="margin-bottom: 20rpx;">
<u-input v-model="query.phone" type="number" maxlength="11" placeholder="请输入中奖用户手机号"></u-input>
</view>
<view>收货地址</view>
<view class="border u-m-t-24 u-p-l-24" style="margin-bottom: 20rpx;">
<u-input v-model="query.address" type="text" placeholder="请输入收货地址"></u-input>
</view>
<view>备注</view>
<view class="border u-m-t-24 u-p-l-24"> <view class="border u-m-t-24 u-p-l-24">
<u-input type="text" placeholder="请输入兑换账号"></u-input> <u-input v-model="query.remark" type="text" placeholder="请输入备注"></u-input>
</view> </view>
</view> </view>
<view class="u-m-t-48"> <view class="u-m-t-48">
<view>兑换事项</view> <view>兑换事项</view>
<view class="u-m-t-16 color-999"> <view class="u-m-t-16 color-999">
@@ -15,7 +24,7 @@
</view> </view>
</view> </view>
<view class="u-flex u-row-center"> <view class="u-flex u-row-center">
<view class="btn-circle duihuan">确认兑换</view> <view class="btn-circle duihuan" @click="exchange">确认兑换</view>
</view> </view>
</view> </view>
</template> </template>
@@ -24,11 +33,44 @@
export default { export default {
data() { data() {
return { return {
query: {
discSpinningRecordId: null,
source: 1,
phone: "",
address: "",
remark: "",
},
} }
}, },
onLoad(options) {
console.log(options)
if ( options.id ) {
this.query.discSpinningRecordId = options.id
}
if ( options.source ) {
this.query.source = options.source
}
},
methods: { methods: {
exchange(){
let url = ""
if ( !this.query.phone ) {
uni.showToast({ title: '请输入中奖用户手机号', icon: 'none' });
return;
}
if ( !this.query.address ) {
uni.showToast({ title: '请输入中奖用户地址', icon: 'none' });
return;
}
this.$Request.postJson("app/userPrizeExchange/exchange", this.query).then(res => {
if (res.code == 0 ) {
uni.navigateBack()
} else {
uni.showToast({ title: res.msg, icon: 'none' });
}
})
},
} }
} }
</script> </script>

View File

@@ -4,6 +4,13 @@
<view class="gift-bg"> <view class="gift-bg">
</view> </view>
<view class="list"> <view class="list">
<view class="tab">
<view class="tab_item"
:class="{active: item.type == tabIndex}"
@click="tabClick(item)"
v-for="(item,index) in tab" :key="index"
>{{item.label}}</view>
</view>
<view class="item" v-for="(item,index) in list" :key="index"> <view class="item" v-for="(item,index) in list" :key="index">
<view class="color-666 u-font-24">中奖时间 2024-09-11 10:20:11</view> <view class="color-666 u-font-24">中奖时间 2024-09-11 10:20:11</view>
<view class="u-m-t-24 u-flex u-row-between"> <view class="u-m-t-24 u-flex u-row-between">
@@ -15,13 +22,13 @@
</view> </view>
</view> </view>
<view class=""> <view class="">
<view class="btn-circle duihuan" @click="toDuiHuan">立即兑换</view> <view class="btn-circle duihuan" @click="toDuiHuan(item)">立即兑换</view>
<!-- <view class="btn-circle duihuan finish">已完成</view> --> <!-- <view class="btn-circle duihuan finish">已完成</view> -->
</view> </view>
</view> </view>
</view> </view>
<view class="u-p-t-30 u-p-b-30 empty" v-if="hasAjax&&!list.length"> <view class="u-p-t-30 u-p-b-30 empty" v-if="hasAjax&&!list.length">
<u-empty text="暂无奖品" src="/static/icon-empty.svg"></u-empty> <u-empty text="暂无记录" src="/static/icon-empty.svg"></u-empty>
</view> </view>
</view> </view>
<!-- <view class="u-p-30"> <!-- <view class="u-p-30">
@@ -37,29 +44,69 @@
background: { background: {
backgroundColor: 'transparent' backgroundColor: 'transparent'
}, },
tab: [{label: '抽奖记录', type: 1},{label: '兑换记录', type: 2}],
tabIndex: 1,
query: {
page: 10,
limit: 1,
source: 1,
},
total: 0,
status: 'nomore', status: 'nomore',
hasAjax:true, hasAjax:true,
list:[] list:[]
} }
}, },
methods: { onLoad(options) {
toDuiHuan(){ if ( options.source ) {
uni.navigateTo({ this.query.source = options.source
url:'/me/gift/duihuan'
})
},
init(){
this.$Request.getT('app/discSpinningRecord/selectDiscSpinningRecord')
} }
}, },
onShow() { onShow() {
console.log('onShow'); this.getList()
this.init() },
methods: {
toDuiHuan(item){
uni.navigateTo({
url:`/me/gift/duihuan?source=${this.query.source}&id=${item.id}`
})
},
tabClick(item){
this.list = [];
this.tabIndex = item.type;
this.getList()
},
getList(){
let url = ""
if ( this.tabIndex == 1) {
url = "app/discSpinningRecord/selectDiscSpinningRecord"
} else {
url = "/app/userPrizeExchange/page"
}
this.$Request.getT(url, this.query).then(res => {
if (res.code == 0 ) {
if ( this.tabIndex == 1) {
this.list = res.data.records
this.total = res.data.total
} else {
this.list = res.page.list
this.total = res.page.totalCount
}
}
})
},
onReachBottom: function () {
if (this.page * this.limit < this.total) {
this.page = this.page + 1;
this.getList();
}
},
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.duihuan { .duihuan {
background: linear-gradient(87deg, #ED8087 0%, #ECA2AA 100%); background: linear-gradient(87deg, #ED8087 0%, #ECA2AA 100%);
font-size: 24rpx; font-size: 24rpx;
@@ -106,10 +153,23 @@
border-radius: 18rpx 18rpx 18rpx 18rpx; border-radius: 18rpx 18rpx 18rpx 18rpx;
overflow: hidden; overflow: hidden;
background-color: #fff; background-color: #fff;
padding: 0 24rpx; .tab{
display: flex;
.tab_item{
height: 80rpx;
line-height: 80rpx;
width: 50%;
text-align: center;
font-size: 32rpx;
color: #333;
}
.tab_item.active{
background-color: #ECA2AA;
color: #fff;
}
}
.item { .item {
padding: 32rpx 0; padding: 32rpx 24rpx;
border-bottom: 1rpx solid #E5E5E5; border-bottom: 1rpx solid #E5E5E5;
} }
} }

854
pages-ios.json Normal file
View File

@@ -0,0 +1,854 @@
{
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue",
"^tn-(.*)": "@/tuniao-ui/components/tn-$1/tn-$1.vue"
},
"pages": [ //pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/task/index",
"style": {
"navigationBarTitleText": "任务",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "斯耀短剧",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},
{
"path": "pages/task/prizeList",
"style": {
"navigationBarTitleText": "任务",
"navigationStyle": "custom"
}
},
{
"path": "pages/task/receiveMember",
"style": {
"navigationBarTitleText": "任务",
"navigationStyle": "custom"
}
},
{
"path": "pages/me/erweimaRegister",
"style": {
"navigationBarTitleText": "短剧",
"navigationStyle": "custom", // 隐藏系统导航栏
"navigationBarTextStyle": "white", // 状态栏字体为白色,只能为 white-白色black-黑色 二选一
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "pages/index/search/index",
"style": {
"navigationBarTitleText": "搜索",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/course/courseList",
"style": {
"navigationBarTitleText": "资源列表",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/index/course/orderDet",
"style": {
"navigationBarTitleText": "确认订单",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/index/webView",
"style": {
"navigationBarTitleText": "网页",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/learn/index",
"style": {
"navigationBarTitleText": "学习",
"enablePullDownRefresh": true,
"app-plus": {
"titleNView": false, //禁用原生导航栏
"bounce": "none",
"scrollIndicator": "none"
}
}
},
{
"path": "pages/me/index",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
"path": "pages/me/userinfo",
"style": {
"navigationBarTitleText": "个人资料",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "pages/me/vip/index",
"style": {
"navigationBarTitleText": "会员中心",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "登录",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "pages/login/registerApp",
"style": {
"navigationBarTitleText": "注册",
"navigationBarBackgroundColor": "#f1a48a",
"h5": {
"titleNView": {
"backgroundColor": "#f1a48a"
}
}
// #ifdef H5
,
"navigationStyle": "custom"
// #endif
}
},
{
"path": "pages/login/loginPhone",
"style": {
"navigationBarTitleText": "登录",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
}, {
"path": "pages/login/bind",
"style": {
"navigationBarTitleText": "绑定手机号",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "pages/login/register",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#f1a48a",
"h5": {
"titleNView": {
"backgroundColor": "#f1a48a"
}
}
// #ifdef H5
,
"navigationStyle": "custom"
// #endif
}
},
{
"path": "pages/login/forgetPwd",
"style": {
"navigationBarTitleText": "重置密码",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
}, {
"path": "pages/chasingDrama/chasingDrama",
"style": {
"navigationBarTitleText": "追剧",
"enablePullDownRefresh": false
// #ifdef H5
,
"navigationStyle": "custom"
// #endif
}
}, {
"path": "pages/video/video",
"style": {
"navigationBarTitleText": "推荐",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#000"
// #ifndef MP-TOUTIAO
,
"navigationStyle": "custom"
// #endif
// #ifdef MP-TOUTIAO
,
"usingComponents": {
"video-player": "ext://industry/video-player"
}
// #endif
}
},
{
"path": "pages/login/appEq",
"style": {
"navigationBarTitleText": "注册成功",
"enablePullDownRefresh": false
// #ifdef H5
,
"navigationStyle": "custom"
// #endif
}
}, {
"path": "pages/login/iosmobile",
"style": {
"navigationBarTitleText": "手机号绑定"
}
},
{
"path": "pages/login/wxmobile",
"style": {
"navigationBarTitleText": "手机号绑定"
}
},
{
"path": "pages/login/phonebind",
"style": {
"navigationBarTitleText": "手机号绑定"
}
},
{
"path": "pages/pays/pays",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/first/first",
"style": {
"navigationBarTitleText": "开屏广告",
"navigationStyle": "custom"
}
}
],
"subPackages": [{
"root": "me",
"pages": [{
"path": "feedback/index",
"style": {
"navigationBarTitleText": "意见反馈",
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "balance/index",
"style": {
"navigationBarTitleText": "我的余额"
}
}, {
"path": "feedbackIndex/feedbackIndex",
"style": {
"navigationBarTitleText": "帮助中心",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "helpDetail/helpDetail",
"style": {
"navigationBarTitleText": "帮助详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "message/index",
"style": {
"navigationBarTitleText": "消息中心"
}
},
{
"path": "course/index",
"style": {
"navigationBarTitleText": "我的课程",
"enablePullDownRefresh": true,
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "invite/index",
"style": {
"navigationBarTitleText": "分享好友",
"navigationStyle": "custom",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "invite/inviteDet",
"style": {
"navigationBarTitleText": "我的团队",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "invite/cashDetail",
"style": {
"navigationBarTitleText": "申请提现",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "invite/zhifubao",
"style": {
"navigationBarTitleText": "提现账号",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "invite/cashList",
"style": {
"navigationBarTitleText": "提现记录",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "invite/moneyList",
"style": {
"navigationBarTitleText": "红包明细",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "integral/index",
"style": {
"navigationBarTitleText": "我的积分",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "collect/index",
"style": {
"navigationBarTitleText": "我的收藏",
"enablePullDownRefresh": true,
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "setting/index",
"style": {
"navigationBarTitleText": "设置",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
}, {
"path": "setting/kefu",
"style": {
"navigationBarTitleText": "客服",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "integral/inviteDet",
"style": {
"navigationBarTitleText": "我的钱包",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "setting/xieyi",
"style": {
"navigationBarTitleText": "用户协议",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "setting/mimi",
"style": {
"navigationBarTitleText": "隐私协议",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "setting/bind",
"style": {
"navigationBarTitleText": "换绑手机号",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
}, {
"path": "detail/detail",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#000000",
"style": {
"safeAreaInsetBottom": "none"
},
"app-plus": {
// "subNVues": [{
// "id": "pay", // 唯一标识
// "path": "detail/subNvue/pay", // 页面路径
// // "type": "popup",
// "style": {
// "position": "popup",
// "dock": "bottom",
// "width": "750rpx",
// "height": "150rpx",
// "background": "#fff"
// }
// }],
"bounce": "none",
"safearea": {
"bottom": {
"offset": "none"
}
}
}
// #ifndef MP-TOUTIAO
,
"navigationStyle": "custom"
// #endif
// #ifdef MP-TOUTIAO
,
"usingComponents": {
"video-player": "ext://industry/video-player"
}
// #endif
}
}, {
"path": "detail/detailIOS",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#000000",
"style": {
"safeAreaInsetBottom": "none"
},
"app-plus": {
// "subNVues": [{
// "id": "pay", // 唯一标识
// "path": "detail/subNvue/pay", // 页面路径
// // "type": "popup",
// "style": {
// "position": "popup",
// "dock": "bottom",
// "width": "750rpx",
// "height": "150rpx",
// "background": "#fff"
// }
// }],
"bounce": "none",
"safearea": {
"bottom": {
"offset": "none"
}
}
}
// #ifndef MP-TOUTIAO
,
"navigationStyle": "custom"
// #endif
// #ifdef MP-TOUTIAO
,
"usingComponents": {
"video-player": "ext://industry/video-player"
}
// #endif
}
}, {
"path": "wallet/wallet",
"style": {
"navigationBarTitleText": "金币充值",
"enablePullDownRefresh": false
}
}, {
"path": "wallet/wallet_detail",
"style": {
"navigationBarTitleText": "金币明细",
"enablePullDownRefresh": true
}
}, {
"path": "jilu/record",
"style": {
"navigationBarTitleText": "最近观看",
"enablePullDownRefresh": true
}
}, {
"path": "jilu/histor",
"style": {
"navigationBarTitleText": "追剧记录",
"enablePullDownRefresh": true
}
}, {
"path": "jifen/jifen",
"style": {
"navigationBarTitleText": "我的积分",
"enablePullDownRefresh": false
}
}, {
"path": "jifen/duihuan",
"style": {
"navigationBarTitleText": "积分兑换",
"enablePullDownRefresh": false
}
}, {
"path": "jilu/myLove",
"style": {
"navigationBarTitleText": "我的喜欢",
"enablePullDownRefresh": true
}
}, {
"path": "payOrder/payOrder",
"style": {
"navigationBarTitleText": "下单",
"enablePullDownRefresh": false
}
}, {
"path": "setting/logOff",
"style": {
"navigationBarTitleText": "注销账号",
"enablePullDownRefresh": false
}
}, {
"path": "setting/offXieyi",
"style": {
"navigationBarTitleText": "用户注销协议",
"enablePullDownRefresh": false
}
}, {
"path": "juqing/juqing",
"style": {
"navigationBarTitleText": "剧情介绍",
"enablePullDownRefresh": true
}
}, {
"path": "wallpaper/wallpaper",
"style": {
"navigationBarTitleText": "壁纸",
"enablePullDownRefresh": true
}
},
{
"path": "assistance/assistance",
"style": {
"navigationBarTitleText": "助力领会员",
"navigationBarBackgroundColor": "#F22947",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
// #ifdef H5
,
"navigationStyle": "custom"
// #endif
}
},
{
"path": "setting/payXieYi",
"style": {
"navigationBarTitleText": "付费须知说明",
"enablePullDownRefresh": false
}
},
{
"path": "wallet/wallets",
"style": {
"navigationBarTitleText": "充值",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "choujiang/choujiang",
"style": {
"navigationBarTitleText": "抽奖",
"navigationStyle": "custom"
}
},
{
"path": "gift/gift",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "奖品列表"
}
},
{
"path": "gift/duihuan",
"style": {
"navigationBarTitleText": "兑换礼品"
}
}
]
},
{
"root": "pay",
"pages": [{
"path": "success",
"style": {
"navigationBarTitleText": "支付成功"
}
}
]
},
{
"root": "other",
"pages": [{
"path": "index/index",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "更多"
}
},
{
"path": "about/about",
"style": {
"navigationBarTitleText": "关于我们"
}
},
{
"path": "coup/coup",
"style": {
"navigationBarTitleText": "卡包"
}
},
{
"path": "address/address",
"style": {
"navigationBarTitleText": "收货地址"
}
},
{
"path": "pay/pay",
"style": {
"navigationBarTitleText": "发红包"
}
},
{
"path": "slotMachine/slotMachine",
"style": {
"navigationBarTitleText": "抽奖",
"navigationStyle": "custom"
}
},
{
"path" : "blogger/blogger",
"style" :
{
"navigationBarTitleText" : "",
"navigationStyle": "custom"
}
},
{
"path" : "blogger/details",
"style" :
{
"navigationBarTitleText" : "",
"navigationStyle": "custom"
}
},
{
"path" : "topic/topic",
"style" :
{
"navigationBarTitleText" : "话题"
}
},
{
"path" : "topic/reserve",
"style" :
{
"navigationBarTitleText" : "",
"navigationStyle": "custom"
}
},
{
"path" : "tools/tools",
"style" :
{
"navigationBarTitleText" : "",
"navigationStyle": "custom"
}
}
]
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "短剧",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#333333",
"selectedColor": "#FF7581",
"backgroundColor": "#FFFFFF",
"borderStyle": "black",
"list": [
{
"pagePath": "pages/task/index",
"iconPath": "static/tabbar/task@2x.png",
"selectedIconPath": "static/tabbar/task_@2x.png",
"text": "任务"
},
{
"pagePath": "pages/video/video",
"iconPath": "static/tabbar/index@2x.png",
"selectedIconPath": "static/tabbar/index_@2x.png",
"text": "刷剧"
}
// ,
// {
// "pagePath": "pages/index/index",
// "iconPath": "static/tabbar/index@2x.png",
// "selectedIconPath": "static/tabbar/index_@2x.png",
// "text": "刷剧"
// }
// {
// "pagePath": "pages/video/video",
// "iconPath": "static/tabbar/learn@2x.png",
// "selectedIconPath": "static/tabbar/learn_@2x.png",
// "text": "推荐"
// },
// {
// "pagePath": "pages/chasingDrama/chasingDrama",
// "iconPath": "static/tabbar/zhuiju.png",
// "selectedIconPath": "static/tabbar/zhuiju_.png",
// "text": "追剧"
// },
// {
// "pagePath": "pages/me/index",
// "iconPath": "static/tabbar/me@2x.png",
// "selectedIconPath": "static/tabbar/me_@2x.png",
// "text": "我的"
// }
]
},
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [{
"name": "", //模式名称
"path": "", //启动页面,必选
"query": "" //启动参数在页面的onLoad函数里面得到
}]
}
}

View File

@@ -4,15 +4,6 @@
"^tn-(.*)": "@/tuniao-ui/components/tn-$1/tn-$1.vue" "^tn-(.*)": "@/tuniao-ui/components/tn-$1/tn-$1.vue"
}, },
"pages": [ //pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/task/index",
"style": {
"navigationBarTitleText": "任务",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
@@ -21,13 +12,21 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/task/index",
"style": {
"navigationBarTitleText": "任务",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},
{ {
"path": "pages/task/prizeList", "path": "pages/task/prizeList",
"style": { "style": {
"navigationBarTitleText": "任务", "navigationBarTitleText": "任务",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
@@ -35,7 +34,7 @@
"style": { "style": {
"navigationBarTitleText": "任务", "navigationBarTitleText": "任务",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
@@ -746,41 +745,36 @@
} }
}, },
{ {
"path" : "blogger/blogger", "path": "blogger/blogger",
"style" : "style": {
{ "navigationBarTitleText": "",
"navigationBarTitleText" : "",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path" : "blogger/details", "path": "blogger/details",
"style" : "style": {
{ "navigationBarTitleText": "",
"navigationBarTitleText" : "",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path" : "topic/topic", "path": "topic/topic",
"style" : "style": {
{ "navigationBarTitleText": "话题"
"navigationBarTitleText" : "话题"
} }
}, },
{ {
"path" : "topic/reserve", "path": "topic/reserve",
"style" : "style": {
{ "navigationBarTitleText": "",
"navigationBarTitleText" : "",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path" : "tools/tools", "path": "tools/tools",
"style" : "style": {
{ "navigationBarTitleText": "",
"navigationBarTitleText" : "",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} }
@@ -802,7 +796,18 @@
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"borderStyle": "black", "borderStyle": "black",
"list": [ "list": [{
"pagePath": "pages/index/index",
"iconPath": "static/tabbar/index@2x.png",
"selectedIconPath": "static/tabbar/index_@2x.png",
"text": "小剧场"
},
{
"pagePath": "pages/video/video",
"iconPath": "static/tabbar/learn@2x.png",
"selectedIconPath": "static/tabbar/learn_@2x.png",
"text": "推荐"
},
{ {
"pagePath": "pages/task/index", "pagePath": "pages/task/index",
"iconPath": "static/tabbar/task@2x.png", "iconPath": "static/tabbar/task@2x.png",
@@ -810,30 +815,17 @@
"text": "任务" "text": "任务"
}, },
{ {
"pagePath": "pages/index/index", "pagePath": "pages/chasingDrama/chasingDrama",
"iconPath": "static/tabbar/index@2x.png", "iconPath": "static/tabbar/zhuiju.png",
"selectedIconPath": "static/tabbar/index_@2x.png", "selectedIconPath": "static/tabbar/zhuiju_.png",
"text": "剧" "text": "剧"
},
{
"pagePath": "pages/me/index",
"iconPath": "static/tabbar/me@2x.png",
"selectedIconPath": "static/tabbar/me_@2x.png",
"text": "我的"
} }
// {
// "pagePath": "pages/video/video",
// "iconPath": "static/tabbar/learn@2x.png",
// "selectedIconPath": "static/tabbar/learn_@2x.png",
// "text": "推荐"
// },
// {
// "pagePath": "pages/chasingDrama/chasingDrama",
// "iconPath": "static/tabbar/zhuiju.png",
// "selectedIconPath": "static/tabbar/zhuiju_.png",
// "text": "追剧"
// },
// {
// "pagePath": "pages/me/index",
// "iconPath": "static/tabbar/me@2x.png",
// "selectedIconPath": "static/tabbar/me_@2x.png",
// "text": "我的"
// }
] ]
}, },
"condition": { //模式配置,仅开发期间生效 "condition": { //模式配置,仅开发期间生效

View File

@@ -1,6 +1,6 @@
<template> <template>
<view style="padding-bottom: 40rpx;"> <view style="padding-bottom: 40rpx;">
<u-navbar :background="background" :is-back="false" :title="title" :border-bottom="false"> <u-navbar :background="background" :is-back="isBack" :title="title" :border-bottom="false">
</u-navbar> </u-navbar>
<!-- 登录信息 --> <!-- 登录信息 -->
<view class="info flex align-center justify-center"> <view class="info flex align-center justify-center">
@@ -270,6 +270,7 @@
data() { data() {
return { return {
title: '', title: '',
isBack: false,
background: { background: {
backgroundImage: 'linear-gradient(to right, #FFE5EA 0%, #E4F5FB 49%, #FFF0EE 100%)' backgroundImage: 'linear-gradient(to right, #FFE5EA 0%, #E4F5FB 49%, #FFF0EE 100%)'
}, },
@@ -306,6 +307,11 @@
}, },
onShow() { onShow() {
const systemInfo = uni.getSystemInfoSync();
const isIOS = /iOS/.test(systemInfo.platform);
if ( !isIOS ) {
this.isBack = true
}
this.isWxIosPay = uni.getStorageSync('isWxIosPay') this.isWxIosPay = uni.getStorageSync('isWxIosPay')
this.kmPaySel = this.$queue.getData('kmPaySel'); this.kmPaySel = this.$queue.getData('kmPaySel');
this.numCount = uni.getStorageSync('numCount') this.numCount = uni.getStorageSync('numCount')

View File

@@ -24,7 +24,7 @@
<text style="margin-right: 20rpx;">打卡提醒</text> <text style="margin-right: 20rpx;">打卡提醒</text>
<u-switch v-model="checked" size="35" active-color="#EA9EA8 "></u-switch> <u-switch v-model="checked" size="35" active-color="#EA9EA8 "></u-switch>
</view> --> </view> -->
</view> </view>
<view class="signInList flex justify-between"> <view class="signInList flex justify-between">
<text class="line"></text> <text class="line"></text>
<view class="signIn-Item" <view class="signIn-Item"
@@ -42,12 +42,12 @@
</view> </view>
<view class="tishi">连续签到7天即可获得7元奖励</view> <view class="tishi">连续签到7天即可获得7元奖励</view>
<view class="signInBtn" @click="goNav({jumpType: 0, id:15, buttonTitle: '去领取'})"> <!-- <view class="signInBtn" @click="goNav({jumpType: 0, id:15, buttonTitle: '去领取'})">
<view>{{signInBtn}}</view> <view>{{signInBtn}}</view>
<view class="signInBtnBg"></view> <view class="signInBtnBg"></view>
</view> </view> -->
</view> </view>
<view class="content margin-lr padding bg-white u-relative" v-if="list.length"> <view class="content margin-lr padding bg-white u-relative" v-if="list.length">
@@ -73,7 +73,7 @@
{{ 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-else class="btn u-font-24 text-bold" @click="goNav(item)">{{ item.buttonTitle }}</view> --> <!-- <view v-else class="btn u-font-24 text-bold" @click="goNav(item)">{{ item.buttonTitle }}</view> -->
<!-- <view v-if=" item.type ==4 " class="u-font-20 tip" @click="goNav('/me/gift/gift', item.type)">查看奖品列表</view> --> <view v-if=" item.buttonUnderContent && item.buttonUnderUrl " class="u-font-22 tip" @click="goNav({buttonUrl: item.buttonUnderUrl, jumpType: 1,title: item.title})">{{ item.buttonUnderContent}}</view>
</view> </view>
</view> </view>
<view class=""> <view class="">
@@ -192,10 +192,10 @@
} }
}) })
} else { } else {
uni.showToast({ // uni.showToast({
title: res.msg, // title: res.msg,
icon: 'none' // icon: 'none'
}) // })
} }
}) })
}, },
@@ -215,18 +215,29 @@
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 , // jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 , // type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
// buttonUrl // buttonUrl
console.log(item)
if (item.jumpType == 0) { if ( item.jumpType == 0) {
if (item.buttonTitle == '去领取') { if ( item.buttonTitle.indexOf("领取") != -1) {
this.taskReceive(item.id) this.taskReceive(item.id)
} else { } else {
uni.switchTab({ uni.switchTab({
url: "/pages/index/index" url: "/pages/index/index"
}) })
} }
} else if (item.jumpType == 1) { } else if ( item.jumpType == 1) {
let source,buttonUrl;
buttonUrl = item.buttonUrl
if ( item.title && item.title.indexOf('每周') != -1 ) {
source = 2
buttonUrl = item.buttonUrl+'?source='+source
}
if ( item.title && item.title.indexOf('每月') != -1 ) {
source = 3
buttonUrl = item.buttonUrl+'?source='+source
}
console.log(buttonUrl)
uni.navigateTo({ uni.navigateTo({
url: item.buttonUrl url: buttonUrl
}) })
} else if (item.jumpType == 3) { } else if (item.jumpType == 3) {
uni.switchTab({ uni.switchTab({
@@ -291,10 +302,17 @@
<style lang="scss"> <style lang="scss">
.container { .container {
width: 100%; width: 100%;
<<<<<<< HEAD
.task_bg { .task_bg {
width: 100% !important; width: 100% !important;
height: 494rpx !important; height: 494rpx !important;
=======
background-color: #F3F4F8;
.task_bg{
width: 100%!important;
height: 494rpx!important;
>>>>>>> 2ff5ebfd71042121cad90bd9b88c9372dbf8871d
} }
.icon { .icon {
@@ -395,11 +413,17 @@
color: #FFFFFF; color: #FFFFFF;
border-radius: 12rpx 12rpx 12rpx 12rpx; border-radius: 12rpx 12rpx 12rpx 12rpx;
} }
<<<<<<< HEAD
.tip { .tip {
color: #666; color: #666;
=======
.tip{
color: #EC6F48;
>>>>>>> 2ff5ebfd71042121cad90bd9b88c9372dbf8871d
height: 44rpx; height: 44rpx;
line-height: 44rpx; line-height: 44rpx;
margin-top: 5rpx;
} }
.opt { .opt {

View File

@@ -8,8 +8,8 @@
<view class="content u-relative" v-if="list.length"> <view class="content 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" >
<image class="cell_icon" :src="'../../static/images/task/member_bg.png'"></image> <image class="cell_icon" :src="item.url"></image>
<view class="name u-font-24 text-bold ">已领取</view> <view class="name u-font-24 text-bold ">{{item.name}}</view>
</view> </view>
</view> </view>
@@ -27,83 +27,29 @@
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)' backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)'
}, },
list: [], list: [],
source: null
isShowMoneyPay: true,
} }
}, },
onShow() { onLoad(options) {
this.getTaskdata() console.log(options)
this.$Request.getT("app/common/type/919", {}).then(res => { if ( options.source ) {
if (res.code == 0) { this.source = options.source
const sysInfo = uni.getSystemInfoSync(); }
let isIos = sysInfo.platform == 'ios' this.getList()
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
}
});
}, },
methods: { methods: {
/**
* 跳转
* @param {Object} item
*/
goNav( item ) {
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 ,
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
// buttonUrl
if ( item.jumpType == 0) {
this.taskReceive(item.id)
} else if ( item.jumpType == 1) {
uni.navigateTo({
url: item.buttonUrl
})
} else if( item.jumpType == 3) {
uni.switchTab({
url: item.buttonUrl
})
} else if( item.jumpType == 2) {
plus.runtime.openURL(item.buttonUrl)
}
},
/** /**
* 领取 * 获取列表
*/ */
taskReceive(id) { getList() {
let data = { this.$Request.getT('app/discSpinning/selectDiscSpinning', {source:this.source}).then(res => {
id: id
}
this.$Request.getT('app/taskCenter/taskReceive', data).then(res => {
if (res.code == 0 ) { if (res.code == 0 ) {
uni.showToast({ this.list = res.data.records
title: id==15?'签到成功':'领取成功',
icon: 'none'
})
setTimeout(()=>{
this.getTaskdata()
this.getsignIn()
},1000)
} else {
uni.switchTab({
url: "/pages/index/index"
})
} }
}) })
}, },
/**
* 获取任务列表
*/
getTaskdata() {
this.$Request.getT('app/taskCenter/selectTaskCenter', {}).then(res => {
if (res.code == 0 ) {
this.list = res.data
}
uni.stopPullDownRefresh();
})
},
} }
} }
</script> </script>

View File

@@ -15,16 +15,12 @@
</view> </view>
<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" >
<view class="cell_left flex"> <view class="cell_left flex">
<image class="cell_icon" :src="'../../static/images/task/member_bg.png'"></image> <image class="cell_icon" :src="item.url"></image>
<view class="cell_title flex"> <view class="cell_title flex">
<view class="u-font-28 text-bold title">{{ item.title}}</view> <view class="u-font-28 text-bold title">{{ item.name}}</view>
<view class="u-font-24 tip">{{ item.rewardDetail }}</view> <!-- <view class="u-font-24 tip">{{ item.rewardDetail }}</view> -->
</view> </view>
</view> </view>
<view class="cell_right flex">
<view v-if=" item.disabled " class="btn u-font-24 text-bold" @click="goNav(item)">领取</view>
<view v-else class="btn u-font-24 text-bold receive">已领取</view>
</view>
</view> </view>
</view> </view>
@@ -42,83 +38,29 @@
backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)' backgroundImage: 'linear-gradient(to right, #DDEAFC 0%, #C8DBFA 49%, #AFC9F6 100%)'
}, },
list: [], list: [],
source: null,
isShowMoneyPay: true,
} }
}, },
onShow() { onLoad(options) {
this.getTaskdata() console.log(options)
this.$Request.getT("app/common/type/919", {}).then(res => { if ( options.source ) {
if (res.code == 0) { this.source = options.source
const sysInfo = uni.getSystemInfoSync(); }
let isIos = sysInfo.platform == 'ios' this.getList()
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
}
});
}, },
methods: { methods: {
/** /**
* 跳转 * 获取列表
* @param {Object} item
*/ */
goNav( item ) { getList() {
// jumpType (integer, optional): 跳转类型 1 内部路径 2 外部路径 , this.$Request.getT('app/discSpinning/selectDiscSpinning', {source:this.source}).then(res => {
// type (integer, optional): 任务类型 1 普通任务 2 打卡任务 9 其它 ,
// buttonUrl
if ( item.jumpType == 0) {
this.taskReceive(item.id)
} else if ( item.jumpType == 1) {
uni.navigateTo({
url: item.buttonUrl
})
} else if( item.jumpType == 3) {
uni.switchTab({
url: item.buttonUrl
})
} else if( item.jumpType == 2) {
plus.runtime.openURL(item.buttonUrl)
}
},
/**
* 领取
*/
taskReceive(id) {
let data = {
id: id
}
this.$Request.getT('app/taskCenter/taskReceive', data).then(res => {
if (res.code == 0 ) { if (res.code == 0 ) {
uni.showToast({ this.list = res.data.records
title: id==15?'签到成功':'领取成功',
icon: 'none'
})
setTimeout(()=>{
this.getTaskdata()
this.getsignIn()
},1000)
} else {
uni.switchTab({
url: "/pages/index/index"
})
} }
}) })
}, },
/**
* 获取任务列表
*/
getTaskdata() {
this.$Request.getT('app/taskCenter/selectTaskCenter', {}).then(res => {
if (res.code == 0 ) {
this.list = res.data
}
uni.stopPullDownRefresh();
})
},
} }
} }
</script> </script>
@@ -158,7 +100,7 @@
background: linear-gradient( -45deg, #DDEAFC 0%, #FFFFFF 100%); background: linear-gradient( -45deg, #DDEAFC 0%, #FFFFFF 100%);
border-radius: 32rpx 32rpx 0rpx 0rpx; border-radius: 32rpx 32rpx 0rpx 0rpx;
overflow-y: auto; overflow-y: auto;
.title{ >.title{
display: flex; display: flex;
align-items: center; align-items: center;
font-weight: bold; font-weight: bold;
@@ -180,6 +122,7 @@
padding: 32rpx 28rpx; padding: 32rpx 28rpx;
.cell_left{ .cell_left{
flex-direction: row; flex-direction: row;
align-items: center;
.cell_icon{ .cell_icon{
width: 84rpx!important; width: 84rpx!important;
height: 84rpx!important; height: 84rpx!important;
@@ -188,15 +131,12 @@
} }
.cell_title{ .cell_title{
display: flex; display: flex;
flex-direction: column; align-items: center;
align-items: flex-start;
margin-bottom: 12rpx;
color: #333; color: #333;
.title{ .title{
font-weight: bold; font-weight: bold;
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
margin-bottom: 8rpx;
} }
.tip{ .tip{