广告显示

This commit is contained in:
2024-11-25 13:13:42 +08:00
parent 0b975c2418
commit 0ad2bb2b93
515 changed files with 256872 additions and 2253 deletions

View File

@@ -79,7 +79,7 @@
<view class="book_content">
<view class="book_name">{{ v.productName }}</view>
<view class="bottom">
<!-- <view class="bottom">
<view class="book_price">
<view class="book_price_current">
<text class="price_icon"></text>
@@ -92,7 +92,7 @@
>
</view>
<view class="sumSales">已售{{ v.sumSales }}</view>
</view>
</view> -->
</view>
</view>
</scroll-view>
@@ -697,7 +697,7 @@ function calcTimer(timer) {
.book_name {
font-family: MicrosoftYaHei;
font-weight: 600;
font-size: 24rpx;
font-size: 26rpx;
line-height: 24rpx;
height: 50rpx;
color: #020001;

View File

@@ -1,7 +1,4 @@
<template><page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<template><page-meta :page-font-size="$baseFontSize() + 'px'" :root-font-size="$baseFontSize() + 'px'"></page-meta>
<view class="container commonPageBox commonDetailPage" style="background-color: #f2f2f2">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
@@ -100,7 +97,7 @@
</view> -->
<view class="btns flexbox">
<view class="booknameleft"> 充值 {{
slotProps.row.bookBuyConfigEntity.money
slotProps.row.bookBuyConfigEntity? slotProps.row.bookBuyConfigEntity.money:""
}}天医币</view>
<view style="
@@ -491,15 +488,18 @@
uni.stopPullDownRefresh();
this.newestpage = 1;
this.pagination.page = 1
// this.hotestpage = 1
// this.booksetpage = 1
this.newList = [];
// this.hotList = []
// this.bookList = []
this.getBookList(this.ordersListTab, false);
},
onReachBottom() {
this.newestpage++;
this.pagination.page++
// this.hotestpage++
// this.booksetpage++
this.getBookList(this.ordersListTab, false);
@@ -700,6 +700,8 @@
// limit: 10,
// page: this.newestpage,
};
console.log('1111111111111传参数', params)
this.$http
.request({
url: "common/buyOrder/commonBuyOrderList",
@@ -839,6 +841,7 @@
// });
this.newestpage = 1;
this.pagination.page = 1
this.newList = [];
this.getBookList(this.ordersListTab, false);
}
@@ -926,6 +929,7 @@
duration: 1000,
});
this.newestpage = 1;
this.pagination.page = 1
this.newList = [];
this.getBookList(this.ordersListTab, false);
}

View File

@@ -0,0 +1,249 @@
<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/goods/index/index?navTitle=''&isMiaosha=0&title=''&id=${v.shopProduct.productId}`,
});
}
}
}
if (v.type == 1) {
uni.navigateTo({
url: `/pages/mine/wallet/recharge/index`,
});
}
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>

View File

@@ -1,7 +1,8 @@
<template><page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<template>
<page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<view
class="container playerBox"
id="playerBox"
@@ -50,7 +51,7 @@
right: 0;
bottom: 0;
border-radius: 40rpx;
border: 15rpx solid #000;
border: 15rpx solid #000;
padding: 40rpx 0 20rpx;
box-sizing: border-box;
background-size: cover;
@@ -1057,11 +1058,12 @@ export default {
console.log('vm at line 926:', newValue, oldValue, ownerVm, vm)
if (newValue != null) {
if (this.platform == "ios") {
this.player.one("canplay", () => {
this.player.seek(newValue);
});
player.seek(newValue);
} else {
this.player.seek(newValue);
player.seek(newValue);
}
this.curTime = newValue
}
@@ -1069,12 +1071,11 @@ export default {
receiveMsgjumpNumber(newValue, oldValue, ownerVm, vm) {
console.log('vm at line 926:', newValue, oldValue, ownerVm, vm)
if (newValue != 0) {
if (this.platform == "ios") {
this.player.one("canplay", () => {
this.player.seek(newValue);
});
player.seek(newValue);
} else {
this.player.seek(newValue);
player.seek(newValue);
}
this.curTime = newValue
}

View File

@@ -1,620 +0,0 @@
<template>
<!--音频组件-->
<view
class="boxShadow"
style="
width: 100%;
border-radius: 40rpx;
height: 100%;
padding: 40rpx 0;
box-sizing: border-box;
background-image: linear-gradient(80deg, #959698 0%, #808183 100%);
"
>
<view class="bgfff">
<view>
<slot name="title"></slot>
<view class="audo-video">
<view class="slider-box">
<text class="mm">{{ timer }}</text>
<slider
style="width: 440rpx"
@change="sliderChange"
@changing="sliderChanging"
class="audio-slider"
block-size="16"
:min="0"
:max="duration"
:value="currentTime"
activeColor="#FF8849"
@touchstart="lock = true"
@touchend="lock = false"
/>
<text class="ss" v-if="overTimer != 'NaN:NaN'">{{
overTimer
}}</text>
<text class="ss" v-else>00.00</text>
</view>
<!--音频播放按钮处-->
<view class="audo-top">
<!--上一首-->
<!-- <image
src="./icon/xys.png"
style="width: 40rpx; height: 40rpx; transform: rotate(180deg)"
mode="aspectFill"
@click="upper(1)"
></image> -->
<!--上一首-->
<!--快退-->
<image
src="./icon/kt.png"
style="width: 40rpx; height: 40rpx"
mode="widthFix"
@click="jump('kt')"
></image>
<!--快退-->
<!--播放-->
<image
src="./icon/kt.png"
style="width: 100rpx; height: 100rpx"
mode="widthFix"
@click="plays()"
></image>
<!--播放-->
<!--快进-->
<image
src="./icon/kj.png"
style="width: 40rpx; height: 40rpx"
mode="widthFix"
@click="jump('kj')"
></image>
<!--快进-->
<!--下一首-->
<!-- <image
src="./icon/xys.png"
style="width: 40rpx; height: 40rpx"
mode="aspectFill"
@click="upper(2)"
></image> -->
<!--下一首-->
<view class="audo-a" style="">
<!--进度条-->
<!--进度条-->
<!--倍数-->
<view
class="beishu"
style="border: 1rpx solid #e1dbf2"
@click="beishu"
>{{ BsNav[bsindex].bs }} X
</view>
<view class="absolute" style="right: 0; top: 80rpx" v-if="shows">
<!-- <u-transition :show="show" mode="slide-right" duration="300"> -->
<view
class="beishu-a"
style="border: 1rpx solid #fff"
v-if="show"
>
<view
v-for="(item, index) in BsNav"
:key="index"
@click="setRate(index, item)"
class="title beishuItem"
:style="{ color: bsid == item.id ? '#9461EB' : '' }"
>
{{ item.bs }} X
</view>
</view>
<!-- </u-transition> -->
</view>
<!--倍数-->
</view>
</view>
<!--音频播放按钮处-->
<!--音频api处[视频代替音频-实现倍数功能]-->
<video
id="myVideo"
ref="myVideo"
:src="recorPath"
preload="metadata"
@timeupdate="timeupdate"
:autoplay="autoplays"
@loadedmetadata="loadedmetadata"
@ended="next"
controls
style="width: 400rpx; height: 80rpx"
></video>
<!--音频api处[视频代替音频-实现倍数功能]-->
</view>
</view>
</view>
<!--占位-->
</view>
<!--音频组件 wx:cxalq8-24 Author:chenxin-->
</template>
<script>
/*
list -- 音频数据: 数组格式/不传无法播放
Seconds -- 快进快退秒数: 默认15秒
autoNext -- 是否自动播放下一首
autoplays -- 进入页面是否自动播放 - 默认false
slideYes -- 滑动进度条时是否开启播放 - 默认false
switAud -- 切换上下音频是否开启播放 - 默认true
BsNav -- 倍数数据传入/数组形式
图片功能样式,如想改动请在组件内部修改,页面中已注释 -- 逻辑根据自己需求改
目前只测试 微信小程序和H5和APP -- 其他平台未知
[Author:chenxin 交流vx:cxalq8-24]
*/
export default {
name: "cx-audio-play",
props: {
list: {
//音频数据
Type: Array,
default: () => [],
},
Seconds: {
//快进快退 - 秒数
Type: Number,
default: 15,
},
firstTime: {
//快进快退 - 秒数
Type: Number,
default: 0,
},
autoNext: {
//是否自动播放下一首
Type: Boolean,
default: false,
},
autoplays: {
//是否开启自动播放
Type: Boolean,
default: false,
},
slideYes: {
//滑动进度条 - 是否开启播放
Type: Boolean,
default: false,
},
switAud: {
Type: Boolean, //切换上下音频 - 是否开启播放
default: true,
},
BsNav: {
//倍数-传入
Type: Array,
default: () => [
{
id: 1.0,
bs: "1.0",
},
{
id: 1.5,
bs: "1.5",
},
{
id: 2.0,
bs: "2.0",
},
],
},
},
data() {
return {
shows: false, //倍数弹框
show: true, //倍数弹框动画默认开启
succes: false, //播放按钮
bsid: "", //倍数默认显示第一个
bsindex: 0, //倍数默认显示第一个
num: 0,
current: 0, //当前选中的索引
recorPath: "", //音频播放地址
lock: false, // 锁
currentTime: 0, //当前进度
duration: 0, // 总进度
videoContext: null,
loading: true, //锁 加载
curTime: null, //锁 加载
};
},
onReady() {},
onShow() {},
mounted() {
//初始化音频api
},
updated() {},
onLoad() {},
onHide() {
//监听页面离开 - 销毁音频
this.stop_();
this.$emit("curTime", this.curTime);
},
onUnload() {
//监听页面卸载 - 销毁音频
this.stop_();
this.$emit("curTime", this.curTime);
},
destroyed() {
// this.innerAudioContext.stop();
},
computed: {
timer() {
this.curTime = this.currentTime.toFixed(0);
return calcTimer(this.currentTime);
},
overTimer() {
return calcTimer(this.duration);
},
},
methods: {
init() {
this.currentTime = this.firstTime;
this.videoContext = uni.createVideoContext("myVideo", this);
//默认播放第一个
if (this.list.length != 0) {
this.recorPath = this.list[0];
if (this.autoplays) {
this.succes = true;
}
} else {
this.duration = 0;
}
//倍数默认选择第一个
if (this.BsNav.length != 0) {
this.bsid = this.BsNav[0].id;
this.playbackRate(); //倍数
}
},
//没有音频数据
noUrl() {
if (this.list.length == 0) {
uni.showToast({
title: "请先传入音频数据哦~",
icon: "none",
});
return false;
}
return true;
},
//播放暂停
plays() {
if (!this.noUrl()) {
return;
}
this.playLoading();
this.succes = !this.succes;
this.succes ? this.play_() : this.pause_();
},
//上下首切换
upper(num) {
if (!this.noUrl()) {
return;
}
let that = this;
if (num == 1) {
//上一首
if (this.num == 0) {
this.upperToast(num); //提示
return;
}
this.num -= 1;
} else {
//下一首
if (this.num + 1 == this.list.length) {
this.upperToast(num); //提示
return;
}
this.num += 1;
}
this.recorPath = this.list[this.num];
if (this.switAud) {
// 切换时是否开启播放
this.succes = true;
this.play_();
} else {
this.succes = false;
}
this.playbackRate(); //倍数
console.log("当前音频:", this.recorPath);
},
//快进快退
jump(e) {
if (!this.noUrl()) {
return;
}
var num;
if (e == "kt") {
num = (this.currentTime - Math.floor(this.Seconds % 60)).toFixed(0); //当前时间-15秒
} else {
num = (this.currentTime + Math.floor(this.Seconds % 60)).toFixed(0); //当前时间+15秒
}
this.seek(num);
},
seek(num) {
this.$nextTick(() => {
//#ifdef H5
this.$refs.myVideo.seek(num);
//#endif
//#ifndef H5
this.videoContext.seek(num);
//#endif
});
},
//倍速弹框
beishu() {
this.shows = !this.shows;
},
// 倍速
setRate(index, item) {
this.bsid = item.id;
this.bsindex = index;
this.shows = false;
this.playbackRate();
},
// 更新进度条
timeupdate(event) {
if (this.lock) return; // 锁
var currentTime, duration;
if (event.detail.detail) {
currentTime = event.detail.detail.currentTime;
duration = event.detail.detail.duration;
} else {
currentTime = event.detail.currentTime;
duration = event.detail.duration;
}
this.currentTime = currentTime;
console.log("this.currentTime at line 當前386:", this.currentTime);
this.duration = duration;
console.log("this.duration at line 總時長388:", this.duration);
},
// 拖动进度条
sliderChange(data) {
if (!this.noUrl()) {
return;
}
//此处滑动进度条--开始播放
if (this.slideYes && !this.succes) {
this.play_();
this.succes = true;
}
//#ifdef H5
this.$refs.myVideo.seek(data.detail.value); //获取秒数
//#endif
//#ifndef H5
this.videoContext.seek(data.detail.value); //获取秒数
//#endif
},
//拖动中
sliderChanging(data) {
if (data.detail.value == 0) {
this.succes = false;
this.pause_();
}
this.currentTime = data.detail.value;
},
// 视频加载完成
loadedmetadata(data) {
console.log("data at line zh:", data);
this.duration = data.detail.duration;
// this.seek(this.firstTime);
// this.curTime = this.currentTime
},
//音频结束触发
next(data) {
this.succes = false;
if (this.autoNext) {
//自动播放下一首
this.upper(2);
}
},
// 各平台播放_暂停
play_() {
this.$nextTick(() => {
//#ifdef H5
this.$refs.myVideo.play();
//#endif
//#ifndef H5
this.videoContext.play();
//#endif
});
},
pause_() {
this.$nextTick(() => {
//#ifdef H5
this.$refs.myVideo.pause();
//#endif
//#ifndef H5
this.videoContext.pause();
//#endif
});
},
//离开页面暂停播放
stop_() {
this.$nextTick(() => {
//#ifdef H5
this.$refs.myVideo.stop();
//#endif
//#ifndef H5
this.videoContext.stop();
//#endif
});
},
//提示
upperToast(num) {
num == 1
? uni.showToast({
title: "到头了~",
icon: "none",
})
: uni.showToast({
title: "没有更多了~",
icon: "none",
});
},
//音频倍数
playbackRate() {
this.$nextTick(() => {
//#ifdef H5
this.$refs.myVideo.playbackRate(this.bsid);
//#endif
//#ifndef H5
this.videoContext.playbackRate(this.bsid);
//#endif
});
},
//加载框--封
playLoading() {
if (this.loading && !this.succes) {
uni.showLoading({
title: "音频加载中...",
});
this.loading = false;
}
setTimeout(() => {
uni.hideLoading();
}, 1500);
},
},
watch: {
//播放器当前播放进度
curTime(val) {
if (this.curTime !== null) {
console.log("timer at line 495:", this.curTime);
this.$emit("curTime", this.curTime);
}
},
},
};
//时间换算
function calcTimer(timer) {
if (timer === 0 || typeof timer !== "number") {
return "00:00";
}
let mm = Math.floor(timer / 60);
let ss = Math.floor(timer % 60);
if (mm < 10) {
mm = "0" + mm;
}
if (ss < 10) {
ss = "0" + ss;
}
return mm + ":" + ss;
}
</script>
<style lang="scss" scoped>
page {
background-color: #f8f8f8;
}
/* #video {
width: 100%;
} */
.audo-video {
margin-top: 0rpx;
color: #fff;
.beishuItem {
color: #999;
}
}
.slider-box {
display: flex;
align-items: center;
justify-content: center;
font-size: 27rpx;
// color: #fff;
}
button {
display: inline-block;
width: 100rpx;
background-color: #fff;
font-size: 24rpx;
color: #000;
padding: 0;
}
.hidden {
position: fixed;
top: 0;
left: -10rpx;
z-index: -1;
width: 1rpx;
height: 1rpx;
}
.audo-top {
padding: 20rpx 0;
display: flex;
justify-content: space-around;
align-items: center;
image {
width: 45rpx;
height: 45rpx;
}
}
.audo-a {
display: flex;
justify-content: space-between;
align-items: center;
width: auto;
position: relative;
z-index: 9;
margin-right: -20rpx;
}
.beishu {
position: relative;
width: 100rpx;
padding-top: 5rpx;
padding-bottom: 5rpx;
text-align: center;
border-radius: 25rpx;
font-size: 28rpx;
}
.absolute {
position: absolute;
.beishu-a {
width: 200rpx;
border-radius: 20rpx;
text-align: center;
line-height: 90rpx;
background: #fff;
.title {
pdding-left: 30rpx;
}
}
}
</style>

View File

@@ -348,12 +348,9 @@ export default {
},
seek(num) {
this.$nextTick(() => {
//#ifdef H5
this.$refs.myVideo.seek(num);
//#endif
//#ifndef H5
this.videoContext.seek(num);
//#endif
});
},
@@ -396,12 +393,12 @@ export default {
this.play_();
this.succes = true;
}
//#ifdef H5
this.$refs.myVideo.seek(data.detail.value); //获取秒数
//#endif
//#ifndef H5
this.videoContext.seek(data.detail.value); //获取秒数
//#endif
this.$nextTick(()=>{
this.$refs.myVideo.seek(data.detail.value); //获取秒数
})
},
//拖动中

View File

@@ -24,7 +24,7 @@
left: 0;
width: 100%;
z-index: 10; */
" type="warning" @click="handleClickGetVip" :title="goBuyTitle" :show-icon="true">
" type="warning" @click="$platform == 'android'?handleClickGetVip:''" :title="goBuyTitle" :show-icon="true">
<template slot="rightSlot" slot-scope="slotProps" v-if="$platform == 'android'">
<text class="saveBtn vipBtn flexbox buyBtn" v-if="goBuyType == 0">
立即购买

File diff suppressed because it is too large Load Diff

View File

@@ -1747,7 +1747,7 @@
}
.price_left {
width: calc(100% - 300rpx);
width: calc(100% - 340rpx);
float: left;
}
@@ -1789,7 +1789,7 @@
}
.xianshimaiosha_box {
width: 300rpx;
width: 340rpx;
height: 100%;
float: right;
}

View File

@@ -351,15 +351,15 @@
handler(newRoute) {
if (this.isDefaultCurrency) {
if (platform == "ios") {
this.selectPayIndex = 2;
this.selectPayIndex = 0;
} else {
this.selectPayIndex = 2;
this.selectPayIndex = 0;
}
} else {
if (platform == "ios") {
this.selectPayIndex = 1;
this.selectPayIndex = 0;
} else {
this.selectPayIndex = 1;
this.selectPayIndex = 0;
}
}
this.payType = this.payList[this.selectPayIndex].type;
@@ -388,25 +388,7 @@
},
selectPayIndex: 1,
farePrice: 0,
payList: [{
text: "支付宝",
imgUrl: require("@/static/icon/pay_1.png"),
type: 2,
value: "0",
},
{
text: "微信",
imgUrl: require("@/static/icon/pay_2.png"),
type: 1,
value: "1",
},
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
],
payList: [],
priceBreakdownList: [],
orderInfoList: [{
text: "订单备注",
@@ -492,7 +474,7 @@
freightNum: "book/buyOrder/calculateTransportPrice", //运费
},
customButton: [{
width: "340rpx",
width: "300rpx",
text: "立即支付",
backgroundColor: "linear-gradient(90deg, #3AB3AE 0%, #117e4c 100%)",
color: "#fff",
@@ -541,6 +523,46 @@
async onShow() {
console.log("调用了onShow方法");
var that = this;
if(this.$platform=='ios'){
this.payList= [
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
]
this.selectPayIndex = 0;
this.payType=4
}else{
this.payList= [{
text: "支付宝",
imgUrl: require("@/static/icon/pay_1.png"),
type: 2,
value: "0",
},
{
text: "微信",
imgUrl: require("@/static/icon/pay_2.png"),
type: 1,
value: "1",
},
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
]
this.selectPayIndex = 1;
this.payType=2
}
await uni.$on("returnData", function(data) {
console.log("data at line 415:", data);
if (data) {

View File

@@ -4,35 +4,32 @@
<public-module></public-module>
<view class="header_box"></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>
</view>
<view class="text">
<text>一路健康</text>
</view>
</view>
<view class="zmzm item flexbox" @click="appjumpfun('nuttyreading')">
<view class="img">
<image src="@/static/icon/home_icon_3.png" mode="widthFix"></image>
</view>
<view class="text">
<text>疯子读书</text>
</view>
</view>
<view class="zmzm item flexbox" @click="appjumpfun('medicine')">
<view class="img">
<image src="@/static/icon/wmysicon.png" mode="widthFix"></image>
</view>
<view class="text">
<text>吴门医述</text>
</view>
</view>
</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>
</view>
<view class="text">
<text>一路健康</text>
</view>
</view>
<view class="zmzm item flexbox" @click="appjumpfun('nuttyreading')">
<view class="img">
<image src="@/static/icon/home_icon_3.png" mode="widthFix"></image>
</view>
<view class="text">
<text>疯子读书</text>
</view>
</view>
<view class="zmzm item flexbox" @click="appjumpfun('medicine')">
<view class="img">
<image src="@/static/icon/wmysicon.png" mode="widthFix"></image>
</view>
<view class="text">
<text>吴门医述</text>
</view>
</view>
</view> -->
<view class="main_content_box">
<view class="curriculum_box">
<view class="curriculum_item_box" v-for="(v, i) in curriculumList" @click="handleClickCurriculum(v)">
@@ -150,6 +147,12 @@
</view> -->
</view>
<common-advertisement
ref="commonAdvertisement"
:list="advertisementList"
></common-advertisement>
</view>
</template>
<script>
@@ -162,6 +165,7 @@
props: {},
data() {
return {
advertisementList: [],
noticeList: [], //秒杀列表
seckillLst: [], //秒杀列表
@@ -201,7 +205,9 @@
};
},
onReady() {},
onLoad() {},
onLoad() { this.$nextTick(() => {
this.getAdvertisement();
});},
async onShow() {
console.log("at line 287:", this.userInfo);
this.requestAll();
@@ -220,6 +226,33 @@
},
methods: {
...mapMutations(["setUserInfo"]),
async getAdvertisement() {
console.log('11111111111111111111 at line 233:', 11111111111111111111)
await this.$http
.request({
url: "common/mainAd/getMainAd",
method: "POST",
data: {
type: 2,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
console.log("res at line 615:", res);
if (res.code == 0 && res.list && res.list.length > 0) {
this.advertisementList = res.list;
this.$refs.commonAdvertisement.open();
}
});
},
goVideo() {
uni.navigateTo({
url: "/pages/index/index",
@@ -969,7 +1002,7 @@
}
.appJump {
width: 190rpx;
width: auto;
position: fixed;
right: 0;

View File

@@ -185,7 +185,7 @@ export default {
onShow() {
//改变字体大小
var status = this.$baseFontSize();
if (status == 5) {
if (status == 4) {
this.fontSizeBlod = true;
} else {
this.fontSizeBlod = false;
@@ -205,7 +205,7 @@ export default {
//改变字体大小
console.log("this.fontSizeBlod at line 196:", this.fontSizeBlod);
if (this.fontSizeBlod) {
uni.setStorageSync("fontSize", 5);
uni.setStorageSync("fontSize", 4);
} else {
uni.setStorageSync("fontSize", 3.5);
}

View File

@@ -66,8 +66,8 @@
@click="openorderModal(item)"
v-for="(item, index) in v.list"
class="vip_button"
:style="`background:${v.buttonbg ? v.buttonbg : '#f6f6f6'};`"
><view style="max-width: 200rpx">{{ item.title }}</view>
:style="`background:${v.buttonbg ? v.buttonbg : '#f6f6f6'};height:${ v.list.length>2?`calc(100% / ${ v.list.length}) !important`:'80rpx !important'}`">
<view style="max-width: 200rpx">{{ item.title }}</view>
<view style="margin: 0 5rpx">{{ item.lastFee }}</view>
</view>
</view>
@@ -909,7 +909,7 @@ export default {
}
.vip_button_list {
width: 100%;
max-height: 200rpx;
max-height: 450rpx;
// @include themFlex(center, space-between);
// flex-direction: column;
padding-top: 0;

View File

@@ -1,7 +1,4 @@
<template><page-meta
:page-font-size="$baseFontSize() + 'px'"
:root-font-size="$baseFontSize() + 'px'"
></page-meta>
<template><page-meta :page-font-size="$baseFontSize() + 'px'" :root-font-size="$baseFontSize() + 'px'"></page-meta>
<view class="container commonPageBox">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
@@ -170,6 +167,7 @@
},
//页面显示
onShow() {
// 隐藏原生的tabbar
// this.iphonepay()
// setTimeout(()=>{
@@ -253,10 +251,12 @@
provider: 'appleiap',
orderInfo: orderInfo,
success: (res) => {
console.log('uni.requestPayment成功提示', res)
that.iapCheck(res);
resolve(res);
},
fail: (err) => {
console.log('uni.requestPayment失败提示', err)
uni.hideLoading()
// console.log('其他支付错误', err);
that.restoreComplateRequest()
@@ -281,28 +281,28 @@
async restoreComplateRequest() {
let that = this
console.log('检测未完成订单')
// if (!that.checking) {
// that.checking = true
// console.log(this.iapChannel, 'this.iapChannel1')
await this.iapChannel.restoreCompletedTransactions({
manualFinishTransaction: true
}, function(results) {
// console.log(that.checking)
// results 格式为数组存放恢复的IAP商品交易信息对象 IAPTransaction通用需将返回的支付凭证传给后端进行二次认证
that.ComplateRequestArr = results
console.log('未完成订单数组共有:=》', that.ComplateRequestArr.length)
if (results && results.length > 0) {
console.log('未完成订单数组共有resultsresultsresults=》', results)
results.map((item, index) => {
// "0"为正在支付;"1"为支付成功;"2"为支付失败;"3"为支付已恢复。
if (item.transactionState == '1') {
// 已经支付,但是没有走逻辑的内购订单 就发给后台做验证
that.iapCheck('未完成订单的验证', item, index)
// that.finishTransaction(item)
} else if (item.transactionState != '1' || item.transactionState != '0') {
// 不是正在支付订单,也不是已经支付订单就关闭掉
// 其他状态的内购订单
that.finishTransaction(item)
}
// if (item.transactionState == '1') {
// // 已经支付,但是没有走逻辑的内购订单 就发给后台做验证
// that.iapCheck('未完成订单的验证', item, index)
// // that.finishTransaction(item)
// } else if (item.transactionState != '1' || item.transactionState != '0') {
// // 不是正在支付订单,也不是已经支付订单就关闭掉
// // 其他状态的内购订单
console.log('未完成订单数组共有resultsresultsresults15=》', results)
that.finishTransaction(item)
// }
})
}
@@ -311,40 +311,34 @@
},
async iphonepay() {
//获取iap通道是判断当前设备是否支持苹果内购支付的必要条件
const that = this;
uni.showLoading({
title: "检测支付环境"
title: "购买中"
})
console.log("检测支付环境...");
this.iapChannel = await this.getProvider()
console.log('that.iapChannel', this.iapChannel);
if (this.iapChannel) {
this.requestOrder();
await this.restoreComplateRequest()
await this.requestOrder();
} else {
uni.hideLoading()
uni.showToast({
title: '不支持内购支付',
icon: 'none'
})
console.log("获取iap支付通道失败" + e.message, that.iapChannel);
}
},
requestOrder() {
uni.showLoading({
title: "获取商品信息",
mask: true,
});
const that = this;
console.log(that.stepsCj.priceTypeId, 88888888);
// ['xxxxx'] 是平台申请拿到的内购商品的id
let IAPOrders = [];
IAPOrders.push('Z' + that.stepsCj.priceTypeId);
// console.log(IAPOrders, "IAPOrders");
console.log(IAPOrders, "IAPOrders");
// 新建订单
uni.showLoading({
title: "正在创建订单",
mask: true,
});
// uni.showLoading({
// title: "正在创建订单",
// mask: true,
// });
that.iapChannel.requestProduct(
IAPOrders,
function(event) {
@@ -367,16 +361,14 @@
},
async topay(id) {
const that = this;
uni.showLoading({
title: "正在支付",
mask: true,
});
let orderInfo = {
productid: id,
username: that.orderSn, // 用户标识/订单标识
quantity: 1,
manualFinishTransaction: true, // 3.5.1+ 支持,设置此参数后需要开发者主动关闭订单,参见下面的关闭订单方法 finishTransaction()
}
console.log('支付后的订单信息', orderInfo);
this.transaction = await this.requestPayment(orderInfo)
console.log('支付后的that.transaction', this.transaction);
},
@@ -389,12 +381,13 @@
productId: result.payment.productid.slice(1), // 产品id
orderId: result.payment.username, // 系统订单号
receiptData: result.transactionReceipt, // 苹果返回收据
// isSandBox: true, //测试数据
// body: that.stepsCj.priceTypeId // 充值类型id
};
console.log("提交给后台的数据", data);
$http
.request({
url: "/Ipa/veri",
url: "Ipa/veri",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data,
header: {
@@ -404,22 +397,25 @@
})
.then((res) => {
// console.log('res',res);
console.log(JSON.stringify(res));
if (res.code == 0) {
this.transaction = null
uni.hideLoading()
console.log(JSON.stringify(res), '返回信息');
uni.showToast({
title: '充值成功!',
icon: 'success'
})
console.log("充值订单已处理,请留意账户金额变动....");
uni.hideLoading()
// console.log("充值订单已处理,请留意账户金额变动....");
// 服务器验证票据有效后在客户端关闭订单 (iapChannel.finishTransaction)
that.finishTransaction(result);
// that.finishTransaction(result);
}
})
.catch((e) => {
uni.hideLoading()
console.log('后台验证失败=>', e);
this.transaction = null
uni.showModal({
title: "提示",
showCancel: false,
@@ -512,10 +508,7 @@
let that = this;
that.payType = e;
},
//ios充值
iosPay() {
this.iphonepay();
},
// 充值
goToPay() {
this.kaiChar();
@@ -562,6 +555,8 @@
})
.then((res) => {
that.orderSn = res.orderSn;
console.log(res.orderSn, 'dingdanhao111111111111')
uni.hideLoading();
if (res.code == 0) {
if (that.payType == 2) {
@@ -636,7 +631,7 @@
// })
} else if (that.payType == 3) {
console.log("苹果支付");
that.iosPay();
that.iphonepay();
}
}
});

View File

@@ -77,31 +77,7 @@
</view>
</view>
<view class="greenCardBox1 learning_box listening_box">
<view class="learning_box_top">
<view class="learning_top greenCardBoxTop PM_font">
<view class="titlebg">会员课程</view>
</view>
</view>
<view class="flash_sale_content greenCardBoxContent">
<scroll-view scroll-x="true" class="scroll-X" style="">
<common-curriculum-list
imgUrl="image"
:isCondition="true"
:dataList="flashSaleList"
@hancleClick="goCourseDescription"
label="title"
>
<template slot="labelSlot" slot-scope="slotProps">
<view class="related_courses_name hidden1">{{
slotProps.row.title
}}</view>
</template>
</common-curriculum-list>
</scroll-view>
</view>
</view>
<!-- <view class="learning_box listening_box bottomBox">
<view class="item_img" @click="handleGoApp">
<image src="@/static/tab/bottom1.png" mode="aspectFill"></image>