提交
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"
|
||||
}
|
||||
]
|
||||
|
||||
225
App.vue
225
App.vue
@@ -1,36 +1,30 @@
|
||||
<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';
|
||||
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';
|
||||
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'
|
||||
import updata from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
|
||||
// #endif
|
||||
import Vue from 'vue'
|
||||
import Vue from "vue";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lastCheckTime: 0, // 记录上一次检查时间
|
||||
platform: null, // 系统
|
||||
}
|
||||
};
|
||||
},
|
||||
onLaunch: function (e) {
|
||||
// 检测自动更新
|
||||
// #ifdef APP-PLUS
|
||||
updata();
|
||||
// updata();
|
||||
// 检测是否有未关闭苹果内购订单
|
||||
// iap.getChannels();
|
||||
// console.log('引入了?');
|
||||
@@ -38,108 +32,110 @@
|
||||
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
Vue.prototype.winWidth = res.screenWidth
|
||||
Vue.prototype.winHeight = res.screenHeight
|
||||
}
|
||||
})
|
||||
Vue.prototype.winWidth = res.screenWidth;
|
||||
Vue.prototype.winHeight = res.screenHeight;
|
||||
},
|
||||
});
|
||||
|
||||
// 取出初始播放信息
|
||||
uni.getStorage({
|
||||
key: 'playingInfo',
|
||||
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, '初始化')
|
||||
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'
|
||||
})
|
||||
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, '取出的本地数据');
|
||||
key: "playData",
|
||||
success: function (res) {
|
||||
// 本地有播放数据就用本地的
|
||||
console.log(res.data, "取出的本地数据");
|
||||
if (res.data.myList.length <= 0) {
|
||||
store.commit('setUserInfo', {
|
||||
'playVisible': false
|
||||
})
|
||||
store.commit("setUserInfo", {
|
||||
playVisible: false,
|
||||
});
|
||||
} else {
|
||||
music.setList(res.data.myList, '', store.state.userInfo.playIndex)
|
||||
music.setList(res.data.myList, "", store.state.userInfo.playIndex);
|
||||
// music.setCoverImg(res.data.fengImg)
|
||||
store.commit('setUserInfo', res.data)
|
||||
store.commit("setUserInfo", res.data);
|
||||
}
|
||||
store.commit('setUserInfo', {
|
||||
'playFlag': false
|
||||
store.commit("setUserInfo", {
|
||||
playFlag: false,
|
||||
}); // 设置播放按钮状态为暂停
|
||||
store.commit('setUserInfo', {
|
||||
'currentTime': 0
|
||||
store.commit("setUserInfo", {
|
||||
currentTime: 0,
|
||||
});
|
||||
|
||||
},
|
||||
fail: function(e) { // 如果没有,就查询一下线上的播放记录
|
||||
console.log('本地无数据');
|
||||
music.setList([])
|
||||
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", {
|
||||
playVisible: false,
|
||||
});
|
||||
store.commit('setUserInfo', {
|
||||
'currentTime': 0
|
||||
store.commit("setUserInfo", {
|
||||
myList: [],
|
||||
fengImg: "../../static/icon/fengziIcon.jpg",
|
||||
});
|
||||
}
|
||||
store.commit("setUserInfo", {
|
||||
playFlag: false,
|
||||
});
|
||||
store.commit("setUserInfo", {
|
||||
currentTime: 0,
|
||||
});
|
||||
},
|
||||
});
|
||||
// end
|
||||
// 取出播放弹窗显示或者隐藏
|
||||
uni.getStorage({
|
||||
key: 'playVisible',
|
||||
key: "playVisible",
|
||||
success: function (res) {
|
||||
store.commit('setUserInfo', {
|
||||
'playVisible': res.data
|
||||
store.commit("setUserInfo", {
|
||||
playVisible: res.data,
|
||||
}); // 设置是否显示按钮
|
||||
},
|
||||
fail: function(e) { // 如果本地没有playVisible数据,默认为false
|
||||
store.commit('setUserInfo', {
|
||||
'playVisible': false
|
||||
fail: function (e) {
|
||||
// 如果本地没有playVisible数据,默认为false
|
||||
store.commit("setUserInfo", {
|
||||
playVisible: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
//取出缓存数据
|
||||
store.commit('setCacheData');
|
||||
store.commit("setCacheData");
|
||||
// #ifdef MP-WEIXIN
|
||||
if (store.state.userInfo.token) {
|
||||
socket.init();
|
||||
}
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
console.log(store.state)
|
||||
console.log(store.state);
|
||||
if (store.state.userInfo.token) {
|
||||
socket.init();
|
||||
} else {
|
||||
h5Login('force', () => {
|
||||
h5Login("force", () => {
|
||||
socket.init();
|
||||
});
|
||||
}
|
||||
@@ -150,11 +146,19 @@
|
||||
}
|
||||
// APPUpdate();
|
||||
// #endif
|
||||
|
||||
},
|
||||
onShow: function (e) {
|
||||
const interval = 1000 * 60 * 60 * 6; // 检查间隔,单位毫秒(此处为6小时)
|
||||
const currentTime = Date.now();
|
||||
|
||||
if (currentTime - this.lastCheckTime > interval) {
|
||||
this.lastCheckTime = currentTime; // 更新上一次检查时间
|
||||
updata();
|
||||
} else {
|
||||
console.log("距离上次检查时间过短,不重复检查");
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
// updata();
|
||||
|
||||
// 检测是否有未关闭苹果内购订单
|
||||
iap.getChannels();
|
||||
// console.log('引入了?');
|
||||
@@ -163,18 +167,18 @@
|
||||
// #ifdef MP-WEIXIN
|
||||
//获取二维码携带的参数
|
||||
let scene = decodeURIComponent(e.query.scene);
|
||||
scene = scene.split('&');
|
||||
scene = scene.split("&");
|
||||
let data = {
|
||||
//场景值
|
||||
scene: e.scene
|
||||
scene: e.scene,
|
||||
};
|
||||
scene.forEach(item => {
|
||||
let arr = item.split('=');
|
||||
scene.forEach((item) => {
|
||||
let arr = item.split("=");
|
||||
if (arr.length == 2) {
|
||||
data[arr[0]] = arr[1];
|
||||
}
|
||||
});
|
||||
store.commit('setChatScenesInfo', Object.assign(e.query, data));
|
||||
store.commit("setChatScenesInfo", Object.assign(e.query, data));
|
||||
//小程序更新
|
||||
if (uni.getUpdateManager) {
|
||||
const updateManager = uni.getUpdateManager();
|
||||
@@ -184,22 +188,22 @@
|
||||
});
|
||||
updateManager.onUpdateReady(function (res) {
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,是否重启应用?',
|
||||
title: "更新提示",
|
||||
content: "新版本已经准备好,是否重启应用?",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
updateManager.onUpdateFailed(function (res) {
|
||||
// 新的版本下载失败
|
||||
uni.showModal({
|
||||
title: '已经有新版本了哟~',
|
||||
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~',
|
||||
showCancel: false
|
||||
title: "已经有新版本了哟~",
|
||||
content: "新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~",
|
||||
showCancel: false,
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -207,21 +211,21 @@
|
||||
},
|
||||
onHide: function () {},
|
||||
destroyed() {
|
||||
store.commit('setUserInfo', {
|
||||
'playFlag': true
|
||||
})
|
||||
console.log('页面销毁')
|
||||
store.commit("setUserInfo", {
|
||||
playFlag: true,
|
||||
});
|
||||
console.log("页面销毁");
|
||||
},
|
||||
methods: {}
|
||||
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 "./style/common.scss";
|
||||
@import "./style/input.scss";
|
||||
@import "./style/table.scss";
|
||||
|
||||
page {
|
||||
height: 100%;
|
||||
@@ -238,14 +242,18 @@
|
||||
|
||||
/*每个页面公共css */
|
||||
@font-face {
|
||||
font-family: 'iconfont';
|
||||
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');
|
||||
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 {
|
||||
@@ -290,7 +298,6 @@
|
||||
border-radius: 100upx;
|
||||
}
|
||||
|
||||
|
||||
//设置背景色
|
||||
checkbox.checkedItem[checked] .wx-checkbox-input,
|
||||
checkbox.checkedItem .uni-checkbox-input-checked {
|
||||
|
||||
@@ -10,11 +10,13 @@ if (process.env.NODE_ENV === 'development') {
|
||||
// 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.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
|
||||
// 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
|
||||
|
||||
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>
|
||||
|
||||
@@ -5,18 +5,10 @@
|
||||
<view class="" style="">
|
||||
<view style="height: 60rpx"></view>
|
||||
<view class="icon_hua">
|
||||
<image
|
||||
src="../../static/icon/home_icon_1.png"
|
||||
mode="aspectFit"
|
||||
class="icon_hua_1"
|
||||
></image>
|
||||
<image src="../../static/icon/home_icon_1.png" mode="aspectFit" class="icon_hua_1"></image>
|
||||
</view>
|
||||
<view class="hehan">
|
||||
<image
|
||||
src="../../static/icon/hehan.png"
|
||||
mode="aspectFit"
|
||||
class="icon_hua_1"
|
||||
></image>
|
||||
<image src="../../static/icon/hehan.png" mode="aspectFit" class="icon_hua_1"></image>
|
||||
</view>
|
||||
|
||||
<view class="fiveIcon flexbox" style="justify-content: space-around">
|
||||
@@ -60,28 +52,18 @@
|
||||
<!-- <text>打 卡</text> -->
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="hn_cl_tit dianzishu"
|
||||
@click="onPageJump('../listen/home')"
|
||||
v-if="iosHidden"
|
||||
>
|
||||
<view class="hn_cl_tit dianzishu" @click="onPageJump('../listen/home')" v-if="iosHidden">
|
||||
<image src="../../static/icon/home2-1.png" mode="aspectFit"></image>
|
||||
<!-- <text>听 书</text> -->
|
||||
</view>
|
||||
|
||||
<!-- <view class="hn_cl_tit" @click="onPageJump('../bookShop/bookShopIndex')"> -->
|
||||
<view
|
||||
class="hn_cl_tit shuping"
|
||||
@click="onPageJump('../comments/commentsList')"
|
||||
>
|
||||
<view class="hn_cl_tit shuping" @click="onPageJump('../comments/commentsList')">
|
||||
<image src="../../static/icon/home3-1.png" mode="aspectFit"></image>
|
||||
<!-- <text>书 评</text> -->
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="hn_cl_tit chaoshi"
|
||||
@click="onPageJump('../talkBook/talkBook')"
|
||||
>
|
||||
<view class="hn_cl_tit chaoshi" @click="onPageJump('../talkBook/talkBook')">
|
||||
<image src="../../static/icon/home4-1.png" mode="aspectFit"></image>
|
||||
<!-- <text>讲 书</text> -->
|
||||
</view>
|
||||
@@ -166,20 +148,9 @@
|
||||
<u-icon name="volume-fill" color="#ff5500" size="26"></u-icon>
|
||||
</view>
|
||||
<view class="newscoll">
|
||||
<swiper
|
||||
class="swiper"
|
||||
interval="5000"
|
||||
circular
|
||||
autoplay
|
||||
vertical
|
||||
indicator-dots="false"
|
||||
>
|
||||
<swiper-item
|
||||
class="item"
|
||||
v-for="(item, index) in newsList"
|
||||
:key="index"
|
||||
@click="newsClick(item)"
|
||||
>
|
||||
<swiper class="swiper" interval="5000" circular autoplay vertical indicator-dots="false">
|
||||
<swiper-item class="item" v-for="(item, index) in newsList" :key="index"
|
||||
@click="newsClick(item)">
|
||||
<view class="swiper-item uni-bg-red">{{ item.title }}</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@@ -189,39 +160,17 @@
|
||||
<!-- 营销标签 -->
|
||||
<scroll-view class="yxTagBox" scroll-x="true">
|
||||
<view class="ProTabs flexbox">
|
||||
<text
|
||||
v-for="(item, index) in yingxiaoTags"
|
||||
:key="item.id"
|
||||
:class="[yxCurIndex == index ? 'cur' : '']"
|
||||
@click="yxTabsChange(item, index)"
|
||||
>{{ item.title }}</text
|
||||
>
|
||||
<text v-for="(item, index) in yingxiaoTags" :key="item.id" :class="[yxCurIndex == index ? 'cur' : '']"
|
||||
@click="yxTabsChange(item, index)">{{ item.title }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<view class="newBook">
|
||||
<scroll-view
|
||||
class="scroll-view_H"
|
||||
scroll-x="true"
|
||||
scroll-left="10"
|
||||
style="margin-top: 0 !important"
|
||||
>
|
||||
<view
|
||||
:class="['item']"
|
||||
v-for="(item, index) in YXBookList"
|
||||
:key="index"
|
||||
>
|
||||
<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="10" style="margin-top: 0 !important">
|
||||
<view :class="['item']" v-for="(item, index) in YXBookList" :key="index">
|
||||
<view class="videoBox" @click="goDetail(item.product_id)">
|
||||
<image
|
||||
v-if="item.product_images != ''"
|
||||
:src="item.product_images"
|
||||
mode="scaleToFill"
|
||||
></image>
|
||||
<image
|
||||
v-else
|
||||
src="../../static/icon/wufeng.jpg"
|
||||
mode="scaleToFill"
|
||||
></image>
|
||||
<image v-if="item.product_images != ''" :src="item.product_images" mode="scaleToFill"></image>
|
||||
<image v-else src="../../static/icon/wufeng.jpg" mode="scaleToFill"></image>
|
||||
</view>
|
||||
<text class="bookName">{{ item.product_name }}</text>
|
||||
</view>
|
||||
@@ -299,26 +248,14 @@
|
||||
|
||||
<scroll-view class="ProTabsBox">
|
||||
<view class="New_ProTabs flexbox">
|
||||
<text
|
||||
v-for="(item, index) in catTagList"
|
||||
:key="item.splId"
|
||||
:class="[tabsid == item.id ? 'cur' : '']"
|
||||
@click="tabsChange(item, index)"
|
||||
>{{ item.title }}</text
|
||||
>
|
||||
<text v-for="(item, index) in catTagList" :key="item.splId" :class="[tabsid == item.id ? 'cur' : '']"
|
||||
@click="tabsChange(item, index)">{{ item.title }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view
|
||||
class="children_cate_box"
|
||||
v-if="childrenCatList && childrenCatList.length > 0"
|
||||
>
|
||||
<view class="children_cate_box" v-if="childrenCatList && childrenCatList.length > 0">
|
||||
<view class="children_cate flexbox">
|
||||
<view
|
||||
@click="childrenChange(item, index)"
|
||||
:class="['item', curChildrenId == item.id ? 'cur' : '']"
|
||||
v-for="(item, index) in childrenCatList"
|
||||
:key="item.id"
|
||||
>
|
||||
<view @click="childrenChange(item, index)" :class="['item', curChildrenId == item.id ? 'cur' : '']"
|
||||
v-for="(item, index) in childrenCatList" :key="item.id">
|
||||
<text>{{ item.title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -329,41 +266,22 @@
|
||||
<view class="">
|
||||
<view v-if="tjProList.length > 0">
|
||||
<view class="flexbox" style="flex-wrap: wrap">
|
||||
<view
|
||||
class="goodsItem"
|
||||
v-for="(item, index) in tjProList"
|
||||
:key="index"
|
||||
@click="goDetail(item.product_id)"
|
||||
>
|
||||
<image
|
||||
:src="item.product_images"
|
||||
mode=""
|
||||
class="goodsImg"
|
||||
></image>
|
||||
<view class="goodsItem" v-for="(item, index) in tjProList" :key="index"
|
||||
@click="goDetail(item.product_id)">
|
||||
<image :src="item.product_images" mode="" class="goodsImg"></image>
|
||||
<view class="goodsContent">
|
||||
<view class="goodsName">
|
||||
{{ item.product_name }}
|
||||
</view>
|
||||
<view class="goodsPrice">
|
||||
<view
|
||||
style="display: flex; align-items: center"
|
||||
v-if="item.activity_price && item.activity_price > 0"
|
||||
>
|
||||
<span
|
||||
class="price"
|
||||
|
||||
>¥{{ item.activity_price }}</span
|
||||
>
|
||||
<span
|
||||
v-if="item.activity_price != item.price"
|
||||
class="Salesnum"
|
||||
style="
|
||||
<view style="display: flex; align-items: center"
|
||||
v-if="item.activity_price && item.activity_price > 0">
|
||||
<span class="price">¥{{ item.activity_price }}</span>
|
||||
<span v-if="item.activity_price != item.price" class="Salesnum" style="
|
||||
margin-left: 10rpx;
|
||||
margin-top: 2rpx;
|
||||
text-decoration: line-through;
|
||||
"
|
||||
>¥{{ item.price }}</span
|
||||
>
|
||||
">¥{{ item.price }}</span>
|
||||
</view>
|
||||
|
||||
<span class="price" v-else>¥{{ item.price }}</span>
|
||||
@@ -375,14 +293,12 @@
|
||||
<view class="">
|
||||
<view v-if="status == 0" style="text-align: center">
|
||||
<u-loading-icon style="display: inline-block"></u-loading-icon>
|
||||
<font
|
||||
style="
|
||||
<font style="
|
||||
vertical-align: super;
|
||||
margin-left: 10px;
|
||||
font-size: 26rpx;
|
||||
color: #909399;
|
||||
"
|
||||
>努力加载中
|
||||
">努力加载中
|
||||
</font>
|
||||
</view>
|
||||
<view v-if="status == 1">
|
||||
@@ -395,20 +311,12 @@
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<u-back-top
|
||||
:scroll-top="scrollTop"
|
||||
bottom="60"
|
||||
:customStyle="bgiStyle"
|
||||
:iconStyle="iconStyle"
|
||||
></u-back-top>
|
||||
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle="bgiStyle" :iconStyle="iconStyle"></u-back-top>
|
||||
</view>
|
||||
<view class="appJump">
|
||||
<view class="everhealth item flexbox" @click="appjumpfun('everhealth')">
|
||||
<view class="img">
|
||||
<image
|
||||
src="@/static/icon/ic_login_health.png"
|
||||
mode="widthFix"
|
||||
></image>
|
||||
<image src="@/static/icon/ic_login_health.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>一路健康</text>
|
||||
@@ -422,11 +330,20 @@
|
||||
<text>众妙之门</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zmzm item flexbox" @click="appjumpfun('wumen')">
|
||||
<view class="img">
|
||||
<image src="@/static/wumen40.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>吴门医述</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-navigation></z-navigation>
|
||||
<music-play :playList="myList"></music-play>
|
||||
<common-advertisement ref="commonAdvertisement" :list="advertisementList"></common-advertisement>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -437,11 +354,15 @@ import $http from "@/config/requestConfig.js";
|
||||
// #ifdef APP-PLUS
|
||||
import updata from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
|
||||
// #endif
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
myList: [],
|
||||
advertisementList: [],
|
||||
showEbook: false, // 显示电子书相关
|
||||
transaction: {
|
||||
// 成功回调
|
||||
@@ -484,8 +405,7 @@ export default {
|
||||
},
|
||||
tagList: [], // 推荐标签列表
|
||||
childrenCatList: [], // 二级分类
|
||||
wztaglist: [
|
||||
{
|
||||
wztaglist: [{
|
||||
splId: "-1",
|
||||
labelName: "全部",
|
||||
},
|
||||
@@ -498,8 +418,7 @@ export default {
|
||||
labelName: "哲学",
|
||||
},
|
||||
],
|
||||
yxtaglist: [
|
||||
{
|
||||
yxtaglist: [{
|
||||
splId: "0",
|
||||
labelName: "全部",
|
||||
},
|
||||
@@ -541,6 +460,12 @@ export default {
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
// this.requestIapOrder()
|
||||
this.$nextTick(()=>{
|
||||
|
||||
this.getAdvertisement()
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
onHide() {
|
||||
this.page = 1;
|
||||
@@ -619,6 +544,29 @@ export default {
|
||||
//方法
|
||||
methods: {
|
||||
...mapMutations(["setUserInfo"]),
|
||||
|
||||
async getAdvertisement() {
|
||||
await $http
|
||||
.request({
|
||||
url: "common/mainAd/getMainAd",
|
||||
method: "POST",
|
||||
data: {
|
||||
type: 0,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
console.log("res at line 61511111111111111:", res);
|
||||
if (res.code == 0 && res.list && res.list.length > 0) {
|
||||
this.advertisementList = res.list;
|
||||
|
||||
this.$refs.commonAdvertisement.open();
|
||||
}
|
||||
});
|
||||
},
|
||||
requestAll() {
|
||||
this.getUserInfo();
|
||||
this.tjProList = [];
|
||||
@@ -855,8 +803,7 @@ export default {
|
||||
let that = this;
|
||||
console.log("检测未完成订单");
|
||||
console.log(this.iapChannel, "this.iapChannel");
|
||||
this.iapChannel.restoreComplateRequest(
|
||||
{
|
||||
this.iapChannel.restoreComplateRequest({
|
||||
manualFinishTransaction: true,
|
||||
},
|
||||
function(results) {
|
||||
@@ -1032,8 +979,7 @@ export default {
|
||||
confirmText: "好的",
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
}
|
||||
if (res.confirm) {}
|
||||
},
|
||||
});
|
||||
return;
|
||||
@@ -1099,6 +1045,10 @@ export default {
|
||||
bagName = "cn.com.everhealth";
|
||||
schemes = "everhealth";
|
||||
}
|
||||
if (name == "wumen") {
|
||||
bagName = "com.cn.medicine";
|
||||
schemes = "medicine";
|
||||
}
|
||||
// if(name == 'everhealth'){
|
||||
if (plus.os.name == "Android") {
|
||||
//安卓
|
||||
@@ -1135,8 +1085,7 @@ export default {
|
||||
//苹果
|
||||
//因为ios查不到B款app在ios系统手机里面,其实下载了,也是检测不到,所以就不检测了
|
||||
//直接打开B款app,B款app没有的话,会进入回调报错,我们在回调去打开下载链接
|
||||
plus.runtime.launchApplication(
|
||||
{
|
||||
plus.runtime.launchApplication({
|
||||
action: "${schemes}://",
|
||||
},
|
||||
function(e) {
|
||||
@@ -1159,11 +1108,13 @@ export default {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.appJump {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 10%;
|
||||
z-index: 1;
|
||||
|
||||
.item {
|
||||
background: rgba(255, 255, 255, 0.6);
|
||||
margin-bottom: 40rpx;
|
||||
@@ -1172,13 +1123,16 @@ export default {
|
||||
padding-right: 10rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 50rpx 0 0 50rpx;
|
||||
|
||||
text {
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.img {
|
||||
// width: 60rpx; height: 60rpx;
|
||||
padding: 6rpx;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
@@ -1187,6 +1141,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.newsBox {
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
@@ -1196,11 +1151,13 @@ export default {
|
||||
padding: 10rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.content {
|
||||
image {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 44rpx;
|
||||
}
|
||||
@@ -1221,8 +1178,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.yxTagBox {
|
||||
}
|
||||
.yxTagBox {}
|
||||
|
||||
.children_cate_box {
|
||||
padding: 0 10px;
|
||||
|
||||
@@ -5,68 +5,112 @@
|
||||
<z-nav-bar title="充值"></z-nav-bar>
|
||||
<view class="cha_jine">
|
||||
<view class="cj_title">充值金额 </view>
|
||||
|
||||
<view class="cj_xiang">
|
||||
<view v-for="(item, index) in cjList" @click="chosPric(item)"
|
||||
:class="stepsCj.priceTypeId == item.priceTypeId?'Tab_cj cj_price':'cj_price'">
|
||||
<view class="pr_jg">¥{{item.realMoney}}</view>
|
||||
<view class="pr_yl">{{item.money}} 天医币</view>
|
||||
<view class="pr_lj">限时特惠</view>
|
||||
<view
|
||||
v-for="(item, index) in cjList"
|
||||
@click="chosPric(item)"
|
||||
:class="
|
||||
stepsCj.priceTypeId == item.priceTypeId
|
||||
? 'Tab_cj cj_price'
|
||||
: 'cj_price'
|
||||
"
|
||||
>
|
||||
<view
|
||||
class="pr_jg"
|
||||
style="display: flex; align-items: center; justify-content: center"
|
||||
>
|
||||
<image
|
||||
src="@/static/icon/currency.png"
|
||||
alt=""
|
||||
style="width: 40rpx; height: 40rpx; margin-right: 10rpx"
|
||||
/>
|
||||
{{ item.money }}
|
||||
</view>
|
||||
<br clear="both">
|
||||
<view class="pr_yl" style="color: #565455"
|
||||
>¥{{ item.realMoney }}</view
|
||||
>
|
||||
<view class="pr_lj" v-if="item.description&&item.description!=''"
|
||||
> {{item.description}}</view
|
||||
>
|
||||
|
||||
</view>
|
||||
<br clear="both" />
|
||||
</view>
|
||||
<view
|
||||
><text style="font-size: 24rpx; color: #8e8e8e; font-weight: 500"
|
||||
>说明 : 天医币属于虚拟产品,一经购买概不退还</text
|
||||
></view
|
||||
>
|
||||
</view>
|
||||
|
||||
<view class="cha_fangsh">
|
||||
<view class="cf_title">支付方式</view>
|
||||
<view class="cf_radio">
|
||||
<u-radio-group v-model="payType">
|
||||
|
||||
<view style="width: 100%;" v-if="isAndroid">
|
||||
<view v-for="(item, index) in paylist" @click="choseType(item.id)"
|
||||
:class="payType == item.id?'Tab_xf cf_xuanx':'cf_xuanx'">
|
||||
<view style="width: 100%" v-if="isAndroid">
|
||||
<view
|
||||
v-for="(item, index) in paylist"
|
||||
@click="choseType(item.id)"
|
||||
:class="payType == item.id ? 'Tab_xf cf_xuanx' : 'cf_xuanx'"
|
||||
>
|
||||
<image :src="item.img"></image>
|
||||
{{ item.title }}
|
||||
<u-radio :key="index" activeColor="#fe6e09" :name='item.id'
|
||||
style="float: right;margin-top: 5rpx;"></u-radio>
|
||||
|
||||
<u-radio
|
||||
:key="index"
|
||||
activeColor="#fe6e09"
|
||||
:name="item.id"
|
||||
style="float: right; margin-top: 5rpx"
|
||||
></u-radio>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="width: 100%;" v-else>
|
||||
<view v-for="(item, index) in iosPaylist" @click="choseType(item.id)"
|
||||
:class="payType == item.id?'Tab_xf cf_xuanx':'cf_xuanx'">
|
||||
<view style="width: 100%" v-else>
|
||||
<view
|
||||
v-for="(item, index) in iosPaylist"
|
||||
@click="choseType(item.id)"
|
||||
:class="payType == item.id ? 'Tab_xf cf_xuanx' : 'cf_xuanx'"
|
||||
>
|
||||
<image :src="item.img"></image>
|
||||
{{ item.title }}
|
||||
<u-radio :key="index" activeColor="#fe6e09" :name='item.id'
|
||||
style="float: right;margin-top: 5rpx;"></u-radio>
|
||||
|
||||
<u-radio
|
||||
:key="index"
|
||||
activeColor="#fe6e09"
|
||||
:name="item.id"
|
||||
style="float: right; margin-top: 5rpx"
|
||||
></u-radio>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="agree_wo flexbox" style="float: left; display: flex;">
|
||||
<view class="agree_wo flexbox" style="float: left; display: flex">
|
||||
<radio-group class="agree">
|
||||
<view v-for="(item, index) in argee" :key="index">
|
||||
<radio class="agreeRadio" :value="item.id" :checked="item.id==radioValue"
|
||||
@click="radioCheck(index)"></radio>
|
||||
|
||||
<radio
|
||||
class="agreeRadio"
|
||||
:value="item.id"
|
||||
:checked="item.id == radioValue"
|
||||
@click="radioCheck(index)"
|
||||
></radio>
|
||||
</view>
|
||||
</radio-group>
|
||||
<view>* 我已阅读并同意<span class="highlight" @click="showXieyi">《增值服务协议》</span></view>
|
||||
<view
|
||||
>* 我已阅读并同意<span class="highlight" @click="showXieyi"
|
||||
>《增值服务协议》</span
|
||||
></view
|
||||
>
|
||||
</view>
|
||||
<view class="char_btn">
|
||||
|
||||
<view @click="goToPay">立即充值</view>
|
||||
|
||||
<!-- <view @click="iosPay" >立即充值</view> -->
|
||||
|
||||
</view>
|
||||
<!-- 充值协议 -->
|
||||
<u-popup :show="xieyiShow" :round="10" @close="xieyiShow = false">
|
||||
<view class="tanchu">
|
||||
<view class="dp_title">{{ xieyi.title }}</view>
|
||||
<view style="max-height: 1000rpx;overflow-y: scroll;">
|
||||
<view style="max-height: 1000rpx; overflow-y: scroll">
|
||||
<view v-html="xieyi.content"></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -76,24 +120,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import musicPlay from '@/components/music.vue'
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
checkIapOrder
|
||||
} from '@/store/modules/common.js';
|
||||
import musicPlay from "@/components/music.vue";
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import { checkIapOrder } from "@/store/modules/common.js";
|
||||
// import { // 引入ios支付
|
||||
// Iap,
|
||||
// IapTransactionState
|
||||
// } from "@/utils/iap.js"
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
import {
|
||||
setPay,
|
||||
setPayAssign,
|
||||
setWXPay
|
||||
} from '@/config/utils';
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
import { setPay, setPayAssign, setWXPay } from "@/config/utils";
|
||||
// const IAPOrders = [ // 根据这些ids获取到苹果app内商品信息,这些ids就是你上面设置的产品id
|
||||
// 'add69'
|
||||
// ]
|
||||
@@ -102,56 +137,59 @@
|
||||
return {
|
||||
playData: {},
|
||||
xieyi: {
|
||||
title: '',
|
||||
content: ''
|
||||
title: "",
|
||||
content: "",
|
||||
},
|
||||
chargeOrderSn: '', // 通过query传过来的orderSN(二次支付情况)
|
||||
chargeOrderSn: "", // 通过query传过来的orderSN(二次支付情况)
|
||||
xieyiShow: false,
|
||||
stepsCj: {},
|
||||
cjList: [],
|
||||
argee: [{
|
||||
argee: [
|
||||
{
|
||||
value: false,
|
||||
id: '1'
|
||||
}
|
||||
|
||||
id: "1",
|
||||
},
|
||||
], // 同意权限
|
||||
radioValue: '',
|
||||
orderSn: '', // 订单sn
|
||||
productid: '',
|
||||
radioValue: "",
|
||||
orderSn: "", // 订单sn
|
||||
productid: "",
|
||||
isAndroid: true, // 是否为安卓环境
|
||||
|
||||
payType: null,
|
||||
// // #ifdef APP-IOS
|
||||
// payType: 3,
|
||||
// // #endif
|
||||
paylist: [{
|
||||
title: '支付宝',
|
||||
paylist: [
|
||||
{
|
||||
title: "支付宝",
|
||||
id: 2,
|
||||
img: '../../static/icon/pay_1.png'
|
||||
img: "../../static/icon/pay_1.png",
|
||||
},
|
||||
{
|
||||
title: '微信',
|
||||
title: "微信",
|
||||
id: 1,
|
||||
img: '../../static/icon/pay_2.png'
|
||||
}
|
||||
],
|
||||
iosPaylist: [{
|
||||
title: 'IAP支付',
|
||||
id: 3,
|
||||
img: '../../static/icon/pay_2.png'
|
||||
}],
|
||||
transaction: { // 成功回调
|
||||
|
||||
img: "../../static/icon/pay_2.png",
|
||||
},
|
||||
oprateOs:'',
|
||||
],
|
||||
iosPaylist: [
|
||||
{
|
||||
title: "IAP支付",
|
||||
id: 3,
|
||||
img: "../../static/icon/pay_2.png",
|
||||
},
|
||||
],
|
||||
transaction: {
|
||||
// 成功回调
|
||||
},
|
||||
oprateOs: "",
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
onLoad(e) {
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
this.chargeOrderSn = e.orderSn
|
||||
this.oprateOs = uni.getSystemInfoSync().platform
|
||||
this.chargeOrderSn = e.orderSn;
|
||||
this.oprateOs = uni.getSystemInfoSync().platform;
|
||||
// console.log(e.orderSn,'orderSn')
|
||||
},
|
||||
//页面显示
|
||||
@@ -159,7 +197,7 @@
|
||||
// 隐藏原生的tabbar
|
||||
// this.iphonepay()
|
||||
uni.hideTabBar();
|
||||
this.getDevName()
|
||||
this.getDevName();
|
||||
// setTimeout(()=>{
|
||||
// uni.navigateTo({
|
||||
// url:'/pages/user/persCount'
|
||||
@@ -167,136 +205,144 @@
|
||||
// },2000)
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
components: {
|
||||
musicPlay
|
||||
musicPlay,
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
...mapMutations(['setUserInfo']),
|
||||
...mapMutations(["setUserInfo"]),
|
||||
// 查询未关闭iap订单
|
||||
async restoreComplateRequest() {
|
||||
let that = this
|
||||
console.log('检测未完成订单')
|
||||
await this.iapChannel.restoreComplateRequest({
|
||||
manualFinishTransaction: true
|
||||
}, function(results) {
|
||||
let that = this;
|
||||
console.log("检测未完成订单");
|
||||
await this.iapChannel.restoreComplateRequest(
|
||||
{
|
||||
manualFinishTransaction: true,
|
||||
},
|
||||
function (results) {
|
||||
// console.log(that.checking)
|
||||
// results 格式为数组存放恢复的IAP商品交易信息对象 IAPTransaction,通用需将返回的支付凭证传给后端进行二次认证
|
||||
that.ComplateRequestArr = results
|
||||
console.log('未完成订单数组共有:=》',that.ComplateRequestArr.length )
|
||||
that.ComplateRequestArr = results;
|
||||
console.log(
|
||||
"未完成订单数组共有:=》",
|
||||
that.ComplateRequestArr.length
|
||||
);
|
||||
if (results && results.length > 0) {
|
||||
results.map((item, index) => {
|
||||
// "0"为正在支付;"1"为支付成功;"2"为支付失败;"3"为支付已恢复。
|
||||
if (item.transactionState == '1') {
|
||||
if (item.transactionState == "1") {
|
||||
// 已经支付,但是没有走逻辑的内购订单 就发给后台做验证
|
||||
that.iapCheck('未完成订单的验证',item, index)
|
||||
that.iapCheck("未完成订单的验证", item, index);
|
||||
// that.finishTransaction(item)
|
||||
} else if(item.transactionState != '1' || item.transactionState != '0') {
|
||||
} else if (
|
||||
item.transactionState != "1" ||
|
||||
item.transactionState != "0"
|
||||
) {
|
||||
// 不是正在支付订单,也不是已经支付订单就关闭掉
|
||||
// 其他状态的内购订单
|
||||
that.finishTransaction(item)
|
||||
that.finishTransaction(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
// }
|
||||
|
||||
},
|
||||
// 关闭交易订单
|
||||
finishTransaction(trans) {
|
||||
this.iapChannel.finishTransaction(trans, (success) => {
|
||||
console.log('关闭订单成功');
|
||||
this.iapChannel.finishTransaction(
|
||||
trans,
|
||||
(success) => {
|
||||
console.log("关闭订单成功");
|
||||
this.setUserInfo({
|
||||
restoreFlag: false
|
||||
});
|
||||
}, (fail) => {
|
||||
console.log('关闭订单失败');
|
||||
restoreFlag: false,
|
||||
});
|
||||
},
|
||||
(fail) => {
|
||||
console.log("关闭订单失败");
|
||||
}
|
||||
);
|
||||
},
|
||||
showXieyi() {
|
||||
this.$http
|
||||
.get(`sys/agreement/list?key=pay`)
|
||||
.then(res => {
|
||||
this.xieyi = res.page.list[0]
|
||||
this.xieyiShow = true
|
||||
})
|
||||
|
||||
this.$http.get(`sys/agreement/list?key=pay`).then((res) => {
|
||||
this.xieyi = res.page.list[0];
|
||||
this.xieyiShow = true;
|
||||
});
|
||||
},
|
||||
radioCheck(index) { // 勾选用户协议
|
||||
this.argee.forEach((item => {
|
||||
item.isCheck = false
|
||||
}))
|
||||
radioCheck(index) {
|
||||
// 勾选用户协议
|
||||
this.argee.forEach((item) => {
|
||||
item.isCheck = false;
|
||||
});
|
||||
if (this.radioValue == this.argee[index].id) {
|
||||
this.radioValue = null
|
||||
this.radioValue = null;
|
||||
} else {
|
||||
this.radioValue = this.argee[index].id
|
||||
this.radioValue = this.argee[index].id;
|
||||
}
|
||||
// console.log(this.radioValue)
|
||||
},
|
||||
getProvider() {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.getProvider({
|
||||
service: 'payment',
|
||||
service: "payment",
|
||||
success: (res) => {
|
||||
const iapChannel = res.providers.find((channel) => {
|
||||
return (channel.id === 'appleiap')
|
||||
})
|
||||
return channel.id === "appleiap";
|
||||
});
|
||||
resolve(iapChannel);
|
||||
// 如果 iapChannel 为 null,说明当前包没有包含iap支付模块。注意:HBuilder基座不包含 iap 通道
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
},
|
||||
requestPayment(orderInfo) {
|
||||
let that = this
|
||||
let that = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.requestPayment({
|
||||
provider: 'appleiap',
|
||||
provider: "appleiap",
|
||||
orderInfo: orderInfo,
|
||||
success: (res) => {
|
||||
that.iapCheck(res);
|
||||
resolve(res);
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading()
|
||||
uni.hideLoading();
|
||||
// console.log('其他支付错误', err);
|
||||
that.restoreComplateRequest()
|
||||
that.restoreComplateRequest();
|
||||
if (err.code == 2) {
|
||||
uni.showToast({
|
||||
title: '取消支付,内购订单即将关闭',
|
||||
icon: 'none'
|
||||
})
|
||||
title: "取消支付,内购订单即将关闭",
|
||||
icon: "none",
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '支付失败,内购订单即将关闭',
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
title: "支付失败,内购订单即将关闭",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
reject(err);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
},
|
||||
async iphonepay() {
|
||||
const that = this;
|
||||
uni.showLoading({
|
||||
title:"检测支付环境"
|
||||
})
|
||||
title: "检测支付环境",
|
||||
});
|
||||
console.log("检测支付环境...");
|
||||
this.iapChannel = await this.getProvider()
|
||||
console.log('that.iapChannel',this.iapChannel);
|
||||
this.iapChannel = await this.getProvider();
|
||||
console.log("that.iapChannel", this.iapChannel);
|
||||
if (this.iapChannel) {
|
||||
this.requestOrder();
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title:'不支持内购支付',
|
||||
icon:'none'
|
||||
})
|
||||
title: "不支持内购支付",
|
||||
icon: "none",
|
||||
});
|
||||
console.log("获取iap支付通道失败:" + e.message, that.iapChannel);
|
||||
}
|
||||
},
|
||||
@@ -309,7 +355,7 @@
|
||||
console.log(that.stepsCj.priceTypeId, 88888888);
|
||||
// ['xxxxx'] 是平台申请拿到的内购商品的id
|
||||
let IAPOrders = [];
|
||||
IAPOrders.push(that.stepsCj.priceTypeId+'');
|
||||
IAPOrders.push(that.stepsCj.priceTypeId + "");
|
||||
// console.log(IAPOrders, "IAPOrders");
|
||||
// 新建订单
|
||||
uni.showLoading({
|
||||
@@ -347,16 +393,16 @@
|
||||
username: that.orderSn, // 用户标识/订单标识
|
||||
quantity: 1,
|
||||
manualFinishTransaction: true, // 3.5.1+ 支持,设置此参数后需要开发者主动关闭订单,参见下面的关闭订单方法 finishTransaction()
|
||||
}
|
||||
this.transaction = await this.requestPayment(orderInfo)
|
||||
console.log('支付后的that.transaction',this.transaction);
|
||||
};
|
||||
this.transaction = await this.requestPayment(orderInfo);
|
||||
console.log("支付后的that.transaction", this.transaction);
|
||||
},
|
||||
iapCheck(result) {
|
||||
let that = this
|
||||
console.log('进入后台验证')
|
||||
let that = this;
|
||||
console.log("进入后台验证");
|
||||
uni.showLoading({
|
||||
title:'正在验证订单结果'
|
||||
})
|
||||
title: "正在验证订单结果",
|
||||
});
|
||||
let data = {
|
||||
transactionId: result.transactionIdentifier, // 支付交易id
|
||||
customerOid: that.userInfo.id,
|
||||
@@ -364,51 +410,55 @@
|
||||
orderId: result.payment.username, // 系统订单号
|
||||
receiptData: result.transactionReceipt, // 苹果返回收据
|
||||
// body: that.stepsCj.priceTypeId // 充值类型id
|
||||
}
|
||||
};
|
||||
console.log("提交给后台的数据", data);
|
||||
$http.request({
|
||||
$http
|
||||
.request({
|
||||
url: "/Ipa/veri",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data,
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(res => {
|
||||
})
|
||||
.then((res) => {
|
||||
// console.log(JSON.stringify(res))
|
||||
if (res.code == 0) {
|
||||
|
||||
uni.hideLoading()
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title:'充值成功!',
|
||||
icon:'success'
|
||||
})
|
||||
title: "充值成功!",
|
||||
icon: "success",
|
||||
});
|
||||
console.log("充值订单已处理,请留意账户金额变动....", res);
|
||||
that.finishTransaction(result);
|
||||
}
|
||||
}).catch(e => {
|
||||
uni.hideLoading()
|
||||
console.log('后台验证失败=>',e);
|
||||
})
|
||||
.catch((e) => {
|
||||
uni.hideLoading();
|
||||
console.log("后台验证失败=>", e);
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
showCancel: false,
|
||||
content: "支付验证失败,请稍后重启app,如不能解决您的问题,可联系官方客服",
|
||||
content:
|
||||
"支付验证失败,请稍后重启app,如不能解决您的问题,可联系官方客服",
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log("用户点击确定");
|
||||
}
|
||||
},
|
||||
});
|
||||
})
|
||||
});
|
||||
},
|
||||
getDevName() {
|
||||
// 获取使用环境
|
||||
if (uni.getSystemInfoSync().platform === 'android') {
|
||||
this.isAndroid = true
|
||||
this.payType = 1
|
||||
if (uni.getSystemInfoSync().platform === "android") {
|
||||
this.isAndroid = true;
|
||||
this.payType = 1;
|
||||
// console.log('运行Android上')
|
||||
} else {
|
||||
this.payType = 4
|
||||
this.isAndroid = false
|
||||
this.payType = 4;
|
||||
this.isAndroid = false;
|
||||
// console.log('运行iOS上')
|
||||
}
|
||||
this.getData();
|
||||
@@ -417,63 +467,64 @@
|
||||
getData() {
|
||||
// console.log(this.isAndroid)
|
||||
if (this.isAndroid) {
|
||||
this.getAndorList()
|
||||
this.getAndorList();
|
||||
} else {
|
||||
this.getAppleList()
|
||||
this.getAppleList();
|
||||
}
|
||||
|
||||
},
|
||||
// 安卓充值列表
|
||||
getAndorList() {
|
||||
this.$http
|
||||
.post('book/bookbuyconfig/getVipOrPoint', {
|
||||
type: 'point',
|
||||
qudao: 'Android'
|
||||
.post("book/bookbuyconfig/getVipOrPoint", {
|
||||
type: "point",
|
||||
qudao: "Android",
|
||||
})
|
||||
.then(res => {
|
||||
this.cjList = res.list
|
||||
this.stepsCj = res.list[0]
|
||||
.then((res) => {
|
||||
this.cjList = res.list;
|
||||
console.log(this.cjList, "充值列表");
|
||||
this.stepsCj = res.list[0];
|
||||
});
|
||||
},
|
||||
// 苹果充值列表
|
||||
getAppleList() {
|
||||
this.$http
|
||||
.post('book/bookbuyconfig/getVipOrPoint', {
|
||||
type: 'point',
|
||||
qudao: 'IOS'
|
||||
.post("book/bookbuyconfig/getVipOrPoint", {
|
||||
type: "point",
|
||||
qudao: "IOS",
|
||||
})
|
||||
.then(res => {
|
||||
this.cjList = res.list
|
||||
this.stepsCj = res.list[0]
|
||||
.then((res) => {
|
||||
this.cjList = res.list;
|
||||
this.stepsCj = res.list[0];
|
||||
});
|
||||
},
|
||||
// 点击充值金额
|
||||
chosPric(e) {
|
||||
this.stepsCj = e
|
||||
console.log(e)
|
||||
this.stepsCj = e;
|
||||
console.log(e);
|
||||
},
|
||||
|
||||
// 选择支付方式1
|
||||
choseType(e) {
|
||||
let that = this
|
||||
that.payType = e
|
||||
let that = this;
|
||||
that.payType = e;
|
||||
},
|
||||
//ios充值
|
||||
iosPay() {
|
||||
this.iphonepay()
|
||||
this.iphonepay();
|
||||
},
|
||||
// 充值
|
||||
goToPay() {
|
||||
this.kaiChar()
|
||||
this.kaiChar();
|
||||
},
|
||||
// 正常充值
|
||||
kaiChar() { // 常规充值
|
||||
if (this.radioValue == '1') {
|
||||
kaiChar() {
|
||||
// 常规充值
|
||||
if (this.radioValue == "1") {
|
||||
uni.showLoading({
|
||||
title: '支付中,请勿离开',
|
||||
icon: 'loading'
|
||||
})
|
||||
let that = this
|
||||
title: "支付中,请勿离开",
|
||||
icon: "loading",
|
||||
});
|
||||
let that = this;
|
||||
let data = {
|
||||
userId: that.userInfo.id, //下单人ID
|
||||
userPhone: that.userInfo.tel, //收货人手机号
|
||||
@@ -485,133 +536,133 @@
|
||||
orderType: "point", //订单类型
|
||||
// appName: "",
|
||||
come: 0,
|
||||
productId: that.stepsCj.priceTypeId // 充值的类型id
|
||||
}
|
||||
$http.request({
|
||||
productId: that.stepsCj.priceTypeId, // 充值的类型id
|
||||
};
|
||||
$http
|
||||
.request({
|
||||
url: "book/buyOrder/rechargeSave",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data,
|
||||
header: { //默认 无 说明:请求头1
|
||||
'Content-Type': 'application/json'
|
||||
header: {
|
||||
//默认 无 说明:请求头1
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(res => {
|
||||
that.orderSn = res.orderSn
|
||||
})
|
||||
.then((res) => {
|
||||
that.orderSn = res.orderSn;
|
||||
// uni.hideLoading()
|
||||
if (res.code == 0) {
|
||||
if (that.payType == 2) {
|
||||
setPay({
|
||||
typePay: 'alipay',
|
||||
subject: 'point',
|
||||
setPay(
|
||||
{
|
||||
typePay: "alipay",
|
||||
subject: "point",
|
||||
totalAmount: that.stepsCj.money,
|
||||
type: that.payType,
|
||||
relevanceoid: res.orderSn,
|
||||
body: that.stepsCj.priceTypeId,
|
||||
}, res => {
|
||||
},
|
||||
(res) => {
|
||||
if (res.success) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "支付成功"
|
||||
title: "支付成功",
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/persCount'
|
||||
})
|
||||
}, 2000)
|
||||
url: "/pages/user/persCount",
|
||||
});
|
||||
}, 2000);
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "支付失败",
|
||||
icon: "none",
|
||||
image: '../../static/icon/ic_close.png'
|
||||
image: "../../static/icon/ic_close.png",
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
);
|
||||
} else if (that.payType == 1) {
|
||||
// 微信支付
|
||||
that.orderSn = res.orderSn
|
||||
that.orderSn = res.orderSn;
|
||||
let data1 = {
|
||||
orderSn: that.orderSn,
|
||||
buyOrderId: that.stepsCj.priceTypeId,
|
||||
totalAmount: that.stepsCj.money
|
||||
}
|
||||
console.log(data1, 'data1')
|
||||
totalAmount: that.stepsCj.money,
|
||||
};
|
||||
console.log(data1, "data1");
|
||||
// console.log(this.userInfo.channelList,'channelList')
|
||||
// this.userInfo.channelList.map(item => {
|
||||
// if(item.id == "wxpay"){
|
||||
// console.log('支持微信支付')
|
||||
setWXPay(data1, res => {
|
||||
setWXPay(data1, (res) => {
|
||||
if (res.success) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "支付成功"
|
||||
title: "支付成功",
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/persCount'
|
||||
})
|
||||
}, 2000)
|
||||
url: "/pages/user/persCount",
|
||||
});
|
||||
}, 2000);
|
||||
} else {
|
||||
console.log(res)
|
||||
console.log(res);
|
||||
uni.hideLoading();
|
||||
if (res.data.errMsg.indexOf('User canceled') != -1) {
|
||||
if (res.data.errMsg.indexOf("User canceled") != -1) {
|
||||
uni.showToast({
|
||||
title: "用户取消支付",
|
||||
icon: "none",
|
||||
image: '../../static/icon/ic_close.png'
|
||||
image: "../../static/icon/ic_close.png",
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "支付失败",
|
||||
icon: "none",
|
||||
image: '../../static/icon/ic_close.png'
|
||||
image: "../../static/icon/ic_close.png",
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
// }
|
||||
// })
|
||||
|
||||
} else if (that.payType == 3) {
|
||||
console.log('苹果支付', )
|
||||
that.iosPay()
|
||||
console.log("苹果支付");
|
||||
that.iosPay();
|
||||
}
|
||||
}
|
||||
}).catch(e => {
|
||||
})
|
||||
.catch((e) => {
|
||||
uni.showToast({
|
||||
title: "系统下单失败",
|
||||
icon: "none",
|
||||
});
|
||||
})
|
||||
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请勾选 已阅读会员服务协议',
|
||||
icon: 'none'
|
||||
})
|
||||
return false
|
||||
title: "请勾选 已阅读会员服务协议",
|
||||
icon: "none",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// 跳转
|
||||
onPageJump(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
url: url,
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.tanchu {
|
||||
padding: 40rpx 30rpx 40rpx 30rpx;
|
||||
position: relative;
|
||||
|
||||
|
||||
.dp_title {
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 50rpx;
|
||||
@@ -676,7 +727,6 @@
|
||||
margin: 0 0 0 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.chooseCheck {
|
||||
position: absolute;
|
||||
top: 3rpx;
|
||||
@@ -690,7 +740,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.addressItem.addItem_style {
|
||||
border-color: #fd6004;
|
||||
}
|
||||
@@ -717,11 +766,11 @@
|
||||
}
|
||||
|
||||
.agreeRadio {
|
||||
zoom: .8;
|
||||
zoom: 0.8;
|
||||
}
|
||||
|
||||
.cha_jine {
|
||||
margin: 40rpx 50rpx 0 50rpx;
|
||||
margin: 40rpx 30rpx 0 30rpx;
|
||||
|
||||
.cj_title {
|
||||
font-size: 36rpx;
|
||||
@@ -729,52 +778,58 @@
|
||||
}
|
||||
|
||||
.cj_xiang {
|
||||
margin-top: 50rpx;
|
||||
margin-top: 40rpx;
|
||||
|
||||
.cj_price {
|
||||
box-shadow: 0 0 20rpx 0 #0000001a;
|
||||
border: 4rpx solid #ebebeb;
|
||||
// box-shadow: 0 0 20rpx 0 #0000001a;
|
||||
float: left;
|
||||
width: 47%;
|
||||
margin: 0 30rpx 30rpx 0;
|
||||
width: 31%;
|
||||
margin: 0 3% 30rpx 0;
|
||||
text-align: center;
|
||||
padding: 25rpx 0 30rpx 0;
|
||||
border-radius: 20rpx;
|
||||
border-radius: 15rpx;
|
||||
position: relative;
|
||||
color: #2d2d2d;
|
||||
|
||||
.pr_jg {
|
||||
font-size: 45rpx;
|
||||
margin: 20rpx 0 10rpx 0;
|
||||
font-size: 38rpx;
|
||||
margin: 0rpx 0 10rpx 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.pr_yl {
|
||||
font-size: 30rpx;
|
||||
font-size: 28rpx;
|
||||
// text-decoration: line-through;
|
||||
color: #b1b1b1;
|
||||
color: #8d8f8e;
|
||||
}
|
||||
|
||||
.pr_lj {
|
||||
background-image: linear-gradient(90deg, #fe6e09 0%, #efa574 100%);
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: -10rpx;
|
||||
right: 0;
|
||||
top: -22rpx;
|
||||
right: -22rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 5rpx 10rpx;
|
||||
padding: 5rpx 4rpx;
|
||||
border-top-left-radius: 20rpx;
|
||||
border-bottom-right-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cj_price:nth-child(2n) {
|
||||
.cj_price:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.Tab_cj {
|
||||
box-shadow: 0 0 20rpx 0 #fe700bcc;
|
||||
border: 4rpx solid #fe700bcc;
|
||||
color: #7b4c0a;
|
||||
background: #fff9f5cc;
|
||||
|
||||
.pr_yl {
|
||||
color: #7b4c0a !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -812,11 +867,7 @@
|
||||
.Tab_xf {
|
||||
background-color: #fdf1e9cc;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.agree_wo {
|
||||
|
||||
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