Commit ad216e1a authored by 王建威's avatar 王建威

连续包月

parent ec429ffc
<template>
<view class="topbar_view" :style="{'color': titleColor, 'background-color': bgColor}">
<view class="topbar_view" :style="[{'color': titleColor, 'background-color': bgColor}, bold ? {'font-weight':900} : 'initial']">
<text class="eosfont left_icon" @click="back()">&#xe622;</text>
{{this.title}}
</view>
......@@ -19,6 +19,10 @@
bgColor: {
type: String,
default: '#fff'
},
bold: {
type: Boolean,
default: false
}
},
methods: {
......
<template>
<view v-if="visibleSync" :class="{ 'uni-drawer--visible': showDrawer }" class="uni-drawer" @touchmove.stop.prevent="clear">
<view class="uni-drawer__mask" :class="{ 'uni-drawer__mask--visible': showDrawer && mask }" @tap="close('mask')" />
<view class="uni-drawer__content" :class="{'uni-drawer--right': rightMode,'uni-drawer--left': !rightMode, 'uni-drawer__content--visible': showDrawer}" :style="{width:drawerWidth+'px'}">
<slot />
</view>
</view>
</template>
<script>
/**
* Drawer 抽屉
* @description 抽屉侧滑菜单
* @tutorial https://ext.dcloud.net.cn/plugin?id=26
* @property {Boolean} mask = [true | false] 是否显示遮罩
* @property {Boolean} maskClick = [true | false] 点击遮罩是否关闭
* @property {Boolean} mode = [left | right] Drawer 滑出位置
* @value left 从左侧滑出
* @value right 从右侧侧滑出
* @property {Number} width 抽屉的宽度 ,仅 vue 页面生效
* @event {Function} close 组件关闭时触发事件
*/
export default {
name: 'UniDrawer',
props: {
/**
* 显示模式(左、右),只在初始化生效
*/
mode: {
type: String,
default: ''
},
/**
* 蒙层显示状态
*/
mask: {
type: Boolean,
default: true
},
/**
* 遮罩是否可点击关闭
*/
maskClick:{
type: Boolean,
default: true
},
/**
* 抽屉宽度
*/
width: {
type: Number,
default: 220
}
},
data() {
return {
visibleSync: false,
showDrawer: false,
rightMode: false,
watchTimer: null,
drawerWidth: 220
}
},
created() {
// #ifndef APP-NVUE
this.drawerWidth = this.width
// #endif
this.rightMode = this.mode === 'right'
},
methods: {
clear(){},
close(type) {
// fixed by mehaotian 抽屉尚未完全关闭或遮罩禁止点击时不触发以下逻辑
if((type === 'mask' && !this.maskClick) || !this.visibleSync) return
this._change('showDrawer', 'visibleSync', false)
},
open() {
// fixed by mehaotian 处理重复点击打开的事件
if(this.visibleSync) return
this._change('visibleSync', 'showDrawer', true)
},
_change(param1, param2, status) {
this[param1] = status
if (this.watchTimer) {
clearTimeout(this.watchTimer)
}
this.watchTimer = setTimeout(() => {
this[param2] = status
this.$emit('change',status)
}, status ? 50 : 300)
}
}
}
</script>
<style lang="scss" scoped>
// 抽屉宽度
$drawer-width: 220px;
.uni-drawer {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
z-index: 999;
}
.uni-drawer__content {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: absolute;
top: 0;
width: $drawer-width;
bottom: 0;
background-color: $uni-bg-color;
transition: transform 0.3s ease;
}
.uni-drawer--left {
left: 0;
/* #ifdef APP-NVUE */
transform: translateX(-$drawer-width);
/* #endif */
/* #ifndef APP-NVUE */
transform: translateX(-100%);
/* #endif */
}
.uni-drawer--right {
right: 0;
/* #ifdef APP-NVUE */
transform: translateX($drawer-width);
/* #endif */
/* #ifndef APP-NVUE */
transform: translateX(100%);
/* #endif */
}
.uni-drawer__content--visible {
transform: translateX(0px);
}
.uni-drawer__mask {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
opacity: 0;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: $uni-bg-color-mask;
transition: opacity 0.3s;
}
.uni-drawer__mask--visible {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
opacity: 1;
}
</style>
......@@ -2,7 +2,7 @@
"name": "shop_mobile_uni",
"appid": "__UNI__F904656",
"description": "",
"versionName": "1.0.18",
"versionName": "1.0.19",
"versionCode": "100",
"transformPx": false,
"app-plus": {
......@@ -51,7 +51,7 @@
"mode": "history",
"base": "/uni"
},
"publicPath": "https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/mirror/1.0.18/",
"publicPath": "https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/test/1.0.19/",
"optimization": {
"treeShaking": {
"enable": true
......
{
"name": "shop_mobile_uni",
"version": "1.0.18",
"version": "1.0.19",
"description": "谛宝多多商城",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
......
......@@ -173,6 +173,42 @@
"style": {
"navigationBarTitleText": "签到记录-谛宝多多商城"
}
},
{
"path": "pages/monthly/monthly",
"style": {
"navigationBarTitleText": "连续包月计划-谛宝多多商城"
}
},
{
"path": "pages/monthlyIntroduce/monthlyIntroduce",
"style": {
"navigationBarTitleText": "包月说明-谛宝多多商城"
}
},
{
"path": "pages/monthlyPlan/monthlyPlan",
"style": {
"navigationBarTitleText": "我的包年计划-谛宝多多商城"
}
},
{
"path": "pages/monthlyContract/monthlyContract",
"style": {
"navigationBarTitleText": "我的合同-谛宝多多商城"
}
},
{
"path": "pages/monthlyJoin/monthlyJoin",
"style": {
"navigationBarTitleText": "加入包年计划-谛宝多多商城"
}
},
{
"path": "pages/monthlyDeposit/monthlyDeposit",
"style": {
"navigationBarTitleText": "加入包年计划-谛宝多多商城"
}
}
],
"globalStyle": {
......
......@@ -79,9 +79,15 @@
},
title: '社会统一信用代码',
submitFlag: true
submitFlag: true,
month_rule_id: '', // 从连续包月跳转过来
is_deposit: '' // 从连续包月跳转过来
}
},
onLoad(options) {
this.month_rule_id = options.month_rule_id;
this.is_deposit = options.is_deposit;
},
methods: {
changeEnterpriseType(type) {
this.params.enterprise_type = type;
......@@ -177,6 +183,11 @@
success: (res) => {
this.submitFlag = true;
if(res.data.code === 0) {
if(this.month_rule_id) {
// 从连续包月跳转过来
this.monthlySign();
return
}
uni.navigateTo({
url: '/pages/apply/choosetype'
});
......@@ -189,6 +200,45 @@
}
}
})
},
//连续包月签署合同
monthlySign() {
uni.request({
url: '/uni/api/month_signcontract/AddContract',
method: 'POST',
dataType: 'json',
data: {
is_deposit: this.is_deposit,
month_rule_id: this.month_rule_id
},
success:(res) => {
if(res.data.code === 0) {
// 是否交押金
uni.showToast({
title: '合同已签署',
icon: 'none'
})
if(this.is_deposit === '1') {
// 交押金
setTimeout(() => {
uni.hideLoading();
this.$jump(`/pages/monthlyDeposit/monthlyDeposit?month_apply_id=${res.data.data.month_apply_id}`,2);
}, 2000);
} else {
// 不交押金
setTimeout(() => {
uni.hideLoading();
this.$jump(`/pages/monthlyPlan/monthlyPlan?month_apply_id=${res.data.data.month_apply_id}`,2);
}, 2000);
}
} else {
uni.showToast({
title: res.data.message,
icon: 'none'
})
}
}
})
}
},
components: {
......
This diff is collapsed.
<template>
<view class="main">
<TopBar title="我的合同" />
<view class="contract_bar">
<text class="left">当前合同</text>
<text class="right_btn" @click="cancelContract(data[0]['month_apply_id'])" v-if="data[0]['apply_status'] === '1' || data[0]['apply_status'] === '2'">退出包年计划</text>
</view>
<view class="now_contract">
<view class="contract_flex">
<view class="flex_left">
<view class="con_title">合同时长</view>
<view class="con_detail">{{data[0].contract_period}}个月</view>
</view>
<view class="flex_right">
<view class="con_title">签署时间</view>
<view class="con_detail">{{data[0].sign_time.substr(0, 10)}}</view>
</view>
</view>
<view class="contract_flex">
<view class="flex_left">
<view class="con_title">享受折扣</view>
<view class="con_detail">{{Number(data[0].discount)*10}}</view>
</view>
<view class="flex_right">
<view class="con_title">采购量</view>
<view class="con_detail">{{data[0].min_quantity}}</view>
</view>
</view>
<view class="contract_flex">
<view class="flex_left">
<view class="con_title">押金</view>
<view class="con_detail spec_color" v-if="data[0]['is_deposit'] === '1'">¥{{Number(data[0].deposit/100)*Number(data[0].min_quantity)}}</view>
<view class="con_detail" v-else></view>
</view>
<view class="flex_right">
<view class="con_title">状态</view>
<view class="con_detail spec_color">{{data[0].apply_status_name}}</view>
</view>
</view>
<view class="check_btn">查看合同</view>
</view>
<view class="contract_bar" v-if="data.length>1">
<text class="left">其他合同</text>
</view>
<view style="padding: 0;" v-if="data.length>1">
<view class="now_contract packup" v-for="(item, index) in data" :key="index" v-if="index !== 0" :style="[rotate && (rotateKey === index) ? {'height':'400rpx'} : null]">
<view class="contract_flex">
<view class="flex_left">
<view class="con_title">合同时长</view>
<view class="con_detail">{{item.contract_period}}个月</view>
</view>
<view class="flex_right">
<view class="con_title">签署时间</view>
<view class="con_detail">{{item.sign_time.substr(0, 10)}}</view>
</view>
</view>
<view class="contract_flex">
<view class="flex_left">
<view class="con_title">享受折扣</view>
<view class="con_detail">{{Number(item.discount)*10}}</view>
</view>
<view class="flex_right">
<view class="con_title">采购量</view>
<view class="con_detail">{{item.min_quantity}}</view>
</view>
</view>
<view class="contract_flex">
<view class="flex_left">
<view class="con_title">押金</view>
<view class="con_detail spec_color" v-if="item.is_deposit === '1'">¥{{Number(item.deposit/100)*Number(item.min_quantity)}}</view>
<view class="con_detail" v-else></view>
</view>
<view class="flex_right">
<view class="con_title">状态</view>
<view class="con_detail spec_color">{{item.apply_status_name}}</view>
</view>
</view>
<text class="eosfont" :class="{rotate: (index === rotateKey) && rotate}" @click="pack(index)">&#xe729;</text>
<view class="check_btn">查看合同</view>
</view>
</view>
</view>
</template>
<script>
import TopBar from '@/components/TopBar/TopBar.vue';
export default {
data() {
return {
data: [{
contract_period: '',
sign_time: '',
deposit: '',
discount: '',
min_quantity: '',
apply_status_name: ''
}],
rotate: false,
rotateKey: -1
}
},
onLoad() {
uni.request({
url: '/uni/api/month/GetMonthApplyList',
method: 'GET',
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
this.data = res.data.data;
}
}
});
},
methods: {
cancelContract(id) {
uni.showModal({
title: '提示',
content: '确认取消该合同吗?',
success:(data) => {
if(data.confirm) {
uni.request({
url: '/uni/api/month_signcontract/CancelContract',
method: 'POST',
dataType: 'json',
data: {
month_apply_id: id
},
success: (res) => {
uni.showToast({
title: '您的合同已取消',
icon: 'none'
});
setTimeout(() => {
this.$jump('/pages/monthly/monthly',2);
}, 2000);
}
})
}
}
});
},
pack(key) {
this.rotateKey = key;
this.rotate = !this.rotate;
}
},
components: {
TopBar
}
}
</script>
<style lang="scss" scoped>
.main {
padding-top: 80rpx;
background-color: #F5F5F5;
.contract_bar {
height: 98rpx;
padding: 0 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
.left {
font-size: 36rpx;
color: #000;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
}
.right_btn {
width: 200rpx;
height: 60rpx;
border: 1px solid #dcdcdc;
box-sizing: border-box;
background-color: #fff;
text-align: center;
line-height: 58rpx;
font-size: 26rpx;
color: #333;
border-radius: 30rpx;
}
}
.now_contract {
padding: 32rpx;
background-color: #fff;
position: relative;
transition: all 0.5s;
.contract_flex {
display: flex;
margin-bottom: 24rpx;
.flex_left {
margin-right: 182rpx;
width: 120rpx;
}
}
.con_title {
color: #464646;
font-size: 26rpx;
height: 36rpx;
line-height: 36rpx;
margin-bottom: 4rpx;
}
.con_detail {
color: #000;
font-size: 32rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
height: 44rpx;
line-height: 44rpx;
}
.spec_color {
color: #B48000;
}
.check_btn {
width: 100%;
height: 76rpx;
line-height: 74rpx;
text-align: center;
border: 1px solid #464646;
box-sizing: border-box;
color: #464646;
font-size: 26rpx;
border-radius: 16rpx;
}
}
.packup {
border-bottom: 1px solid #ececec;
height: 80rpx;
overflow: hidden;
.eosfont {
font-size: 32rpx;
font-weight: 900;
position: absolute;
right: 24rpx;
top: 60rpx;
transition: all 0.5s;
}
.rotate {
transform: rotateZ(180deg);
}
}
}
</style>
This diff is collapsed.
<template>
<view class="main">
<view class="top_bar">
<text class="eosfont" @click="$backup">&#xe743;</text>
包月说明
</view>
<view class="content_view">
<view class="content_title">
<text class="circle_num">1</text>包月是什么?
</view>
<view class="content_main">谛宝多多会根据医院的拿货周期,起订量给医院下发一个折扣,包月期间,医院购买参与包月的商品时可享受折扣,单品最低5折。</view>
<view class="content_title">
<text class="circle_num">1</text>怎么包月?
</view>
<view class="content_main">点击下方选择起订量,选择拿货周期和起订量,签署合同,缴纳定金,则完成包月,合同有效期内,购买包月产品,立享折扣。</view>
<view class="content_title">
<text class="circle_num">1</text>关于定金
</view>
<view class="content_main">合同有效期内,包月产品消费总额(折扣价)达到起订量,自合同结束日期5个工作日内,全额退还定金,否则不予以退还。</view>
<view class="content_title">
<text class="circle_num">1</text>缴纳定金与不缴纳定金的区别
</view>
<view class="content_main">缴纳定金,合同有效期内购买包月产品可立享全额折扣;不缴纳定金,合同有效期内购买包月产品,统一享受8.5折,合同有效期内,包月产品消费总额(折扣价)达到起订量,自合同结束日期5个工作日内,按差价返现至账户余额,可提现,(例如全额折扣为6折,则返现消费总额的25%)反之不予以返现。</view>
<view class="content_title" style="margin-bottom: 0;">有任何问题</view>
<view class="content_title">烦请点击页面上的消息按钮进行</view>
<view class="join_btn">加入包年计划</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
}
}
</script>
<style lang="scss" scoped>
.main {
background-color: #FFFCF6;
.top_bar {
height: 80rpx;
line-height: 80rpx;
text-align: center;
background:linear-gradient(135deg,rgba(255,232,199,1) 0%,rgba(214,163,93,1) 100%);
border-radius: 0 0 24rpx 24rpx;
position: fixed;
width: 100%;
box-sizing: border-box;
.eosfont {
font-size: 56rpx;
position: absolute;
left: 20rpx;
top: 2rpx;
}
}
.content_view {
padding: 130rpx 40rpx 24rpx;
.content_title {
margin-bottom: 20rpx;
font-size: 32rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
height: 44rpx;
line-height: 44rpx;
display: flex;
align-items: center;
.circle_num {
width: 28rpx;
height: 28rpx;
border-radius: 50%;
background-color: #DCAD6C;
color: #fff;
line-height: 28rpx;
text-align: center;
font-size: 22rpx;
display: inline-block;
margin-right: 10rpx;
}
}
}
.content_main {
font-size: 28rpx;
color: #807B74;
line-height: 40rpx;
margin-bottom: 30rpx;
}
.join_btn {
height: 88rpx;
line-height: 88rpx;
background:linear-gradient(314deg,rgba(238,190,114,1) 0%,rgba(255,224,176,1) 100%);
box-shadow:0px 4rpx 40rpx 0px rgba(242,199,130,0.5);
border-radius: 20rpx;
text-align: center;
font-size: 32rpx;
position: fixed;
left: 24rpx;
bottom: 24rpx;
width: 702rpx;
}
}
</style>
This diff is collapsed.
<template>
<view class="main">
<view class="top_bar">
<view class="left" @click="$backup">
<text class="eosfont left_icon">&#xe743;</text>l
<text class="close_title">关闭</text>
</view>
<text class="middle">我的包年计划</text>
<text class="my_contract" @click="$jump('/pages/monthlyContract/monthlyContract',2)">我的合同</text>
</view>
<view class="plan_info">
<view class="info_title">当前累计已采购 (元)</view>
<view class="info_amount">{{month_apply_info.total_amount}}</view>
<view class="wait" v-if="month_apply_info.apply_status=== '1'" @click="$jump(`/pages/monthlyDeposit/monthlyDeposit?month_apply_id=${month_apply_info.month_apply_id}`,2)">您有一笔押金等待缴纳</view>
<view class="info_detail">
<view class="detail_item">
<view class="title1">{{month_apply_info.date_diff}}</view>
<view class="title2">剩余时间</view>
</view>
<text class="line"></text>
<view class="detail_item">
<view class="title1">{{month_apply_info.min_quantity}}</view>
<view class="title2">计划总采购</view>
</view>
<text class="line"></text>
<view class="detail_item">
<view class="title1">{{month_apply_info.discount*10}}</view>
<view class="title2">当前享折扣</view>
</view>
</view>
</view>
<view class="mid_card">
<view class="mid_left">
<view class="text1">包年计划商品专区</view>
<view class="text2">自由搭配 采购钜惠</view>
</view>
<view class="mid_right">
<view class="text1">折扣采购</view>
<view class="text2" @click="$jump('/pages/monthly/monthly',2)">去看看</view>
</view>
</view>
<view class="pro_title">
采购明细
<text>/包含计划内商品的订单</text>
</view>
<view v-if="month_order_list !== null">
<view class="pro_item" v-for="(item, index) in month_order_list" :key="index">
<view class="item_top">计划内采购金额:<text>¥{{item.total_price}}</text></view>
<view class="item_content">
<view class="content_item" v-for="(vo, key) in item.child" :key="key" @click="$jumpGoodDetail(vo.goods_id)">
<image class="item_img" :src="vo.goods_image || $noGoodsImg"/>
<view>
<view class="item_name">{{vo.goods_name}}</view>
<view class="item_spec" v-if="vo.specification" v-html="vo.specification"></view>
</view>
</view>
</view>
</view>
</view>
<view v-else class="no_data">
<view class="no_title">暂无记录</view>
<view class="no_btn" @click="$jump('/pages/monthly/monthly',2)">前往专区</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
month_apply_info: [],
month_order_list: []
}
},
onLoad(options) {
let month_apply_id = options.month_apply_id;
uni.request({
url: '/uni/api/month/GetMyMonthApply',
method: 'POST',
data: {
month_apply_id: month_apply_id
},
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
this.month_apply_info = res.data.data.month_apply_info[0];
res.data.data.month_order_list !== null && res.data.data.month_order_list.map((item, index) => {
item.child.map((vo, key) => {
if(!vo.specification) return
vo.specification = vo.specification.replace(/src/, 'style="width:18px;height:18px;vertical-align:middle;" src');
});
});
this.month_order_list = res.data.data.month_order_list;
}
}
})
}
}
</script>
<style lang="scss" scoped>
.main {
.top_bar {
display: flex;
justify-content: space-between;
align-items: center;
height: 80rpx;
padding: 0 20rpx;
.left {
display: flex;
align-items: center;
color: #7c7c7c;
.left_icon {
font-weight: 900;
margin-right: 10rpx;
color: #000;
font-size: 40rpx;
}
.close_title {
font-size: 28rpx;
color: #212121;
margin-left: 10rpx;
}
}
.middle {
text-align: center;
color: #000;
font-size: 32rpx;
line-height: 44rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
}
.my_contract {
color: #000;
font-size: 26rpx;
line-height: 36rpx;
}
}
.plan_info {
background:linear-gradient(135deg,rgba(255,232,199,1) 0%,rgba(214,163,93,1) 100%);
overflow: hidden;
.info_title {
text-align: center;
font-size: 28rpx;
height: 40rpx;
line-height: 40rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
color: rgba(0,0,0,0.6);
margin-top: 40rpx;
}
.info_amount {
text-align: center;
font-size: 64rpx;
color: #000;
height: 90rpx;
line-height: 90rpx;
font-family:PingFangSC-Semibold,PingFang SC;
font-weight:600;
}
.wait {
width: 340rpx;
height: 64rpx;
line-height: 64rpx;
text-align: center;
border-radius: 32rpx;
background-color: rgba(0,0,0,0.5);
color: #fff;
font-size: 28rpx;
margin: 24rpx auto 0;
}
.info_detail {
width: 710rpx;
height: 160rpx;
margin: 24rpx auto 0;
border-radius:32rpx 32rpx 12rpx 12rpx;
background:linear-gradient(180deg,rgba(51,51,51,1) 0%,rgba(48,47,53,1) 100%);
box-shadow:0px 4rpx 60rpx 0px rgba(0,0,0,0.1);
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 36rpx;
box-sizing: border-box;
.line {
width: 2rpx;
height: 40rpx;
background-color: #000;
}
.detail_item {
text-align: center;
min-width: 180rpx;
.title1 {
color: #FCE3C1;
font-size: 36rpx;
font-family:PingFangSC-Semibold,PingFang SC;
font-weight:600;
height: 50rpx;
line-height: 50rpx;
}
.title2 {
margin-top: 8rpx;
color: rgba(253,228,194,0.5);
font-size: 26rpx;
line-height: 36rpx;
height: 36rpx;
}
}
}
}
.mid_card {
width: 702rpx;
height: 120rpx;
margin: 30rpx auto 40rpx;
border-radius: 16rpx;
overflow: hidden;
display: flex;
.mid_left {
background:linear-gradient(135deg,rgba(47,46,51,1) 0%,rgba(69,75,93,1) 100%);
width: 422rpx;
height: 100%;
display: flex;
justify-content: center;
flex-direction: column;
padding-left: 40rpx;
.text1 {
font-size: 32rpx;
color: #FDE4C2;
height: 44rpx;
line-height: 44rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
}
.text2 {
font-size: 22rpx;
color:rgba(253,228,194,0.6);
height: 32rpx;
line-height: 32rpx;
letter-spacing: 2rpx;
margin-top: 4rpx;
}
}
.mid_right {
width: 240rpx;
height: 100%;
background-color: #EFD5A2;
display: flex;
flex-direction: column;
justify-content: center;
.text1 {
color: #2F2E33;
font-size: 32rpx;
height: 44rpx;
line-height: 44rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
margin: -6rpx 0 6rpx 78rpx;
}
.text2 {
width: 120rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
background-color: #3B3E4A;
border-radius: 20rpx;
font-size: 24rpx;
color: #fff;
margin-left: 82rpx;
}
}
}
.pro_title {
font-size: 36rpx;
height: 50rpx;
line-height: 50rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
padding-left: 24rpx;
margin-bottom: 24rpx;
text {
margin-left: 16rpx;
color: #959595;
font-size: 28rpx;
font-weight: initial;
}
}
.pro_item {
width: 702rpx;
margin: 0 auto 34rpx;
.item_top {
width: 392rpx;
height: 60rpx;
line-height: 60rpx;
background-color: #FAE0BB;
border-radius:16rpx 80rpx 0px 0px;
color: #2F2E33;
font-size: 26rpx;
line-height: 60rpx;
padding-left: 20rpx;
text {
font-size: 32rpx;
font-weight: 500;
}
}
.item_content {
background-color: #fff;
padding: 24rpx 24rpx 0;
box-shadow:0px 4rpx 60rpx 0px rgba(0,0,0,0.05);
border-radius:20rpx;
.content_item {
padding-bottom: 24rpx;
display: flex;
.item_img {
width: 160rpx;
height: 160rpx;
border-radius: 16rpx;
margin-right: 24rpx;
}
.item_name {
color: #212121;
font-size: 28rpx;
height: 40rpx;
line-height: 40rpx;
margin-bottom: 8rpx;
}
.item_spec {
height: 36rpx;
line-height: 36rpx;
border-radius: 16rpx;
background-color: #F5F5F5;
padding: 0 16rpx;
color: #7C7C7C;
font-size: 22rpx;
}
}
}
}
.no_data {
margin-top: 120rpx;
.no_title {
color: #959595;
font-size: 30rpx;
height: 42rpx;
line-height: 42rpx;
text-align: center;
}
.no_btn {
width: 180rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
border-radius: 10rpx;
background-color: #E2B77C;
font-size: 26rpx;
color: #302F35;
margin: 40rpx auto 0;
}
}
}
</style>
......@@ -5,7 +5,7 @@
<view class="title">微信支付</view>
</view>
<view class="sub-title">
谛宝多多分期定金订单-{{order_id}}
谛宝多多订单-{{order_id}}
</view>
<view class="price">
{{amount}}
......@@ -25,14 +25,16 @@
return {
loading: false,
amount: '',
order_id: ''
order_id: '',
type: '' // monthly:连续包月
}
},
onLoad(){
onLoad(options){
const { href } = location;
const { amount, order_id, code } = parse(href.split('?')[1]);
this.amount = amount;
this.order_id = order_id;
this.type = uni.getStorageSync('monthly') || '';
},
methods: {
handleSumit(){
......@@ -46,8 +48,14 @@
return;
}
this.loading = true;
let url = '';
if(this.type === 'monthly') {
url = '/uni/api/month_repayment/GoPay'
} else {
url = '/uni/api/repayment/GoPay';
}
uni.request({
url: `/uni/api/repayment/GoPay`,
url: url,
method: 'post',
dataType: 'json',
data: {
......@@ -91,6 +99,7 @@
WeixinJSBridge.log(res.err_msg);
const url = window.location.origin;
if (res.err_msg === "get_brand_wcpay_request:ok") {
uni.removeStorageSync('monthly');
uni.navigateTo({
url: '/pages/payresult/payresult'
})
......
......@@ -42,14 +42,16 @@
order_id: '',
password: '',
loading: false,
phone_mob: ''
phone_mob: '',
type: '' // monthly:连续包月
}
},
onLoad(option){
const {amount, money, order_id} = option;
const {amount, money, order_id,type} = option;
this.money = money || '0.00';
this.order_price = amount || '0.00';
this.order_id = order_id || '';
this.type = type || '';
uni.request({
url: '/uni/api/member/profile',
method: 'GET',
......@@ -62,8 +64,14 @@
methods: {
handleSumit(){
this.loading = true;
let url = '';
if(this.type === 'monthly') {
url = '/uni/api/month_repayment/GoPay'
} else {
url = '/uni/api/repayment/GoPay'
}
uni.request({
url: `/uni/api/repayment/GoPay`,
url: url,
method: 'post',
dataType: 'json',
data: {
......@@ -77,6 +85,10 @@
const {data} = res;
this.loading = false;
if(data.code === 0){
if(this.type === 'monthly') {
this.$jump('/pages/monthly/monthly',2);
return
}
uni.navigateTo({
url: '/pages/payresult/payresult'
})
......
@font-face {
font-family: "eosfont";
src: url('https://at.alicdn.com/t/font_1878093_yggdekpesv.eot');
src: url('https://at.alicdn.com/t/font_1878093_yggdekpesv.eot?#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_1878093_yggdekpesv.woff2') format('woff2'),
url('https://at.alicdn.com/t/font_1878093_yggdekpesv.woff') format('woff'),
url('https://at.alicdn.com/t/font_1878093_yggdekpesv.ttf') format('truetype'),
url('https://at.alicdn.com/t/font_1878093_yggdekpesv.svg#iconfont') format('svg');
src: url('https://at.alicdn.com/t/font_1878093_3hvt9j2lgso.eot');
src: url('https://at.alicdn.com/t/font_1878093_3hvt9j2lgso.eot?#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_1878093_3hvt9j2lgso.woff2') format('woff2'),
url('https://at.alicdn.com/t/font_1878093_3hvt9j2lgso.woff') format('woff'),
url('https://at.alicdn.com/t/font_1878093_3hvt9j2lgso.ttf') format('truetype'),
url('https://at.alicdn.com/t/font_1878093_3hvt9j2lgso.svg#iconfont') format('svg');
}
.eosfont {
......
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