Commit cdb97211 authored by jyx's avatar jyx

添加取消签约

parent ed2c6beb
......@@ -17,12 +17,18 @@
<view class="body" style="width: 100%;height: 100%;background-color: white;">
<scroll-view scroll-y>
<view style="display: flex;flex-direction: column;align-items: flex-end;">
<view style="display: flex;flex-direction: column;">
<view style="display: flex;flex-direction: row;">
<view @click="handleAgree" style="margin-top: 12rpx;margin-right: 10rpx;">付费须知></view>
<image @click="handleClickClose"
style="width: 30rpx;height: 30rpx;display: flex;align-items: right;margin-top: 20rpx;margin-right: 20rpx;margin-bottom: 10rpx;"
src="@/static/index/ic_quit_white.png"></image>
<view v-if="agreementDto != undefined" @click="handleUnsign"
style="margin-top: 12rpx;margin-left: 10rpx;">自动续费管理</view>
<view style="margin-top: 12rpx;margin-left: auto;display: flex;flex-direction: row;">
<view @click="handleAgree" style="margin-right: 10rpx;">付费须知></view>
<image @click="handleClickClose"
style="width: 30rpx;height: 30rpx;display: flex;align-items: right;margin-top: 20rpx;margin-left: auto;margin-right: 20rpx;margin-bottom: 10rpx;"
src="@/static/index/ic_quit_white.png"></image>
</view>
</view>
</view>
<view class="section">
......@@ -74,7 +80,8 @@
<script>
import common from '@/mixins/common';
import {
message
message,
navigateTo
} from '@/utils/fun';
export default {
name: 'coinPopup',
......@@ -98,7 +105,7 @@
vipList: [],
selectedIndex: 0,
agreeFlag: false,
userBean: {},
userBean: {},
agreementDto: null,
os: 'android',
titleText: '超多精彩小说一键解锁',
......@@ -146,10 +153,16 @@
success: ({
data
}) => {
this.agreementDto = data.agreement;
this.agreementDto = data.agreement;
}
});
},
handleUnsign() {
if (this.agreementDto) {
let params = JSON.stringify(this.agreementDto)
navigateTo(`/pagesA/unsign/unsign?params=` + params)
}
},
handleAgree() {
this.agreeFlag = true
},
......@@ -219,14 +232,14 @@
appId: wxData.appId,
path: 'pages/loading',
extraData: wxData.params,
success(res) {
console.log("wxSign suc=",res);
// 成功跳转到签约小程序
success(res) {
console.log("wxSign suc=", res);
// 成功跳转到签约小程序
that.queryOrderStatus(largeType, wxData.tidStr);
},
fail(res) {
// 未成功跳转到签约小程序
console.log("wxSign fail=",res);
// 未成功跳转到签约小程序
console.log("wxSign fail=", res);
}
})
},
......
......@@ -20,7 +20,7 @@
// #endif
{
"path": "pages/home",
"style": {
"style": {
"navigationBarTitleText": "河狸小故事",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
......@@ -39,30 +39,40 @@
"subPackages": [{
"root": "pagesA",
"pages": [{
"path": "vipPay/vipPay",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "cdkey/cdkey",
"style": {
"navigationBarTitleText": "兑换会员",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
"path": "vipPay/vipPay",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "cdkey/cdkey",
"style": {
"navigationBarTitleText": "兑换会员",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
},
{
"path": "unsign/unsign",
"style": {
"navigationBarTitleText": "管理自动续费",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}
}]
]
}, {
"root": "page-subs/sub_A",
"pages": [{
"path": "book-search/book-search",
"style": {
"navigationBarTitleText": "书籍搜索",
"enablePullDownRefresh": false,
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false,
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
......@@ -70,29 +80,29 @@
"path": "book-content/book-content",
"style": {
"navigationBarTitleText": "阅读",
"enablePullDownRefresh": true,
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": true,
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
"path": "book-long-content/book-long-content",
"style": {
"navigationBarTitleText": "阅读",
"enablePullDownRefresh": true,
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTitleText": "阅读",
"enablePullDownRefresh": true,
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, {
}, {
"path": "book-cover/book-cover",
"style": {
"navigationBarTitleText": "封面",
"enablePullDownRefresh": false,
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false,
"navigationStyle": "default",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
......
......@@ -20,14 +20,11 @@
message,
alert,
} from '@/utils/fun.js';
import {
openUrl
} from '@/utils/app+.js';
const app = getApp();
export default {
name: 'index',
name: 'cdkey',
mixins: [common],
data() {
return {
......
<template>
<view class="body">
<text style="margin-left: 40rpx;margin-top: 50rpx;font-size: 36rpx;">自动续费管理</text>
<view class="unsign-head">
<view style="position: absolute;z-index: 10;width: 100%;padding-top: 30rpx;">
<text style="margin-left: 50rpx;font-size: 30rpx;">{{ agreementData.topText }}</text>
<view class="section">
<view>下次扣款日期</view>
<view>{{ agreementData.nextDay }}</view>
</view>
<view class="section">
<view>下次扣款金额</view>
<view>{{ agreementData.balance }}</view>
</view>
<view class="section">
<view>支付方式</view>
<view>{{ agreementData.payChannel }}</view>
</view>
<text class="unsignbutton" @click="unsign">取消自动续费</text>
</view>
<image :src="bgImg" mode="widthFix" style="position: absolute;width: 100%;"></image>
</view>
</view>
</template>
<script>
import common from '@/mixins/common';
import {
navigateBack,
message,
alert,
} from '@/utils/fun.js';
const app = getApp();
export default {
name: 'unsign',
mixins: [common],
data() {
return {
agreementData: {},
bgImg: 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_sign.png'
};
},
onLoad(options) {
this.agreementData = JSON.parse(decodeURIComponent(options.params));
},
methods: {
unsign() {
this.post({
url: '/vip/unSign',
showLoading: false,
success: ({
data
}) => {
message.notify('已取消自动签约')
setTimeout(() => {
navigateBack()
}, 1000)
}
});
}
}
};
</script>
<style lang="scss">
@import '@/scss/uni.scss';
.body {
background-color: whitesmoke;
color: #74380C;
}
.unsign-head {
margin-left: 3%;
margin-top: 5%;
width: 94%;
position: relative;
.section {
margin: 30rpx 50rpx;
display: flex;
justify-content: space-between;
}
.unsignbutton {
border: 1rpx solid #E6985D;
padding: 6rpx 20rpx;
border-radius: 3rpx;
text-align: center;
color: #763904;
font-size: 26rpx;
position: absolute;
right: 50rpx;
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment