Commit 2f72c20f authored by jyx's avatar jyx

代码优化

parent 60d4dd8c
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
versionName: '1.1.0', versionName: '1.1.0',
auth: false, // 三要素实名认证 auth: false, // 三要素实名认证
userInfo: null, userInfo: null,
pkgName: 'com.mints.dybrightvideo' pkgName: 'com.duben.dyolvedio'
} }
}; };
</script> </script>
......
This diff is collapsed.
{ {
"name" : "短剧", "name" : "短剧",
"appid" : "__UNI__D23E760", "appid" : "__UNI__076053C",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : 1000, "versionCode" : 1000,
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
"uniStatistics" : { "uniStatistics" : {
"enable" : false "enable" : false
}, },
"appid" : "ttde5ea8e3416e330801" "appid" : "ttae10d8ad3126cfa701"
}, },
"uniStatistics" : { "uniStatistics" : {
"enable" : false, "enable" : false,
......
{ {
"easycom": { "easycom": {
"^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue", "^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue",
"autoscan": true, "autoscan": true,
"custom": { "custom": {
"^n-(.*)": "@/nPro/$1/$1.vue", // 匹配nPro内的vue文件 "^n-(.*)": "@/nPro/$1/$1.vue", // 匹配nPro内的vue文件
"^nx-(.*)": "@/nProX/$1/$1.vue" // 匹配nProX内的vue文件 "^nx-(.*)": "@/nProX/$1/$1.vue" // 匹配nProX内的vue文件
} }
}, },
"pages": [ "pages": [
// #ifndef APP-PLUS // #ifndef APP-PLUS
{ {
"path": "pages/loading", "path": "pages/loading",
"style": { "style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#F2F1FF",
"navigationBarTextStyle": "#000000"
}
},
// #endif
{
"path": "pages/home",
"style": {
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarTitleText": "巨爽短剧", "navigationBarBackgroundColor": "#F2F1FF",
"navigationBarBackgroundColor": "#ffffff", "navigationBarTextStyle": "#000000"
"navigationBarTextStyle": "black" }
} },
}, // #endif
{ {
"path": "pages/brower/brower", "path": "pages/home",
"style": { "style": {
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff", "navigationBarTitleText": "欧拉短剧",
"navigationBarTextStyle": "black" "navigationBarBackgroundColor": "#ffffff",
} "navigationBarTextStyle": "black"
} }
], },
// 分包配置 {
"subPackages": [{ "path": "pages/brower/brower",
"root": "pagesA", "style": {
"pages": [{ "navigationStyle": "default",
"path": "vipPay/vipPay", "navigationBarBackgroundColor": "#ffffff",
"style": { "navigationBarTextStyle": "black"
"navigationStyle": "default", }
"navigationBarBackgroundColor": "#2196f3", }
"navigationBarTextStyle": "black" ],
} // 分包配置
}] "subPackages": [{
}, { "root": "pagesA",
"root": "pagesC", "pages": [{
"pages": [{ "path": "vipPay/vipPay",
"path": "ttvideo/ttVideoDetail", "style": {
"style": { "navigationStyle": "default",
"backgroundColor": "#000000", "navigationBarBackgroundColor": "#2196f3",
"navigationStyle": "default", "navigationBarTextStyle": "black"
"navigationBarBackgroundColor": "#000000", }
"navigationBarTextStyle": "#ffffff", }]
"usingComponents ": { }, {
"video-player": "ext://industry/video-player" "root": "pagesC",
} "pages": [{
} "path": "ttvideo/ttVideoDetail",
}] "style": {
}, "backgroundColor": "#000000",
{ "navigationStyle": "default",
"root": "pagesD", "navigationBarBackgroundColor": "#000000",
"pages": [{ "navigationBarTextStyle": "#ffffff",
"path": "watchRecord/watchRecord", "usingComponents ": {
"style": { "video-player": "ext://industry/video-player"
"navigationBarTitleText": "观看记录", }
"navigationStyle": "default", }
"navigationBarBackgroundColor": "#ffffff", }]
"navigationBarTextStyle": "black" },
} {
}, { "root": "pagesD",
"path": "payRecord/payRecord", "pages": [{
"style": { "path": "watchRecord/watchRecord",
"navigationBarTitleText": "我的订单", "style": {
"navigationStyle": "default", "navigationBarTitleText": "观看记录",
"navigationBarBackgroundColor": "#ffffff", "navigationStyle": "default",
"navigationBarTextStyle": "black" "navigationBarBackgroundColor": "#ffffff",
} "navigationBarTextStyle": "black"
}, { }
"path": "dotRecord/dotRecord", }, {
"style": { "path": "payRecord/payRecord",
"navigationBarTitleText": "看点记录", "style": {
"navigationStyle": "default", "navigationBarTitleText": "我的订单",
"navigationBarBackgroundColor": "#ffffff", "navigationStyle": "default",
"navigationBarTextStyle": "black" "navigationBarBackgroundColor": "#ffffff",
} "navigationBarTextStyle": "black"
}, { }
"path": "useDotRecord/useDotRecord", }, {
"style": { "path": "dotRecord/dotRecord",
"navigationBarTitleText": "消费记录", "style": {
"navigationStyle": "default", "navigationBarTitleText": "看点记录",
"navigationBarBackgroundColor": "#ffffff", "navigationStyle": "default",
"navigationBarTextStyle": "black" "navigationBarBackgroundColor": "#ffffff",
} "navigationBarTextStyle": "black"
}] }
} }, {
], "path": "useDotRecord/useDotRecord",
// 分包预载配置 "style": {
"preloadRule": { "navigationBarTitleText": "消费记录",
// 当我们进入了pages/home页面以后就会预下载pagesA分包 "navigationStyle": "default",
"pages/home": { "navigationBarBackgroundColor": "#ffffff",
"network": "all", //在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载) "navigationBarTextStyle": "black"
"packages": ["pagesA", "pagesC", "pagesD"] //进入页面后预下载分包 }
} }]
}, }
"globalStyle": { ],
"backgroundColor": "#f5f5f5", // 分包预载配置
"navigationStyle": "default", "preloadRule": {
"app-plus": { // 当我们进入了pages/home页面以后就会预下载pagesA分包
"bounce": "none", "pages/home": {
"scrollIndicator": "none" "network": "all", //在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
} "packages": ["pagesA", "pagesC", "pagesD"] //进入页面后预下载分包
}, }
"condition": { //模式配置,仅开发期间生效 },
"current": 0, //当前激活的模式(list 的索引项) "globalStyle": {
"list": [{ "backgroundColor": "#f5f5f5",
"name": "", //模式名称 "navigationStyle": "default",
"path": "", //启动页面,必选 "app-plus": {
"query": "" //启动参数,在页面的onLoad函数里面得到 "bounce": "none",
}] "scrollIndicator": "none"
} }
},
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [{
"name": "", //模式名称
"path": "", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}]
}
} }
\ No newline at end of file
<template> <template>
<view class="body"> <view class="body">
<image style="width: 170rpx;height: 170rpx;margin-top: 30%;" src="@/static/logo-about.png" mode="widthFix" /> <image style="width: 170rpx;height: 170rpx;margin-top: 30%;" src="@/static/logo-about.png" mode="widthFix" />
<view style="color: black;margin-top: 30rpx;font-size: 40rpx;font-size: 50rpx;">{{appName}}</view> <view style="color: black;margin-top: 30rpx;font-size: 40rpx;font-size: 50rpx;">{{appName}}</view>
<view style="color: #A231EF;margin-top: 10rpx;font-size: 40rpx;font-size: 40rpx;">欢迎使用</view> <view style="color: #A231EF;margin-top: 10rpx;font-size: 40rpx;font-size: 40rpx;">欢迎使用</view>
<view style="bottom: 0;position: absolute;"> <view style="bottom: 0;position: absolute;">
<image style="width: 540rpx;height: 644rpx;display: flex;align-items: center;margin-bottom: 30%;" <image style="width: 540rpx;height: 644rpx;display: flex;align-items: center;margin-bottom: 30%;"
src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_splash.png" mode="scaleToFill"> src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_splash.png" mode="scaleToFill">
</image> </image>
</view> </view>
<uni-popup type="center" ref="select"> <uni-popup type="center" ref="select">
<view class="text-box"> <view class="text-box">
{{slotParam}} {{slotParam}}
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script> <script>
import { import {
message, message,
redirectTo, redirectTo,
uuid uuid
} from '@/utils/fun.js'; } from '@/utils/fun.js';
import common from '@/mixins/common'; import common from '@/mixins/common';
const app = getApp(); const app = getApp();
export default { export default {
name: 'loading', name: 'loading',
mixins: [common], mixins: [common],
data() { data() {
return { return {
tips1: '', tips1: '',
slotParam: '', slotParam: '',
appName: '' appName: ''
} }
}, },
onLoad(options) { onLoad(options) {
this.tips1 = options.tips1 this.tips1 = options.tips1
// #ifdef MP-TOUTIAO // #ifdef MP-TOUTIAO
this.appName = '巨爽短剧' this.appName = '欧拉短剧'
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
this.appName = '河狸刷剧' this.appName = '河狸刷剧'
// #endif // #endif
}, },
onShow(options) { onShow(options) {
// #ifdef MP-TOUTIAO // #ifdef MP-TOUTIAO
this.ttLoging() this.ttLoging()
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
// this.wxlogin() // this.wxlogin()
// #endif // #endif
}, },
methods: { methods: {
ttLoging() { ttLoging() {
var that = this; var that = this;
var obj = tt.getLaunchOptionsSync() var obj = tt.getLaunchOptionsSync()
var channel = 'douyin' // 渠道 var channel = 'douyin' // 渠道
var tips2 = ''; // 投放测试标记 var tips2 = ''; // 投放测试标记
var product_type = ''; //自有产品 var product_type = ''; //自有产品
var zs_channel = ''; // 自有渠道 var zs_channel = ''; // 自有渠道
var vedio_id = ''; // 自有剧 var vedio_id = ''; // 自有剧
var zs_os = ''; // 当前系统 var zs_os = ''; // 当前系统
var vedio_index = ''; // 自有剧 var vedio_index = ''; // 自有剧
var free_index = ''; // 自有剧 var free_index = ''; // 自有剧
var remark1 = ''; // 预留 var remark1 = ''; // 预留
var remark2 = ''; // 预留 var remark2 = ''; // 预留
var remark3 = ''; // 预留 var remark3 = ''; // 预留
var mid1 = ""; var mid1 = "";
var mid2 = ""; var mid2 = "";
var mid3 = ""; var mid3 = "";
var mid4 = ""; var mid4 = "";
var mid5 = ""; var mid5 = "";
var thirdParam = ""; var thirdParam = "";
var album_id = obj.query.tt_album_id ?? ''; var album_id = obj.query.tt_album_id ?? '';
var episode_id = obj.query.tt_episode_id ?? ''; var episode_id = obj.query.tt_episode_id ?? '';
...@@ -89,8 +89,8 @@ ...@@ -89,8 +89,8 @@
uni.setStorage({ uni.setStorage({
key: 'tt_episode_id', key: 'tt_episode_id',
data: episode_id data: episode_id
}); });
zs_os = wx.getSystemInfoSync().platform; zs_os = wx.getSystemInfoSync().platform;
tips2 = obj.query.tips2 ?? '' tips2 = obj.query.tips2 ?? ''
product_type = obj.query.product_type ?? '' product_type = obj.query.product_type ?? ''
...@@ -105,84 +105,84 @@ ...@@ -105,84 +105,84 @@
mid2 = obj.query.mid2 ?? '' mid2 = obj.query.mid2 ?? ''
mid3 = obj.query.mid3 ?? '' mid3 = obj.query.mid3 ?? ''
mid4 = obj.query.mid4 ?? '' mid4 = obj.query.mid4 ?? ''
mid5 = obj.query.mid5 ?? '' mid5 = obj.query.mid5 ?? ''
// 抖音feed页参数 // 抖音feed页参数
thirdParam = JSON.stringify(obj.query); thirdParam = JSON.stringify(obj.query);
// 打印渠道参数 // 打印渠道参数
if (this.tips1 == 'mints_vedio' || tips2 == 'mints_vedio') { if (this.tips1 == 'mints_vedio' || tips2 == 'mints_vedio') {
this.slotParam = JSON.stringify(obj.query); this.slotParam = JSON.stringify(obj.query);
this.$refs.select.open('center'); this.$refs.select.open('center');
} }
tt.login({ tt.login({
force: true, force: true,
success(res) { success(res) {
console.log(`login 调用成功${res.code} ${res.anonymousCode}`); console.log(`login 调用成功${res.code} ${res.anonymousCode}`);
that.post({ that.post({
url: '/user/ttLogin', url: '/user/ttLogin',
data: { data: {
channel: channel, channel: channel,
code: res.code, code: res.code,
anonymousCode: res.anonymousCode, anonymousCode: res.anonymousCode,
productType: product_type, productType: product_type,
vedioId: vedio_id, vedioId: vedio_id,
remark1: remark1, remark1: remark1,
remark2: remark2, remark2: remark2,
remark3: remark3, remark3: remark3,
os: zs_os, os: zs_os,
vedioIndex: vedio_index, vedioIndex: vedio_index,
freeIndex: free_index, freeIndex: free_index,
mid1: mid1, mid1: mid1,
mid2: mid2, mid2: mid2,
mid3: mid3, mid3: mid3,
mid4: mid4, mid4: mid4,
mid5: mid5, mid5: mid5,
thirdParam: thirdParam, thirdParam: thirdParam,
zsChannel: zs_channel zsChannel: zs_channel
}, },
showLoading: false, showLoading: false,
success: ({ success: ({
data data
}) => { }) => {
uni.setStorage({ uni.setStorage({
key: 'token', key: 'token',
data: data.token data: data.token
}); });
setTimeout(() => { setTimeout(() => {
redirectTo('home'); redirectTo('home');
}, 1000); }, 1000);
} }
}); });
}, },
fail(res) { fail(res) {
console.log(`login 调用失败`); console.log(`login 调用失败`);
}, },
}); });
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.body { .body {
background-color: white; background-color: white;
background: linear-gradient(to bottom, #F2F1FF, #FBFBFF); background: linear-gradient(to bottom, #F2F1FF, #FBFBFF);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.text-box { .text-box {
word-break: break-all; word-break: break-all;
margin: 10rpx; margin: 10rpx;
padding: 10rpx; padding: 10rpx;
background-color: white; background-color: white;
color: black; color: black;
} }
</style> </style>
\ No newline at end of file
vedio/static/logo-about.png

6.28 KB | W: | H:

vedio/static/logo-about.png

15.7 KB | W: | H:

vedio/static/logo-about.png
vedio/static/logo-about.png
vedio/static/logo-about.png
vedio/static/logo-about.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment