更改随机名字
This commit is contained in:
27
pages/index/mggghRAnkh/rGghmpneAi.vue
Normal file
27
pages/index/mggghRAnkh/rGghmpneAi.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<image src="../../../static/iosImg/DEghTTorspIMG_6760.JPG" mode="aspectFill"></image>
|
||||
<image src="../../../static/iosImg/DEghTTorspIMG_6761.JPG" mode="aspectFill"></image>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onHide() {
|
||||
},
|
||||
onLoad(option) {
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
31
pages/index/mggghRAnkh/viepsii.vue
Normal file
31
pages/index/mggghRAnkh/viepsii.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<image src="../../../static/iosImg/DEghTTorspIMG_6758.JPG" mode="aspectFill"></image>
|
||||
<image src="../../../static/iosImg/DEghTTorspIMG_6759.JPG" mode="aspectFill"></image>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onHide() {
|
||||
},
|
||||
onLoad(option) {
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
208
pages/index/mggghRAnkh/yDNQghnrBV.vue
Normal file
208
pages/index/mggghRAnkh/yDNQghnrBV.vue
Normal file
@@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<u-sticky :enable="enableIos">
|
||||
<view class="search-box-ios">
|
||||
<u-search bg-color="#f2f2f2" style="width: 100%;" placeholder="搜索更多资源" v-model="keywordIos"
|
||||
:show-action="false" :animation="true" @search="getCourseListIos()"></u-search>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<view class="swiper flex align-center justify-center">
|
||||
<view class="swiper-box">
|
||||
<swiper :indicator-dots="true" class="swiper " :autoplay="true" interval="5000" duration="500"
|
||||
:circular="true" style="width: 100%;height: 350rpx;">
|
||||
<swiper-item v-for="(item,index) in swiperListIos" :key='index' @tap="goPageIos(item.url)">
|
||||
<image :src="item.imageUrl" mode="scaleToFill"
|
||||
style="width: 100%;height: 100%;border-radius: 24rpx;"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-lr">
|
||||
<view class="" v-if="courseListIos.length">
|
||||
<videoList @success="posterSuccessIos" :list="courseListIos" />
|
||||
</view>
|
||||
<empty title="暂无视频" :isShow='false' v-else></empty>
|
||||
<u-loadmore v-if="courseListIos.length > 0" :status="statusIos" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import videoList from '../../../components/videoList/videoList.vue'
|
||||
import empty from '@/components/empty.vue'
|
||||
export default {
|
||||
components: {
|
||||
empty,
|
||||
videoList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
enableIos: true,
|
||||
statusIos: 'loadmore',
|
||||
swiperListIos: [], //轮播图列表
|
||||
courseListIos: [], //资源列表
|
||||
pageIos: 1,
|
||||
limitIos: 10,
|
||||
pagesIos: 0,
|
||||
|
||||
sortIos: '',
|
||||
keywordIos: '',
|
||||
isPriceIos: '', //是否免费 2:免费
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.enableIos = true
|
||||
this.getCourseListIos()
|
||||
},
|
||||
onHide() {
|
||||
this.enableIos = false
|
||||
},
|
||||
onLoad(option) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: option.title
|
||||
})
|
||||
this.getBannerListIos()
|
||||
if (option.sort) {
|
||||
this.sortIos = option.sort
|
||||
}
|
||||
if (option.isPrice) {
|
||||
this.isPriceIos = option.isPrice
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
goPageIos(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
//点击回调
|
||||
posterSuccessIos(item) {
|
||||
uni.navigateTo({
|
||||
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item.courseDetailsId
|
||||
})
|
||||
},
|
||||
//最新热播
|
||||
getCourseListIos() {
|
||||
let data = {
|
||||
limit: this.limitIos,
|
||||
page: this.pageIos,
|
||||
sort: this.sortIos ? this.sortIos : '',
|
||||
title: this.keywordIos,
|
||||
}
|
||||
// #ifdef MP-WEIXIN
|
||||
data.wxShow = 1
|
||||
// #endif
|
||||
// #ifdef MP-TOUTIAO
|
||||
data.dyShow = 1
|
||||
// #endif
|
||||
if (this.isPriceIos) {
|
||||
data.isPrice = this.isPriceIos
|
||||
}
|
||||
this.$u.api.courseList(data).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.pagesIos = res.data.totalPage
|
||||
if (this.pageIos < this.pagesIos) {
|
||||
this.statusIos = 'loadmore'
|
||||
} else {
|
||||
this.statusIos = 'nomore'
|
||||
}
|
||||
// res.data.list.forEach(ret => {
|
||||
// ret.courseLabel = ret.courseLabel ? ret.courseLabel.split(',') : []
|
||||
// })
|
||||
if (this.pageIos == 1) {
|
||||
this.courseListIos = res.data.list
|
||||
} else {
|
||||
this.courseListIos = [...this.courseListIos, ...res.data.list]
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
|
||||
})
|
||||
},
|
||||
// 获取轮播图列表
|
||||
getBannerListIos() {
|
||||
this.$u.api.bannerList({
|
||||
classify: '1'
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
res.data.forEach(d => {
|
||||
if (d.state == 1) {
|
||||
this.swiperListIos.push(d)
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
onReachBottom: function() {
|
||||
if (this.pageIos < this.pagesIos) {
|
||||
this.pageIos += 1
|
||||
this.statusIos = 'loading'
|
||||
this.getCourseListIos()
|
||||
|
||||
} else {
|
||||
this.statusIos = 'nomore'
|
||||
}
|
||||
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
this.pageIos = 1;
|
||||
this.getCourseListIos()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.search-box-ios {
|
||||
width: 100%;
|
||||
padding: 15upx 2.5%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.swiper {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 10rpx;
|
||||
margin-top: 10rpx;
|
||||
|
||||
.swiper-box {
|
||||
width: 686rpx;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #5074FF;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 150upx;
|
||||
height: 60upx;
|
||||
background: #5074FF;
|
||||
border-radius: 30upx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
</style>
|
||||
397
pages/index/mggghRAnkh/zaDDTghWrb.vue
Normal file
397
pages/index/mggghRAnkh/zaDDTghWrb.vue
Normal file
@@ -0,0 +1,397 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="bg-white padding-sm margin flex" style="border-radius: 24rpx;">
|
||||
<u-image width="200rpx" height="200rpx" border-radius="10rpx" :src="courseListIos.titleImg">
|
||||
</u-image>
|
||||
<view class="flex flex-direction justify-between margin-left-sm" style="width:420rpx;">
|
||||
<view class="text-bold text-black margin-top-xs u-line-1 text-lg">{{courseListIos.title}}
|
||||
</view>
|
||||
<!-- <view class="text-gray text-26 margin-top">最近在学{{courseListIos.payNum}}</view> -->
|
||||
<view class="flex justify-between ">
|
||||
<view class=" text-bold " style="color: #FF8211;">¥<text
|
||||
style="font-size: 42rpx;">{{courseListIos.price}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="popup_pay_ios">
|
||||
<view class="text-lg text-bold">支付方式</view>
|
||||
<view class="flex align-center justify-between" style="height: 100upx;" v-for="(item,index) in openListsIos"
|
||||
:key='index'>
|
||||
<image :src="item.image" style="width: 55upx;height: 55upx;border-radius: 50upx;">
|
||||
</image>
|
||||
<view style="font-size: 30upx;margin-left: 20upx;width: 70%;">
|
||||
{{item.text}}
|
||||
</view>
|
||||
<radio-group name="openWay" style="margin-left: 45upx;" @tap.stop='selectWayIos(item)'>
|
||||
<label >
|
||||
<radio color="red" :checked="openWayIos === item.id ? true : false" />
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
<!-- <view class="pay_btn" @click="payIos()">确认支付</view> -->
|
||||
</view>
|
||||
|
||||
<view class="taber_ios">
|
||||
<view class="flex align-center" style="color: #FF8211;">
|
||||
<text style="color: #333;">实付款:</text>
|
||||
<view class=" text-bold " style="color: #FF8211;">¥<text
|
||||
style="font-size: 42rpx;">{{courseListIos.price}}</text></view>
|
||||
</view>
|
||||
<view class="btn_ios" @click="payIos">确定并支付</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
courseIdIos: '',
|
||||
courseListIos: [],
|
||||
|
||||
openListsIos: [],
|
||||
openWayIos: 1,
|
||||
flagIos: true
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
// #ifdef APP
|
||||
this.openListsIos = [{
|
||||
image: '../../../static/images/index/weixin.png',
|
||||
text: '微信支付',
|
||||
id: 1
|
||||
}, {
|
||||
image: '../../../static/images/index/zhifubao.png',
|
||||
text: '支付宝',
|
||||
id: 2
|
||||
}],
|
||||
this.openWayIos = 1;
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
this.openListsIos = [{
|
||||
image: '../../../static/images/index/weixin.png',
|
||||
text: '微信支付',
|
||||
id: 1
|
||||
}],
|
||||
this.openWayIos = 1;
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
let ua = navigator.userAgent.toLowerCase();
|
||||
if (ua.indexOf('micromessenger') !== -1) {
|
||||
this.openListsIos = [{
|
||||
image: '../../../static/images/index/weixin.png',
|
||||
text: '微信支付',
|
||||
id: 1
|
||||
}, {
|
||||
image: '../../../static/images/index/zhifubao.png',
|
||||
text: '支付宝',
|
||||
id: 2
|
||||
}],
|
||||
this.openWayIos = 1;
|
||||
} else {
|
||||
this.openListsIos = [{
|
||||
image: '../../../static/images/index/zhifubao.png',
|
||||
text: '支付宝',
|
||||
id: 2
|
||||
}],
|
||||
this.openWayIos = 2;
|
||||
}
|
||||
// this.openListsIos = [{
|
||||
// image: '../../../static/images/index/zhifubao.png',
|
||||
// text: '支付宝',
|
||||
// id: 2
|
||||
// }],
|
||||
// this.openWayIos = 2;
|
||||
// #endif
|
||||
if (option.courseId) {
|
||||
this.courseIdIos = option.courseId
|
||||
this.getDataListIos(this.courseIdIos)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectWayIos(e) {
|
||||
this.openWayIos = e.id;
|
||||
},
|
||||
// 资源详情
|
||||
getDataListIos(id) {
|
||||
let data = {
|
||||
id
|
||||
}
|
||||
this.$u.api.courseDet(data).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.courseListIos = res.data
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1500,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
payIos() {
|
||||
let that = this
|
||||
if (that.flagIos) {
|
||||
that.flagIos = false
|
||||
let data = {
|
||||
courseId: that.courseListIos.courseId
|
||||
}
|
||||
that.$u.api.courseOrder(data).then(res => {
|
||||
if (res.code == 0 && res.data.flag == 1) {
|
||||
uni.showToast({
|
||||
title: '已获取资源',
|
||||
icon: 'success'
|
||||
})
|
||||
that.getDataListIos(that.courseIdIos);
|
||||
} else if (res.code == 0 && res.data.flag == 2) {
|
||||
uni.showLoading({
|
||||
title: '支付中...'
|
||||
})
|
||||
if (that.openWayIos == 1) {
|
||||
// #ifdef MP-WEIXIN
|
||||
that.$u.post('app/wxPay/wxPayJsApiOrder?orderId=' + res.data.orders.ordersId, {})
|
||||
.then(
|
||||
ret => {
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
timeStamp: ret.data.timestamp,
|
||||
nonceStr: ret.data.noncestr,
|
||||
package: ret.data.package,
|
||||
signType: ret.data.signType,
|
||||
paySign: ret.data.sign,
|
||||
success: function(suc) {
|
||||
console.log('success:' + JSON.stringify(suc));
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(function() {
|
||||
uni.navigateTo({
|
||||
url: '/me/order/index'
|
||||
})
|
||||
}, 1000)
|
||||
},
|
||||
fail: function(err) {
|
||||
uni.hideLoading();
|
||||
console.log('fail:' + JSON.stringify(err));
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
let ua = navigator.userAgent.toLowerCase();
|
||||
if (ua.indexOf('micromessenger') !== -1) {
|
||||
that.$u.post('/app/wxPay/wxPayMpOrder?orderId=' + res.data.orders.ordersId)
|
||||
.then(
|
||||
res => {
|
||||
if (res.code === 0) {
|
||||
that.callPayIos(res.data);
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '支付失败!'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
// #ifdef APP
|
||||
console.log(res.data.orders.ordersId,
|
||||
'res.data.orders.ordersIdres.data.orders.ordersId')
|
||||
// let data = {
|
||||
// orderId: res.data.orders.ordersId,
|
||||
// }
|
||||
that.$u.post('/app/wxPay/payAppOrder?orderId=' + res.data.orders.ordersId).then(
|
||||
rea => {
|
||||
console.log(rea)
|
||||
if (rea.code == 0) {
|
||||
that.isCheckPayIos(rea.code, 'wxpay', JSON.stringify(rea.data));
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
} else if (that.openWayIos == 2) {
|
||||
// #ifdef H5
|
||||
that.$u.post('/app/aliPay/payOrder?orderId=' + res.data.orders.ordersId +
|
||||
'&classify=2').then(
|
||||
res => {
|
||||
if (res.code === 0) {
|
||||
uni.hideLoading();
|
||||
const div = document.createElement('div')
|
||||
div.innerHTML = res.data //此处form就是后台返回接收到的数据
|
||||
document.body.appendChild(div)
|
||||
document.forms[0].submit()
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '支付失败!'
|
||||
});
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
// #ifdef APP
|
||||
console.log('---------', res.data.orders.ordersId)
|
||||
// let data = {
|
||||
// orderId: res.data.orders.ordersId,
|
||||
// classify:1
|
||||
// }
|
||||
that.$u.post('/app/aliPay/payOrder?orderId=' + res.data.orders.ordersId +
|
||||
'&classify=1').then(
|
||||
rea => {
|
||||
console.log('---------', rea)
|
||||
that.setPaymentIos('alipay', rea.data);
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
// duration: 1500
|
||||
})
|
||||
// that.getDataListIos(that.courseId);
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
that.flagIos = true
|
||||
}, 1500)
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
isCheckPayIos(code, name, order) {
|
||||
if (code == 0) {
|
||||
console.log('999999999999')
|
||||
this.setPaymentIos(name, order);
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '支付信息有误'
|
||||
});
|
||||
}
|
||||
},
|
||||
setPaymentIos(name, order) {
|
||||
console.log(777777777, name, order)
|
||||
uni.requestPayment({
|
||||
provider: name,
|
||||
orderInfo: order, //微信、支付宝订单数据
|
||||
success: function(res) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(function() {
|
||||
uni.navigateTo({
|
||||
url: '/me/order/index'
|
||||
})
|
||||
}, 1000)
|
||||
},
|
||||
fail: function(err) {
|
||||
uni.hideLoading();
|
||||
},
|
||||
complete() {
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
},
|
||||
callPayIos: function(response) {
|
||||
if (typeof WeixinJSBridge === "undefined") {
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener('WeixinJSBridgeReady', this.onBridgeReadyIos(response), false);
|
||||
} else if (document.attachEvent) {
|
||||
document.attachEvent('WeixinJSBridgeReady', this.onBridgeReadyIos(response));
|
||||
document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReadyIos(response));
|
||||
}
|
||||
} else {
|
||||
this.onBridgeReadyIos(response);
|
||||
}
|
||||
},
|
||||
onBridgeReadyIos: function(response) {
|
||||
let that = this;
|
||||
if (!response.package) {
|
||||
return;
|
||||
}
|
||||
console.log("response)))):" + JSON.stringify(response))
|
||||
WeixinJSBridge.invoke(
|
||||
'getBrandWCPayRequest', {
|
||||
"appId": response.appid, //公众号名称,由商户传入
|
||||
"timeStamp": response.timestamp, //时间戳,自1970年以来的秒数
|
||||
"nonceStr": response.noncestr, //随机串
|
||||
"package": response.package,
|
||||
"signType": response.signType, //微信签名方式:
|
||||
"paySign": response.sign //微信签名
|
||||
},
|
||||
function(res) {
|
||||
if (res.err_msg === "get_brand_wcpay_request:ok") {
|
||||
// 使用以上方式判断前端返回,微信团队郑重提示:
|
||||
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
|
||||
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none'
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: '/me/order/index'
|
||||
})
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
}
|
||||
WeixinJSBridge.log(response.err_msg);
|
||||
}
|
||||
);
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
.popup_pay_ios {
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
margin: 30rpx 30rpx;
|
||||
padding: 30rpx 30rpx 20rpx 30rpx;
|
||||
}
|
||||
|
||||
.taber_ios {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
background: #FFFFFF;
|
||||
padding: 10rpx 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.btn_ios {
|
||||
width: 260rpx;
|
||||
height: 78rpx;
|
||||
background: #5074FF;
|
||||
border-radius: 39rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 78rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user