提交
This commit is contained in:
@@ -20,11 +20,11 @@
|
||||
"type" : "uniCloud"
|
||||
},
|
||||
{
|
||||
"playground" : "standard",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-ios"
|
||||
},
|
||||
{
|
||||
"playground" : "standard",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
}
|
||||
]
|
||||
|
||||
567
App.vue
567
App.vue
@@ -1,303 +1,310 @@
|
||||
<script>
|
||||
import {
|
||||
music,
|
||||
bgm
|
||||
} from '@/utils/music.js'
|
||||
import {
|
||||
iap
|
||||
} from "@/utils/myIapCheck.js";
|
||||
import store from '@/store/index.js';
|
||||
import socket from '@/config/socket';
|
||||
// #ifdef H5
|
||||
import {
|
||||
h5Login
|
||||
} from '@/config/html5Utils';
|
||||
// #endif
|
||||
// // #ifdef APP-PLUS
|
||||
// import APPUpdate from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
|
||||
// // #endif
|
||||
// #ifdef APP-PLUS
|
||||
import updata from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
|
||||
// #endif
|
||||
import Vue from 'vue'
|
||||
import { music, bgm } from "@/utils/music.js";
|
||||
import { iap } from "@/utils/myIapCheck.js";
|
||||
import store from "@/store/index.js";
|
||||
import socket from "@/config/socket";
|
||||
// #ifdef H5
|
||||
import { h5Login } from "@/config/html5Utils";
|
||||
// #endif
|
||||
// // #ifdef APP-PLUS
|
||||
// import APPUpdate from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
|
||||
// // #endif
|
||||
// #ifdef APP-PLUS
|
||||
import updata from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
|
||||
// #endif
|
||||
import Vue from "vue";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
platform: null, // 系统
|
||||
}
|
||||
},
|
||||
onLaunch: function(e) {
|
||||
// 检测自动更新
|
||||
// #ifdef APP-PLUS
|
||||
updata();
|
||||
// 检测是否有未关闭苹果内购订单
|
||||
// iap.getChannels();
|
||||
// console.log('引入了?');
|
||||
// #endif
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lastCheckTime: 0, // 记录上一次检查时间
|
||||
platform: null, // 系统
|
||||
};
|
||||
},
|
||||
onLaunch: function (e) {
|
||||
// 检测自动更新
|
||||
// #ifdef APP-PLUS
|
||||
// updata();
|
||||
// 检测是否有未关闭苹果内购订单
|
||||
// iap.getChannels();
|
||||
// console.log('引入了?');
|
||||
// #endif
|
||||
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
Vue.prototype.winWidth = res.screenWidth
|
||||
Vue.prototype.winHeight = res.screenHeight
|
||||
}
|
||||
})
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
Vue.prototype.winWidth = res.screenWidth;
|
||||
Vue.prototype.winHeight = res.screenHeight;
|
||||
},
|
||||
});
|
||||
|
||||
// 取出初始播放信息
|
||||
uni.getStorage({
|
||||
key: 'playingInfo',
|
||||
success: function(res) {
|
||||
console.log(res, 'playingInfo本地初始化')
|
||||
store.commit('setUserInfo', {
|
||||
'playingInfo': res.data
|
||||
})
|
||||
store.commit('setUserInfo', {
|
||||
'playTitle': res.data.chapter,
|
||||
'fengImg': res.data.bookImage
|
||||
})
|
||||
console.log(store.state.userInfo, '初始化')
|
||||
},
|
||||
fail: function(e) {
|
||||
console.log(e, 'playingInfo本地初始化失败')
|
||||
store.commit('setUserInfo', {
|
||||
'playingInfo': {
|
||||
'images': '../../static/icon/fengziIcon.jpg',
|
||||
'chapterName': '暂无播放信息',
|
||||
}
|
||||
})
|
||||
store.commit('setUserInfo', {
|
||||
'playTitle': '暂无播放信息',
|
||||
'fengImg': '../../static/icon/fengziIcon.jpg'
|
||||
})
|
||||
},
|
||||
})
|
||||
// 取出播放列表
|
||||
uni.getStorage({
|
||||
key: 'playData',
|
||||
success: function(res) { // 本地有播放数据就用本地的
|
||||
console.log(res.data, '取出的本地数据');
|
||||
if (res.data.myList.length <= 0) {
|
||||
store.commit('setUserInfo', {
|
||||
'playVisible': false
|
||||
})
|
||||
} else {
|
||||
music.setList(res.data.myList, '', store.state.userInfo.playIndex)
|
||||
// music.setCoverImg(res.data.fengImg)
|
||||
store.commit('setUserInfo', res.data)
|
||||
}
|
||||
store.commit('setUserInfo', {
|
||||
'playFlag': false
|
||||
}); // 设置播放按钮状态为暂停
|
||||
store.commit('setUserInfo', {
|
||||
'currentTime': 0
|
||||
});
|
||||
// 取出初始播放信息
|
||||
uni.getStorage({
|
||||
key: "playingInfo",
|
||||
success: function (res) {
|
||||
console.log(res, "playingInfo本地初始化");
|
||||
store.commit("setUserInfo", {
|
||||
playingInfo: res.data,
|
||||
});
|
||||
store.commit("setUserInfo", {
|
||||
playTitle: res.data.chapter,
|
||||
fengImg: res.data.bookImage,
|
||||
});
|
||||
console.log(store.state.userInfo, "初始化");
|
||||
},
|
||||
fail: function (e) {
|
||||
console.log(e, "playingInfo本地初始化失败");
|
||||
store.commit("setUserInfo", {
|
||||
playingInfo: {
|
||||
images: "../../static/icon/fengziIcon.jpg",
|
||||
chapterName: "暂无播放信息",
|
||||
},
|
||||
});
|
||||
store.commit("setUserInfo", {
|
||||
playTitle: "暂无播放信息",
|
||||
fengImg: "../../static/icon/fengziIcon.jpg",
|
||||
});
|
||||
},
|
||||
});
|
||||
// 取出播放列表
|
||||
uni.getStorage({
|
||||
key: "playData",
|
||||
success: function (res) {
|
||||
// 本地有播放数据就用本地的
|
||||
console.log(res.data, "取出的本地数据");
|
||||
if (res.data.myList.length <= 0) {
|
||||
store.commit("setUserInfo", {
|
||||
playVisible: false,
|
||||
});
|
||||
} else {
|
||||
music.setList(res.data.myList, "", store.state.userInfo.playIndex);
|
||||
// music.setCoverImg(res.data.fengImg)
|
||||
store.commit("setUserInfo", res.data);
|
||||
}
|
||||
store.commit("setUserInfo", {
|
||||
playFlag: false,
|
||||
}); // 设置播放按钮状态为暂停
|
||||
store.commit("setUserInfo", {
|
||||
currentTime: 0,
|
||||
});
|
||||
},
|
||||
fail: function (e) {
|
||||
// 如果没有,就查询一下线上的播放记录
|
||||
console.log("本地无数据");
|
||||
music.setList([]);
|
||||
//store.commit('setUserInfo',{'playingInfo': {'bookid':0,'chapterId':0}});
|
||||
store.commit("setUserInfo", {
|
||||
playVisible: false,
|
||||
});
|
||||
store.commit("setUserInfo", {
|
||||
myList: [],
|
||||
fengImg: "../../static/icon/fengziIcon.jpg",
|
||||
});
|
||||
store.commit("setUserInfo", {
|
||||
playFlag: false,
|
||||
});
|
||||
store.commit("setUserInfo", {
|
||||
currentTime: 0,
|
||||
});
|
||||
},
|
||||
});
|
||||
// end
|
||||
// 取出播放弹窗显示或者隐藏
|
||||
uni.getStorage({
|
||||
key: "playVisible",
|
||||
success: function (res) {
|
||||
store.commit("setUserInfo", {
|
||||
playVisible: res.data,
|
||||
}); // 设置是否显示按钮
|
||||
},
|
||||
fail: function (e) {
|
||||
// 如果本地没有playVisible数据,默认为false
|
||||
store.commit("setUserInfo", {
|
||||
playVisible: false,
|
||||
});
|
||||
},
|
||||
});
|
||||
//取出缓存数据
|
||||
store.commit("setCacheData");
|
||||
// #ifdef MP-WEIXIN
|
||||
if (store.state.userInfo.token) {
|
||||
socket.init();
|
||||
}
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
console.log(store.state);
|
||||
if (store.state.userInfo.token) {
|
||||
socket.init();
|
||||
} else {
|
||||
h5Login("force", () => {
|
||||
socket.init();
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
if (store.state.userInfo.token) {
|
||||
socket.init();
|
||||
}
|
||||
// APPUpdate();
|
||||
// #endif
|
||||
},
|
||||
onShow: function (e) {
|
||||
const interval = 1000 * 60 * 60 * 6; // 检查间隔,单位毫秒(此处为6小时)
|
||||
const currentTime = Date.now();
|
||||
|
||||
},
|
||||
fail: function(e) { // 如果没有,就查询一下线上的播放记录
|
||||
console.log('本地无数据');
|
||||
music.setList([])
|
||||
//store.commit('setUserInfo',{'playingInfo': {'bookid':0,'chapterId':0}});
|
||||
store.commit('setUserInfo', {
|
||||
'playVisible': false
|
||||
})
|
||||
store.commit('setUserInfo', {
|
||||
'myList': [],
|
||||
'fengImg': '../../static/icon/fengziIcon.jpg'
|
||||
})
|
||||
store.commit('setUserInfo', {
|
||||
'playFlag': false
|
||||
});
|
||||
store.commit('setUserInfo', {
|
||||
'currentTime': 0
|
||||
});
|
||||
}
|
||||
});
|
||||
// end
|
||||
// 取出播放弹窗显示或者隐藏
|
||||
uni.getStorage({
|
||||
key: 'playVisible',
|
||||
success: function(res) {
|
||||
store.commit('setUserInfo', {
|
||||
'playVisible': res.data
|
||||
}); // 设置是否显示按钮
|
||||
},
|
||||
fail: function(e) { // 如果本地没有playVisible数据,默认为false
|
||||
store.commit('setUserInfo', {
|
||||
'playVisible': false
|
||||
});
|
||||
}
|
||||
});
|
||||
//取出缓存数据
|
||||
store.commit('setCacheData');
|
||||
// #ifdef MP-WEIXIN
|
||||
if (store.state.userInfo.token) {
|
||||
socket.init();
|
||||
}
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
console.log(store.state)
|
||||
if (store.state.userInfo.token) {
|
||||
socket.init();
|
||||
} else {
|
||||
h5Login('force', () => {
|
||||
socket.init();
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
if (store.state.userInfo.token) {
|
||||
socket.init();
|
||||
}
|
||||
// APPUpdate();
|
||||
// #endif
|
||||
if (currentTime - this.lastCheckTime > interval) {
|
||||
this.lastCheckTime = currentTime; // 更新上一次检查时间
|
||||
updata();
|
||||
} else {
|
||||
console.log("距离上次检查时间过短,不重复检查");
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
|
||||
},
|
||||
onShow: function(e) {
|
||||
// #ifdef APP-PLUS
|
||||
// updata();
|
||||
// 检测是否有未关闭苹果内购订单
|
||||
iap.getChannels();
|
||||
// console.log('引入了?');
|
||||
// #endif
|
||||
// console.log(plus.runtime.arguments, 'plus.runtime.arguments-----')
|
||||
// #ifdef MP-WEIXIN
|
||||
//获取二维码携带的参数
|
||||
let scene = decodeURIComponent(e.query.scene);
|
||||
scene = scene.split('&');
|
||||
let data = {
|
||||
//场景值
|
||||
scene: e.scene
|
||||
};
|
||||
scene.forEach(item => {
|
||||
let arr = item.split('=');
|
||||
if (arr.length == 2) {
|
||||
data[arr[0]] = arr[1];
|
||||
}
|
||||
});
|
||||
store.commit('setChatScenesInfo', Object.assign(e.query, data));
|
||||
//小程序更新
|
||||
if (uni.getUpdateManager) {
|
||||
const updateManager = uni.getUpdateManager();
|
||||
updateManager.onCheckForUpdate(function(res) {
|
||||
// 请求完新版本信息的回调
|
||||
// console.log(res.hasUpdate);
|
||||
});
|
||||
updateManager.onUpdateReady(function(res) {
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,是否重启应用?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
updateManager.onUpdateFailed(function(res) {
|
||||
// 新的版本下载失败
|
||||
uni.showModal({
|
||||
title: '已经有新版本了哟~',
|
||||
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~',
|
||||
showCancel: false
|
||||
});
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
onHide: function() {},
|
||||
destroyed() {
|
||||
store.commit('setUserInfo', {
|
||||
'playFlag': true
|
||||
})
|
||||
console.log('页面销毁')
|
||||
},
|
||||
methods: {}
|
||||
};
|
||||
// 检测是否有未关闭苹果内购订单
|
||||
iap.getChannels();
|
||||
// console.log('引入了?');
|
||||
// #endif
|
||||
// console.log(plus.runtime.arguments, 'plus.runtime.arguments-----')
|
||||
// #ifdef MP-WEIXIN
|
||||
//获取二维码携带的参数
|
||||
let scene = decodeURIComponent(e.query.scene);
|
||||
scene = scene.split("&");
|
||||
let data = {
|
||||
//场景值
|
||||
scene: e.scene,
|
||||
};
|
||||
scene.forEach((item) => {
|
||||
let arr = item.split("=");
|
||||
if (arr.length == 2) {
|
||||
data[arr[0]] = arr[1];
|
||||
}
|
||||
});
|
||||
store.commit("setChatScenesInfo", Object.assign(e.query, data));
|
||||
//小程序更新
|
||||
if (uni.getUpdateManager) {
|
||||
const updateManager = uni.getUpdateManager();
|
||||
updateManager.onCheckForUpdate(function (res) {
|
||||
// 请求完新版本信息的回调
|
||||
// console.log(res.hasUpdate);
|
||||
});
|
||||
updateManager.onUpdateReady(function (res) {
|
||||
uni.showModal({
|
||||
title: "更新提示",
|
||||
content: "新版本已经准备好,是否重启应用?",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate();
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
updateManager.onUpdateFailed(function (res) {
|
||||
// 新的版本下载失败
|
||||
uni.showModal({
|
||||
title: "已经有新版本了哟~",
|
||||
content: "新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~",
|
||||
showCancel: false,
|
||||
});
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
onHide: function () {},
|
||||
destroyed() {
|
||||
store.commit("setUserInfo", {
|
||||
playFlag: true,
|
||||
});
|
||||
console.log("页面销毁");
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "uview-ui/index.scss";
|
||||
/* #ifndef APP-NVUE */
|
||||
@import './style/common.scss';
|
||||
@import './style/input.scss';
|
||||
@import './style/table.scss';
|
||||
@import "uview-ui/index.scss";
|
||||
/* #ifndef APP-NVUE */
|
||||
@import "./style/common.scss";
|
||||
@import "./style/input.scss";
|
||||
@import "./style/table.scss";
|
||||
|
||||
page {
|
||||
height: 100%;
|
||||
background-color: #f7faf9;
|
||||
}
|
||||
page {
|
||||
height: 100%;
|
||||
background-color: #f7faf9;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
/* #endif */
|
||||
|
||||
/* #ifdef H5 */
|
||||
//修复H5底部导航挡住内容bug
|
||||
uni-app {
|
||||
height: auto;
|
||||
}
|
||||
/* #ifdef H5 */
|
||||
//修复H5底部导航挡住内容bug
|
||||
uni-app {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/*每个页面公共css */
|
||||
@font-face {
|
||||
font-family: 'iconfont';
|
||||
/* project id 1997429 */
|
||||
src: url('https://at.alicdn.com/t/font_1997429_8xzvctxta3u.eot');
|
||||
src: url('https://at.alicdn.com/t/font_1997429_8xzvctxta3u.eot?#iefix') format('embedded-opentype'),
|
||||
url('https://at.alicdn.com/t/font_1997429_8xzvctxta3u.woff2') format('woff2'),
|
||||
url('https://at.alicdn.com/t/font_1997429_8xzvctxta3u.woff') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_1997429_8xzvctxta3u.ttf') format('truetype'),
|
||||
url('https://at.alicdn.com/t/font_1997429_8xzvctxta3u.svg#iconfont') format('svg');
|
||||
}
|
||||
/*每个页面公共css */
|
||||
@font-face {
|
||||
font-family: "iconfont";
|
||||
/* project id 1997429 */
|
||||
src: url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.eot");
|
||||
src: url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.eot?#iefix")
|
||||
format("embedded-opentype"),
|
||||
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.woff2")
|
||||
format("woff2"),
|
||||
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.woff") format("woff"),
|
||||
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.ttf")
|
||||
format("truetype"),
|
||||
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.svg#iconfont")
|
||||
format("svg");
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.2px;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.2px;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
//修复H5输入框上下不居中bug
|
||||
.uni-input-form {
|
||||
height: 100%;
|
||||
}
|
||||
//修复H5输入框上下不居中bug
|
||||
.uni-input-form {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
//去除地图上高德地图标识符
|
||||
.amap-copyright {
|
||||
display: none !important;
|
||||
}
|
||||
//去除地图上高德地图标识符
|
||||
.amap-copyright {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.amap-logo {
|
||||
display: none !important;
|
||||
}
|
||||
.amap-logo {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.amap-ui-control-zoom {
|
||||
width: 60upx !important;
|
||||
}
|
||||
.amap-ui-control-zoom {
|
||||
width: 60upx !important;
|
||||
}
|
||||
|
||||
.amap-ui-control-zoom>* {
|
||||
width: 60upx !important;
|
||||
height: 60upx !important;
|
||||
line-height: 60upx !important;
|
||||
}
|
||||
.amap-ui-control-zoom > * {
|
||||
width: 60upx !important;
|
||||
height: 60upx !important;
|
||||
line-height: 60upx !important;
|
||||
}
|
||||
|
||||
.amap-ui-control-theme-dark {
|
||||
display: none !important;
|
||||
}
|
||||
.amap-ui-control-theme-dark {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
//设置圆角
|
||||
checkbox.round .wx-checkbox-input,
|
||||
checkbox.round .uni-checkbox-input {
|
||||
border-radius: 100upx;
|
||||
}
|
||||
//设置圆角
|
||||
checkbox.round .wx-checkbox-input,
|
||||
checkbox.round .uni-checkbox-input {
|
||||
border-radius: 100upx;
|
||||
}
|
||||
|
||||
//设置背景色
|
||||
checkbox.checkedItem[checked] .wx-checkbox-input,
|
||||
checkbox.checkedItem .uni-checkbox-input-checked {
|
||||
background-color: #e5a000 !important;
|
||||
border-color: #e5a000 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
//设置背景色
|
||||
checkbox.checkedItem[checked] .wx-checkbox-input,
|
||||
checkbox.checkedItem .uni-checkbox-input-checked {
|
||||
background-color: #e5a000 !important;
|
||||
border-color: #e5a000 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
</style>
|
||||
/* #endif */
|
||||
</style>
|
||||
|
||||
@@ -6,19 +6,21 @@ if (process.env.NODE_ENV === 'development') {
|
||||
// socketUrl = "ws://localhost:6001/";
|
||||
// baseUrl = "https://twin-ui.com/demo/";
|
||||
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
||||
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
|
||||
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
|
||||
// baseUrl = "http://59.110.212.44:9200/pb/";
|
||||
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/";
|
||||
// baseUrl = "http://192.168.110.38:9200/pb/"; // 吴春磊笔记本1
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/";//磊哥
|
||||
|
||||
// baseUrl = "http://192.168.110.38:9200/pb/"; // 吴春磊笔记本1
|
||||
// socketUrl = "ws://8.129.186.35:6001/";
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
// 生产环境11
|
||||
// 生产环境11
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/";//磊哥
|
||||
// baseUrl = "http://59.110.212.44:9100/pb/";
|
||||
// baseUrl = "https://testapi.nuttyreading.com/";
|
||||
baseUrl = "https://api.nuttyreading.com/"; //1
|
||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
|
||||
baseUrl = "https://api.nuttyreading.com/"; //1
|
||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
|
||||
// baseUrl = "ws://twin-ui.com:6001/";
|
||||
// socketUrl = "ws://twin-ui.com:6001/";
|
||||
}
|
||||
@@ -61,4 +63,4 @@ export default Object.assign({
|
||||
phoneRegular,
|
||||
mailRegular,
|
||||
passwordRegular
|
||||
}, courtConfig);
|
||||
}, courtConfig);
|
||||
3
main.js
3
main.js
@@ -86,7 +86,8 @@ Vue.component("mescroll-body", MescrollBody);
|
||||
|
||||
// import musicPlay from '@/components/music.vue'
|
||||
// Vue.component('music-play', musicPlay);
|
||||
|
||||
import commonAdvertisement from '@/pages/component/commonComponents/advertisement.vue'
|
||||
Vue.component('common-advertisement', commonAdvertisement);
|
||||
|
||||
App.mpType = 'app'
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
"sizes": "分辨率,192x192",
|
||||
"src": "图片路径"
|
||||
}],
|
||||
"versionName": "1.2.61",
|
||||
"versionCode": 1261,
|
||||
"versionName": "1.2.67",
|
||||
"versionCode": 1267,
|
||||
"app-plus": {
|
||||
"compatible": {
|
||||
"ignoreVersion": true
|
||||
|
||||
251
pages/component/commonComponents/advertisement.vue
Normal file
251
pages/component/commonComponents/advertisement.vue
Normal file
@@ -0,0 +1,251 @@
|
||||
<template>
|
||||
<view
|
||||
class="container commonPageBox commonDetailPage"
|
||||
style="height: auto !important; padding-bottom: 0 !important"
|
||||
>
|
||||
<u-popup :show="show" v-if="show" mode="center" class="popup_box">
|
||||
<div class="product_image" scroll-y="true" style="position: relative">
|
||||
|
||||
<swiper
|
||||
:style="{ height: fullHeight }"
|
||||
class="swiper-tall"
|
||||
:indicator-dots="indicatorDots"
|
||||
:autoplay="autoplay"
|
||||
:previous-margin="previousMargin"
|
||||
:next-margin="nextMargin"
|
||||
:circular="circular"
|
||||
@change="change"
|
||||
:current="swiperCurrentIndex"
|
||||
>
|
||||
<swiper-item
|
||||
class="swiper-container"
|
||||
v-for="(img, index) in list"
|
||||
:key="index"
|
||||
:item-id="index"
|
||||
:data-year="index"
|
||||
>
|
||||
<view
|
||||
@click="gotoDetail(img)"
|
||||
class="swiper-item"
|
||||
:style="{
|
||||
background: img ? 'url(' + img.icon + ') center no-repeat' : '',
|
||||
backgroundSize: '100% 100%',
|
||||
}"
|
||||
:animation="animationData[index]"
|
||||
>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view style="display: flex;align-items: center;justify-content: center;">
|
||||
<view @click="close" style="font-weight: bold;background-color: rgba(255, 255, 255, 0.8); color: #333;padding:20rpx 10rpx;width: 200rpx;font-size: 30rpx;border-radius: 40rpx;text-align: center;letter-spacing: 0.5rpx;">
|
||||
关闭
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</div>
|
||||
</u-popup></view
|
||||
>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const stopPenetrate = () => {
|
||||
return;
|
||||
};
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
props: ["list"],
|
||||
data() {
|
||||
return {
|
||||
screenHeight: 0,
|
||||
animationData: {
|
||||
0: {},
|
||||
1: {},
|
||||
2: {},
|
||||
},
|
||||
title: "0",
|
||||
indicatorDots: false,
|
||||
autoplay: false,
|
||||
previousMargin: uni.upx2px(82) + "px",
|
||||
nextMargin: uni.upx2px(82) + "px",
|
||||
circular: true,
|
||||
zoomParam: 1.1,
|
||||
swiperCurrentIndex: 0,
|
||||
data: [],
|
||||
max: 0,
|
||||
show: false,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.show = false;
|
||||
},
|
||||
onLoad() {},
|
||||
onHide() {
|
||||
// this.showSearchList = false
|
||||
// this.searchList = []
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
|
||||
fullHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
return (
|
||||
res.windowHeight - uni.upx2px(60) - (res.statusBarHeight + 44) + "px"
|
||||
);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
gotoDetail(v) {
|
||||
console.log("v at line 58:", v);
|
||||
if (v.relationId) {
|
||||
if (v.type == 0) {
|
||||
if (v.shopProduct) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/bookShop/commodityDetail?id=${v.shopProduct.productId}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (v.type == 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/peanut/reCharge`,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// if (v.type == 2) {
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/mine/vip/index`,
|
||||
// });
|
||||
// }
|
||||
|
||||
this.show = false;
|
||||
},
|
||||
// 放大图片
|
||||
previewImage(url) {
|
||||
console.log(url);
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
longPressActions: {
|
||||
itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||
success: function (res) {
|
||||
// console.log(res,'+++++')
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
change(e) {
|
||||
this.swiperCurrentIndex = e.detail.current;
|
||||
this.title = e.detail.currentItemId;
|
||||
for (let key in this.animationData) {
|
||||
if (e.detail.currentItemId == key) {
|
||||
this.animation.scale(this.zoomParam).step();
|
||||
this.animationData[key] = this.animation.export();
|
||||
} else {
|
||||
this.animation.scale(1.0).step();
|
||||
this.animationData[key] = this.animation.export();
|
||||
}
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
selectGoods(data) {
|
||||
this.$emit("selectGoods", data);
|
||||
},
|
||||
open() {
|
||||
this.animation = uni.createAnimation();
|
||||
this.animation.scale(this.zoomParam).step();
|
||||
this.animationData[0] = this.animation.export();
|
||||
this.show = true;
|
||||
},
|
||||
|
||||
onHandleClickBuy() {
|
||||
this.$emit("selectGoodsData", this.selectGoodsData);
|
||||
this.$emit("onHandleClickBuy");
|
||||
},
|
||||
},
|
||||
onBackPress() {
|
||||
// #ifdef APP-PLUS
|
||||
plus.key.hideSoftKeybord();
|
||||
// #endif
|
||||
},
|
||||
|
||||
components: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.goods_image {
|
||||
width: 70vw;
|
||||
}
|
||||
|
||||
.popup_box {
|
||||
padding-top: 30rpx;
|
||||
|
||||
background-color: transparent;
|
||||
|
||||
.popup_content {
|
||||
padding-bottom: 140rpx;
|
||||
}
|
||||
/deep/.list_item {
|
||||
// border-bottom: none;
|
||||
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.product_image {
|
||||
width: 100vw;
|
||||
|
||||
max-height: 90vh;
|
||||
}
|
||||
}
|
||||
/deep/.u-popup__content {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
/deep/.u-popup__content__close {
|
||||
color: #fff !important;
|
||||
}
|
||||
.title_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-left: 0;
|
||||
.title_price {
|
||||
color: #ef1224;
|
||||
font-size: 40rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
.swiper-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
height: 858upx;
|
||||
width: 530upx;
|
||||
line-height: 300upx;
|
||||
text-align: center;
|
||||
broder-radius: 6upx;
|
||||
margin-bottom: 50upx;
|
||||
}
|
||||
|
||||
.swiper-tall {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.swiper-title {
|
||||
width: 750upx;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -21,9 +21,9 @@
|
||||
<p>一款线上电子书APP,包含医学类、国学类、文学类、中医古籍等各种类型。3D仿真翻页、护眼模式等阅读技术,打造舒适阅读体验。图文混排,AI人声读书听书。部分电子书也有对应的纸质书,给予用户更多的阅读选择。</p>
|
||||
</view>
|
||||
<view class="" style="text-align: center;">
|
||||
<!-- https://main.nuttyreading.com/privacy.html -->
|
||||
<!-- https://www.nuttyreading.com/privacy.html -->
|
||||
<!-- <text @click="seeDetail('')" style="color: #007aff; font-size: 26rpx;">隐私政策</text> -->
|
||||
<uni-link href="https://main.nuttyreading.com/privacy.html" text="隐私政策"></uni-link>
|
||||
<uni-link href="https://www.nuttyreading.com/privacy.html" text="隐私政策"></uni-link>
|
||||
<!-- <uni-link href="https://uniapp.dcloud.io/" text="https://uniapp.dcloud.io/"></uni-link> -->
|
||||
</view>
|
||||
<music-play :playData="playData"></music-play>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
BIN
static/icon/currency.png
Normal file
BIN
static/icon/currency.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.7 KiB |
BIN
static/wumen40.png
Normal file
BIN
static/wumen40.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__9788EB5","name":"疯子读书","version":{"name":"1.2.43","code":1243},"description":"疯子读书","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Payment":{},"OAuth":{},"Share":{},"Camera":{},"VideoPlayer":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":false,"waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#FFFFFF"},"compatible":{"ignoreVersion":true},"privacy":{"prompt":"template","template":{"title":"用户协议和隐私政策","message":"请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href='https://main.nuttyreading.com/agreement.html'>《用户协议》</a>和<a href='https://main.nuttyreading.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。","buttonAccept":"同意","buttonRefuse":"暂不同意"}},"compilerVersion":3,"nativePlugins":{},"uniStatistics":{"version":"2","enable":true,"uniCloud":{"provider":"aliyun","spaceId":"mp-3614b80b-2d75-4462-a481-4998f8187274","clientSecret":"ogncD4XunyyFxHlbDFZ/Ww==","endpoint":"https://api.next.bspapp.com"}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#ffffff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.06","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"fast"},"tabBar":{"color":"#444444","selectedColor":"#079307","borderStyle":"rgba(0,0,0,0.4)","backgroundColor":"#ffffff","list":[{"pagePath":"pages/peanut/home","iconPath":"static/tab/icon1_n.png","selectedIconPath":"static/tab/icon1_y.png","text":"首页"},{"pagePath":"pages/medicaldes/medicaldes","iconPath":"static/icon/five5_n.png","selectedIconPath":"static/icon/five5.png","text":"吴门医述"},{"pagePath":"pages/library/library","iconPath":"static/tab/icon3_n.png","selectedIconPath":"static/tab/icon3_y.png","text":"我的图书"},{"pagePath":"pages/peanut/mine","iconPath":"static/tab/icon4_n.png","selectedIconPath":"static/tab/icon4_y.png","text":"我"}],"height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}}
|
||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__9788EB5","name":"疯子读书","version":{"name":"1.2.43","code":1243},"description":"疯子读书","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Payment":{},"OAuth":{},"Share":{},"Camera":{},"VideoPlayer":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":false,"waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#FFFFFF"},"compatible":{"ignoreVersion":true},"privacy":{"prompt":"template","template":{"title":"用户协议和隐私政策","message":"请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href='https://main.nuttyreading.com/agreement.html'>《用户协议》</a>和<a href='https://www.nuttyreading.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。","buttonAccept":"同意","buttonRefuse":"暂不同意"}},"compilerVersion":3,"nativePlugins":{},"uniStatistics":{"version":"2","enable":true,"uniCloud":{"provider":"aliyun","spaceId":"mp-3614b80b-2d75-4462-a481-4998f8187274","clientSecret":"ogncD4XunyyFxHlbDFZ/Ww==","endpoint":"https://api.next.bspapp.com"}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#ffffff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.06","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"fast"},"tabBar":{"color":"#444444","selectedColor":"#079307","borderStyle":"rgba(0,0,0,0.4)","backgroundColor":"#ffffff","list":[{"pagePath":"pages/peanut/home","iconPath":"static/tab/icon1_n.png","selectedIconPath":"static/tab/icon1_y.png","text":"首页"},{"pagePath":"pages/medicaldes/medicaldes","iconPath":"static/icon/five5_n.png","selectedIconPath":"static/icon/five5.png","text":"吴门医述"},{"pagePath":"pages/library/library","iconPath":"static/tab/icon3_n.png","selectedIconPath":"static/tab/icon3_y.png","text":"我的图书"},{"pagePath":"pages/peanut/mine","iconPath":"static/tab/icon4_n.png","selectedIconPath":"static/tab/icon4_y.png","text":"我"}],"height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}}
|
||||
Reference in New Issue
Block a user