fanfan 6 months ago
parent 4fb5385f96
commit 25e87f2701
  1. 7
      api/tutorial.js
  2. 7
      pages.json
  3. 118
      pages/gamll/index.vue
  4. 47
      pages/gamll/rules.vue
  5. BIN
      static/default-logo.png
  6. BIN
      static/user/manage.png
  7. BIN
      static/user/vip.png

@ -6,7 +6,8 @@ const api = {
list: 'course/getCourseList',
retailList: 'retail/retailPayList',
describe: 'retail/describe',
submit: 'retail/submit'
submit: 'retail/submit',
getSoftAgreement: 'retail/getSoftAgreement'
}
// 分类
@ -29,3 +30,7 @@ export const describe = (param) => {
export const submit = (param) => {
return request.post(api.submit, param)
}
// 协议
export const getSoftAgreement = (param) => {
return request.get(api.getSoftAgreement, param)
}

@ -244,6 +244,13 @@
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/gamll/rules",
"style": {
"navigationBarTitleText": "软件付费服务协议",
"enablePullDownRefresh": false
}
}
],
"subPackages": [{

@ -2,7 +2,7 @@
<view class="park">
<view class="park-top">
<view class="park-navbar">
<u-navbar title="开通商城" :border-bottom="false" :background="background"></u-navbar>
<u-navbar :is-fixed='false' title="开通商城" :border-bottom="false" :background="backgroundNone"></u-navbar>
<view class="box_1">
<image :src="$picUrl+'/static/default-logo.png'" class="image_2"
@click="goJump('/pages/news1/setting')"></image>
@ -11,21 +11,21 @@
{{userInfo.mobile}}
</view>
<view class="image-text_1" @click="goLogin()">
{{retail==0?'您暂未开通商场哦~':'您已经开通商场啦~'}}
{{retail==0?'您暂未开通商城哦~':'您已经开通商城啦~'}}
</view>
</view>
<image :src="$picUrl+'/static/user/gmallZuan.png'" class="image_1"></image>
</view>
</view>
</view>
<view class="tab_pos">
<view class="tab_bg" :style="{ 'border-radius': radius}">
<view :class="[tabIndex==index ? 'tab_active' : 'tab_a']" v-for="(item,index) in tabbar"
@click="onChage(index)" :key="index">
{{item}}
</view>
<view class="tab_pos" style="">
<view class="tab_bg" :style="{ 'border-radius': radius}">
<view :class="[tabIndex==index ? 'tab_active' : 'tab_a']" v-for="(item,index) in tabbar"
@click="onChage(index)" :key="index">
{{item}}
</view>
</view>
</view>
<view class="tab-type">
<view class="tab-pro" v-for="(item,index) in tabType" :class="index==banIndex?'tab-pro-active':''"
@click="onChageBan(index)" :key="index">
@ -38,8 +38,7 @@
<view class="tab-line">
¥{{Number(item.retail_original_price)}}
</view>
<view class="tab-jian" v-if='item.jian>0'
:class="index==banIndex?'tab-jian-active':''">
<view class="tab-jian" v-if='item.jian>0' :class="index==banIndex?'tab-jian-active':''">
立减 ¥{{Number(item.jian)}}
</view>
<view class="tab-quan">
@ -81,7 +80,7 @@
<view class="advantage-tips" v-if="tabIndex==0" v-html="retail"></view>
<view class="advantage-tips" v-if="tabIndex==1" v-html="wholesale"></view>
</view>
<view class="tab-title">
<view class="tab-title" style="margin-top: 0;">
<view class="name">
<image :src="$picUrl+'/static/user/left.png'"></image>功能对比<image
:src="$picUrl+'/static/user/right.png'">
@ -173,6 +172,9 @@
<view class="bottomBtn">
<button class="submitBtn" formType="submit" @click="submitPay">立即支付 ¥<text
style="font-size: 48rpx;">{{tabFavour[priceIndex].price}}</text>开通您的{{tabbar[tabIndex]}}</button>
<view class="paytext" @click="goRules">
本产品为软件服务产品购买后不支持退款开通即表示接受<text style="color: #999;">软件付费服务协议</text>
</view>
</view>
<u-popup v-model="show" length="60%" mode='center' :mask='true' :closeable='true'>
<view class="content">
@ -210,8 +212,13 @@
}
export default {
data() {
let img = 'https://www.royaum.com.cn/static/user/gmallBg.png'
return {
background: {
background: 'url(' + img + ') center top no-repeat',
backgroundSize: '100%',
},
backgroundNone: {
background: 'none'
},
//
@ -245,8 +252,9 @@
show: false,
content_description: '',
feature_name: '',
retail:'',
wholesale:''
retail: '',
wholesale: '',
scrollTop: 0,
}
},
onLoad() {
@ -255,7 +263,6 @@
this.getRetailList()
this.getDescribe()
uni.$on('appShow', this.solveShowMsg);
console.log(route);
},
onUnload() {
uni.$off('appShow', this.solveShowMsg);
@ -263,7 +270,15 @@
onShow() {
},
// onPageScroll(e) {
// this.scrollTop=e.scrollTop
// },
methods: {
goRules() {
uni.navigateTo({
url: '/pages/gamll/rules'
})
},
openPopup(msg, name) {
this.feature_name = name
this.content_description = msg
@ -273,7 +288,8 @@
},
solveShowMsg(info) {
console.log(info);
if (this.miniPayRequest && Object.keys(this.miniPayRequest).length > 0 && info.appId === this.miniPayRequest.miniuser) {
if (this.miniPayRequest && Object.keys(this.miniPayRequest).length > 0 && info.appId === this
.miniPayRequest.miniuser) {
this.onTradeQuery(this.miniPayRequest.out_trade_no, this.paymentMethods[this.payIndex].method);
}
},
@ -293,13 +309,13 @@
title: result.message || "支付成功",
icon: 'success'
})
setTimeout(() => {
uni.switchTab({
url: "/pages/user/index"
})
}, 1000)
} else {
} else {
uni.showToast({
title: result.message || "支付失败",
icon: 'none'
@ -364,9 +380,12 @@
api.submit(params)
.then(result => {
console.log(result);
const { miniPayRequest, out_trade_no } = result.data.payment;
that.miniPayRequest = miniPayRequest;
that.miniPayRequest.out_trade_no = out_trade_no;
const {
miniPayRequest,
out_trade_no
} = result.data.payment;
that.miniPayRequest = miniPayRequest;
that.miniPayRequest.out_trade_no = out_trade_no;
})
.finally(() => that.isLoading = false)
},
@ -462,8 +481,8 @@
} else if (that.paymentMethods[that.payIndex].method == "huifu") {
that.isClick = true;
if (!this.miniPayRequest || Object.keys(this.miniPayRequest).length === 0) {
this.$toast(`暂无${this.PayMethodEnum[this.payType].name}支付信息`);
return
this.$toast(`暂无${this.PayMethodEnum[this.payType].name}支付信息`);
return
}
let appPayRequest = '';
appPayRequest = encodeURIComponent(JSON.stringify({
@ -483,7 +502,9 @@
status,
message,
data
} = await api.describe({type:this.tabIndex==0?10:20});
} = await api.describe({
type: this.tabIndex == 0 ? 10 : 20
});
if (status == 200) {
let list = Object.values(data.group)
let all = [{
@ -509,6 +530,14 @@
that.$toast(message)
}
},
removeEmptyLines(htmlContent) {
// 使
//
const regex = />\s*\n\s*</g;
//
const newContent = htmlContent.replace(regex, ' > <');
return newContent;
},
//
async getRetailList() {
let that = this;
@ -523,13 +552,14 @@
} = await api.retailList(pames);
if (status == 200) {
that.userInfo = data.list.personal;
data.list.list.forEach(item => {
item.jian=Number((Number(item.retail_original_price)-Number(item.retail_current_price)).toFixed(2))
})
data.list.list.forEach(item => {
item.jian = Number((Number(item.retail_original_price) - Number(item
.retail_current_price)).toFixed(2))
})
that.tabType = data.list.list
that.paymentMethods = data.list.paymentMethods;
that.retail=data.list.retail.replace(/(\r\n|\n|\r)/gm, '<br />').replace(/\n/g, "")
that.wholesale=data.list.wholesale.replace(/(\r\n|\n|\r)/gm, '<br />').replace(/\n/g, "")
that.retail = this.removeEmptyLines(data.list.retail)
that.wholesale = this.removeEmptyLines(data.list.wholesale)
that.getBan()
this.setDefaultPayType();
} else {
@ -663,6 +693,13 @@
position: relative;
width: 100%;
height: 126rpx;
position: -webkit-sticky;
/* 针对Safari浏览器的兼容性 */
position: sticky;
top: 0;
/* 设置吸顶的位置 */
z-index: 99999;
/* 确保sticky元素在其他内容之上 */
}
.tab_bg {
@ -1064,6 +1101,10 @@
color: rgba(51, 51, 51, 1);
text-align: left;
rich-text {
line-height: 50rpx !important;
}
}
}
}
@ -1074,13 +1115,22 @@
position: fixed;
bottom: 0;
left: 0;
height: 160upx;
height: 200upx;
z-index: 88;
background: #fafafa;
background: #fff;
.paytext {
line-height: 27rpx;
font-size: 22rpx;
color: #333;
margin: 0 160rpx;
text-align: center;
}
}
.submitBtn {
height: 100rpx;
height: 90rpx;
line-height: 88upx;
background: #FFAAA4;
background: #FE483B;
@ -1090,12 +1140,12 @@
letter-spacing: 0rpx;
color: rgba(255, 255, 255, 1);
text-align: center;
margin: 30rpx 58rpx;
margin: 20rpx 58rpx 16rpx 58rpx;
}
.payment-method {
width: 100%;
margin: 20rpx 0 180rpx 0;
margin: 20rpx 0 220rpx 0;
padding: 0 40rpx 0 20rpx;
background-color: #ffffff;
border-radius: 20rpx;
@ -1135,10 +1185,12 @@
color: #009fe8;
}
}
.huifu-box {
width: 100rpx;
display: flex;
justify-content: center;
.huifu {
height: 44rpx;
}

@ -0,0 +1,47 @@
<template>
<view class="pages">
<view class="content" v-html="strings">
</view>
</view>
</template>
<script>
import * as api from '@/api/tutorial'
export default{
data(){
return{
strings:'',
}
},
onLoad(options){
this.getSoftAgreementData()
},
methods:{
//
async getSoftAgreementData() {
let that = this;
let {
status,
message,
data
} = await api.getSoftAgreement({type:'soft'});
if (status == 200) {
this.strings=data.detail.content
} else {
that.$toast(message)
}
},
},
}
</script>
<style scoped lang="scss">
.pages{
width: 100%;
height: 100%;
padding: 30rpx;
span{
white-space: normal !important
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Loading…
Cancel
Save