Commit 1aeed4a6 authored by 王建威's avatar 王建威

bug fix

parent ad216e1a
...@@ -68,6 +68,10 @@ function __reloadResource(_this) { ...@@ -68,6 +68,10 @@ function __reloadResource(_this) {
function jumpGoodDetail(goods_id) { function jumpGoodDetail(goods_id) {
window.location.href = `${php}app=goods&id=${goods_id}`; window.location.href = `${php}app=goods&id=${goods_id}`;
}
function jumpOrderDetail(order_id) {
window.location.href = `${php}app=buyer_order&act=view&order_id=${order_id}`;
} }
function backup() { function backup() {
...@@ -105,6 +109,7 @@ function jump(url, type) { ...@@ -105,6 +109,7 @@ function jump(url, type) {
Vue.prototype.$jumpGoodDetail = jumpGoodDetail; Vue.prototype.$jumpGoodDetail = jumpGoodDetail;
Vue.prototype.$jump = jump; Vue.prototype.$jump = jump;
Vue.prototype.$jumpOrderDetail = jumpOrderDetail;
Vue.prototype.$getCache = getCache; Vue.prototype.$getCache = getCache;
Vue.prototype.$addCart = addCart; Vue.prototype.$addCart = addCart;
Vue.prototype.$backup = backup; Vue.prototype.$backup = backup;
......
...@@ -177,13 +177,13 @@ ...@@ -177,13 +177,13 @@
{ {
"path": "pages/monthly/monthly", "path": "pages/monthly/monthly",
"style": { "style": {
"navigationBarTitleText": "连续包月计划-谛宝多多商城" "navigationBarTitleText": "包年计划-谛宝多多商城"
} }
}, },
{ {
"path": "pages/monthlyIntroduce/monthlyIntroduce", "path": "pages/monthlyIntroduce/monthlyIntroduce",
"style": { "style": {
"navigationBarTitleText": "包说明-谛宝多多商城" "navigationBarTitleText": "包说明-谛宝多多商城"
} }
}, },
{ {
......
...@@ -4,12 +4,13 @@ ...@@ -4,12 +4,13 @@
scroll-y scroll-y
:show-scrollbar="false" :show-scrollbar="false"
style="height: 100vh;" style="height: 100vh;"
@scrolltolower="getData(current)" @scrolltolower="search()"
@scroll="scroll"
> >
<view class="top_card"> <view class="top_card">
<view class="fixed"> <view class="fixed">
<view class="top_bar"> <view class="top_bar">
<view class="left"> <view class="left" @click="$backup">
<text class="eosfont left_icon">&#xe743;</text>l <text class="eosfont left_icon">&#xe743;</text>l
<text class="close_title">关闭</text> <text class="close_title">关闭</text>
</view> </view>
...@@ -21,8 +22,8 @@ ...@@ -21,8 +22,8 @@
<view class="join_plan" v-else @click="$jump(`/pages/monthlyPlan/monthlyPlan?month_apply_id=${month_apply_id}`,2)">我的包年计划</view> <view class="join_plan" v-else @click="$jump(`/pages/monthlyPlan/monthlyPlan?month_apply_id=${month_apply_id}`,2)">我的包年计划</view>
</view> </view>
<view class="search_bar"> <view class="search_bar">
<text class="eosfont">&#xe73c;</text> <text class="eosfont" @click="search(1)">&#xe73c;</text>
<input type="text" class="search_input"> <input type="text" class="search_input" @confirm="search(1)" v-model="keyword">
</view> </view>
</view> </view>
<view class="monthly_title">想你所想·灵活采购</view> <view class="monthly_title">想你所想·灵活采购</view>
...@@ -34,7 +35,7 @@ ...@@ -34,7 +35,7 @@
<view class="card_detail"> <view class="card_detail">
<view class="detail_flex"> <view class="detail_flex">
<text class="flex_title">自由搭配 7折钜惠</text> <text class="flex_title">自由搭配 7折钜惠</text>
<view class="flex_right" @click="$jump('/pages/monthlyIntroduce/monthlyIntroduce',2)"> <view class="flex_right" @click="$jump(`/pages/monthlyIntroduce/monthlyIntroduce?login_flg=${login_flg}`,2)">
<text>包年计划说明</text> <text>包年计划说明</text>
<text class="eosfont" style="font-size: 20rpx;">&#xe608;</text> <text class="eosfont" style="font-size: 20rpx;">&#xe608;</text>
</view> </view>
...@@ -74,7 +75,9 @@ ...@@ -74,7 +75,9 @@
<view class="join_btn" v-if="!month_apply_id" @click="joinMonthly"> <view class="join_btn" v-if="!month_apply_id" @click="joinMonthly">
<view class="title1">加入包年计划</view> <view class="title1">加入包年计划</view>
<view class="title2"> <view class="title2">
可选6个月/12个月计划 可选
<text v-for="(item, index) in month_rule_list" :key="index">{{item.contract_period}}个月<text v-if="index+1 !== month_rule_list.length">/</text></text>
计划
</view> </view>
</view> </view>
<view class="check_btn" v-else @click="$jump(`/pages/monthlyPlan/monthlyPlan?month_apply_id=${month_apply_id}`,2)">查看我的包年计划</view> <view class="check_btn" v-else @click="$jump(`/pages/monthlyPlan/monthlyPlan?month_apply_id=${month_apply_id}`,2)">查看我的包年计划</view>
...@@ -83,18 +86,18 @@ ...@@ -83,18 +86,18 @@
<view class="right_text" @click="openDrawer">筛选<text class="eosfont">&#xe632;</text></view> <view class="right_text" @click="openDrawer">筛选<text class="eosfont">&#xe632;</text></view>
</view> </view>
<view class="recommend_box"> <view class="recommend_box">
<view class="recommend_item" v-for="(item, index) in goodsList" :key="index" @click="$jumpGoodDetail(item.goods_id)"> <view class="recommend_item" v-for="(item, index) in goodsList" :key="index">
<text class="label">包年计划</text> <text class="label">包年计划</text>
<image class="recommend_img" :src="item.default_image || $noGoodsImg" /> <image class="recommend_img" :src="item.default_image || $noGoodsImg" @click="$jumpGoodDetail(item.goods_id)" />
<view class="recommend_goods_name">{{item.goods_name}}</view> <view class="recommend_goods_name">{{item.goods_name}}</view>
<view class="recommend_goods_sub">{{item.goods_sub_name}}</view> <view class="recommend_goods_sub">{{item.goods_sub_name}}</view>
<view class="recommend_flex"> <view class="recommend_flex">
<view class="left" v-if="login_flg"> <view class="left" v-if="login_flg">
<text>¥ </text> <text>¥ </text>
<text>{{item.discount === '0.00' ? (Number(item.price)*Number(min_discount)).toFixed(2) : (Number(item.price)*Number(item.discount)).toFixed(2)}}</text> <text>{{(item.discount === '0.00' || item.discount === null) ? (Number(item.price)*Number(min_discount)).toFixed(2) : (Number(item.price)*Number(item.discount)).toFixed(2)}}</text>
</view> </view>
<view v-else class="no_price">登录显示价格</view> <view v-else class="no_price">登录显示价格</view>
<text class="right">已售{{item.total_sales}}</text> <text class="right eosfont" @click="$addCart(item.default_spec, 1, login_flg)">&#xe7e6;</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -110,22 +113,35 @@ ...@@ -110,22 +113,35 @@
<view class="screen_item"> <view class="screen_item">
<view class="screen_name">品牌</view> <view class="screen_name">品牌</view>
<view class="screen_detail"> <view class="screen_detail">
<view class="detail_item">品牌名称</view> <view class="detail_item" v-for="(item, index) in brand_list" :key="index" :class="{act: brand === item.brand}" @click="chooseFilter(1, item.brand)">{{item.brand}}</view>
<view class="detail_item act">品牌名称</view> </view>
</view>
<view class="screen_item">
<view class="screen_name">类别</view>
<view class="screen_detail">
<view class="detail_item" v-for="(item, index) in category_list" :key="index" :class="{act: cate_id_1 === item.cate_id}" @click="chooseFilter(2, item.cate_id)">{{item.cate_name}}</view>
</view>
</view>
<view class="screen_item">
<view class="screen_name">包年计划</view>
<view class="screen_detail">
<view class="detail_item" v-for="(item, index) in month_rule_list" :key="index" :class="{act: contract_period === item.contract_period}" @click="chooseFilter(3, item.contract_period, index)">{{item.contract_period}}个月</view>
</view> </view>
</view> </view>
<view class="bottom_box"> <view class="bottom_box">
<view class="reset_btn">重制</view> <view class="reset_btn" @click="resetFilter">重置</view>
<view class="confirm_btn">确定</view> <view class="confirm_btn" @click="search(2)">确定</view>
</view> </view>
</view> </view>
</uni-drawer> </uni-drawer>
<BottomBar />
</view> </view>
</template> </template>
<script> <script>
import uniDrawer from "@/components/uni-drawer/uni-drawer.vue"; import uniDrawer from "@/components/uni-drawer/uni-drawer.vue";
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue'; import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import BottomBar from "@/components/BottomBar/BottomBar.vue";
import { login } from '@/common/util.js'; import { login } from '@/common/util.js';
export default { export default {
data() { data() {
...@@ -139,7 +155,14 @@ ...@@ -139,7 +155,14 @@
current: 1, current: 1,
loadingType: 'more', loadingType: 'more',
requestFlag: true, requestFlag: true,
login_flg: 0 login_flg: 0,
brand_list: [],
category_list: [],
month_rule_list: [],
brand: '',
cate_id_1: '',
contract_period: '',
keyword: ''
} }
}, },
onLoad() { onLoad() {
...@@ -156,33 +179,24 @@ ...@@ -156,33 +179,24 @@
openDrawer() { openDrawer() {
this.$refs.drawer.open(); this.$refs.drawer.open();
}, },
getData(current) { getData() {
if(!this.requestFlag) return if(!this.requestFlag) return
this.loadingType = 'loading'; this.loadingType = 'loading';
uni.request({ uni.request({
url: '/uni/api/month_index/MonthIndex', url: '/uni/api/month_index/MonthIndex',
method: 'POST', method: 'GET',
data: {
current: current,
page_size: 10
},
dataType: 'json', dataType: 'json',
success: (res) => { success: (res) => {
if(res.data.code === 0) { if(res.data.code === 0) {
this.goodsList = this.goodsList.concat(res.data.data.goodsList);
this.month_apply_id = res.data.data.month_apply_id; this.month_apply_id = res.data.data.month_apply_id;
this.ruleList = res.data.data.ruleList; this.ruleList = res.data.data.ruleList;
this.min_discount = res.data.data.min_discount; this.min_discount = res.data.data.min_discount;
this.brand_list = res.data.data.brand_list;
this.category_list = res.data.data.category_list;
this.month_rule_list = res.data.data.month_rule_list;
this.data = res.data.data; this.data = res.data.data;
this.login_flg = res.data.login_flg; this.login_flg = res.data.login_flg;
const totalPage = Math.ceil(res.data.page.total/res.data.page.page_size); this.search();
if(current < totalPage) {
this.current += 1;
this.loadingType = 'more';
} else {
this.requestFlag = false;
this.loadingType = 'nomore'
}
} }
} }
}); });
...@@ -208,19 +222,86 @@ ...@@ -208,19 +222,86 @@
return return
} }
this.$jump('/pages/monthlyJoin/monthlyJoin',2) this.$jump('/pages/monthlyJoin/monthlyJoin',2)
} },
}, chooseFilter(type, val, key) {
onPageScroll(e) { // type: 1品牌 2分类 3包年计划
let top = e.scrollTop; if(type === 1) {
if(top >= 370 && !this.screen) { this.brand = val;
this.screen = true; }
} else if (top < 460 && this.screen) { if(type === 2) {
this.screen = false; this.cate_id_1 = val;
}
if(type === 3) {
this.contract_period = val;
this.min_discount = this.ruleList[key]['discount'];
}
},
resetFilter() {
this.brand = '';
this.cate_id_1 = '';
this.contract_period = '';
},
search(type) {
// type 1是搜索,current,goodsList,requestFlag,brand,cate_id_1,contract_period重置
// type 2是筛选
if(type === 1) {
this.brand = '';
this.cate_id_1 = '';
this.contract_period = '';
this.current = 1;
this.goodsList = [];
this.requestFlag = true;
}
if(type === 2) {
this.current = 1;
this.goodsList = [];
this.requestFlag = true;
}
if(!this.requestFlag) return
uni.request({
url: '/uni/api/search_goods/search_month_goods_list',
method: "POST",
data: {
keyword: this.keyword,
current: this.current,
pageSize: 10,
brand: this.brand,
cate_id_1: this.cate_id_1,
contract_period: this.contract_period
},
dataType: 'json',
success: (res) => {
if(res.data.code === 0) {
let goods = [];
res.data.data !== null && res.data.data.map((item, index) => {
goods.push(item._source);
});
this.goodsList = this.goodsList.concat(goods);
const totalPage = Math.ceil(res.data.page.total/res.data.page.page_size);
if(this.current < totalPage) {
this.current += 1;
this.loadingType = 'more';
} else {
this.requestFlag = false;
this.loadingType = 'nomore'
}
this.$refs.drawer.close();
}
}
})
},
scroll(e) {
if(e.detail.scrollTop >= 375 && !this.screen) {
this.screen = true;
} else if (e.detail.scrollTop < 370 && this.screen) {
this.screen = false;
}
} }
}, },
components: { components: {
uniDrawer, uniDrawer,
uniLoadMore uniLoadMore,
BottomBar
} }
} }
</script> </script>
...@@ -229,6 +310,7 @@ ...@@ -229,6 +310,7 @@
.main { .main {
background:linear-gradient(180deg,rgba(255,255,255,1) 0%,rgba(248,249,251,1) 100%); background:linear-gradient(180deg,rgba(255,255,255,1) 0%,rgba(248,249,251,1) 100%);
box-shadow:0px 4rpx 8rpx 0px rgba(0,0,0,0.05); box-shadow:0px 4rpx 8rpx 0px rgba(0,0,0,0.05);
padding-bottom: 98rpx;
.top_card { .top_card {
height: 410rpx; height: 410rpx;
background:linear-gradient(135deg,rgba(255,232,199,1) 0%,rgba(214,163,93,1) 100%); background:linear-gradient(135deg,rgba(255,232,199,1) 0%,rgba(214,163,93,1) 100%);
...@@ -567,7 +649,7 @@ ...@@ -567,7 +649,7 @@
} }
} }
.right { .right {
font-size: 22rpx; font-size: 32rpx;
height: 32rpx; height: 32rpx;
line-height: 32rpx; line-height: 32rpx;
text-shadow:0px 4px 60px rgba(0,0,0,0.06); text-shadow:0px 4px 60px rgba(0,0,0,0.06);
...@@ -591,9 +673,10 @@ ...@@ -591,9 +673,10 @@
font-family:PingFangSC-Medium,PingFang SC; font-family:PingFangSC-Medium,PingFang SC;
font-weight:500; font-weight:500;
position: fixed; position: fixed;
bottom: 42rpx; bottom: 144rpx;
left: 50%; left: 50%;
margin-left: -100rpx; margin-left: -100rpx;
z-index: 11;
.eosfont { .eosfont {
font-size: 24rpx; font-size: 24rpx;
font-weight:900; font-weight:900;
...@@ -636,6 +719,9 @@ ...@@ -636,6 +719,9 @@
font-size: 26rpx; font-size: 26rpx;
margin: 24rpx 24rpx 0 0; margin: 24rpx 24rpx 0 0;
} }
.detail_item:nth-of-type(3n) {
margin-right: 0;
}
.act { .act {
background-color: #FFF8E9; background-color: #FFF8E9;
color: #BF9B43; color: #BF9B43;
......
...@@ -37,13 +37,13 @@ ...@@ -37,13 +37,13 @@
<view class="con_detail spec_color">{{data[0].apply_status_name}}</view> <view class="con_detail spec_color">{{data[0].apply_status_name}}</view>
</view> </view>
</view> </view>
<view class="check_btn">查看合同</view> <view class="check_btn" @click="check(data[0].view_url)">查看合同</view>
</view> </view>
<view class="contract_bar" v-if="data.length>1"> <view class="contract_bar" v-if="data.length>1">
<text class="left">其他合同</text> <text class="left">其他合同</text>
</view> </view>
<view style="padding: 0;" v-if="data.length>1"> <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="now_contract packup" v-for="(item, index) in data" :key="index" v-if="index !== 0" :style="[rotate[index]['rotate'] ? {'height':'400rpx'} : null]">
<view class="contract_flex"> <view class="contract_flex">
<view class="flex_left"> <view class="flex_left">
<view class="con_title">合同时长</view> <view class="con_title">合同时长</view>
...@@ -75,8 +75,9 @@ ...@@ -75,8 +75,9 @@
<view class="con_detail spec_color">{{item.apply_status_name}}</view> <view class="con_detail spec_color">{{item.apply_status_name}}</view>
</view> </view>
</view> </view>
<text class="eosfont" :class="{rotate: (index === rotateKey) && rotate}" @click="pack(index)">&#xe729;</text> <text class="eosfont" :class="{rotate: rotate[index]['rotate']}"
<view class="check_btn">查看合同</view> @click="pack(index)">&#xe729;</text>
<view class="check_btn" @click="check(item.view_url)">查看合同</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -95,7 +96,7 @@ ...@@ -95,7 +96,7 @@
min_quantity: '', min_quantity: '',
apply_status_name: '' apply_status_name: ''
}], }],
rotate: false, rotate: [],
rotateKey: -1 rotateKey: -1
} }
}, },
...@@ -107,6 +108,12 @@ ...@@ -107,6 +108,12 @@
success: (res) => { success: (res) => {
if(res.data.code === 0) { if(res.data.code === 0) {
this.data = res.data.data; this.data = res.data.data;
let arr = [];
res.data.data && res.data.data.map((item, index) => {
let o = {rotate: false};
arr.push(o);
});
this.rotate = arr;
} }
} }
}); });
...@@ -140,8 +147,12 @@ ...@@ -140,8 +147,12 @@
}); });
}, },
pack(key) { pack(key) {
this.rotateKey = key; this.rotate[key]['rotate'] = !this.rotate[key]['rotate'];
this.rotate = !this.rotate; },
check(url) {
uni.navigateTo({
url: `/pages/web/web?contract_url=${url}`
});
} }
}, },
components: { components: {
......
<template> <template>
<view class="main"> <view class="main">
<TopBar title="缴纳金" :bold="true" /> <TopBar title="缴纳金" :bold="true" />
<view class="deposit_card"> <view class="deposit_card">
<view class="bar"> <view class="bar">
<text class="title1">当前计划详情</text> <text class="title1">当前计划详情</text>
<text class="title2">/ 缴纳金后即可享受计划</text> <text class="title2">/ 缴纳金后即可享受计划</text>
</view> </view>
<view class="tip1">开通时间</view> <view class="tip1">开通时间</view>
<view class="month">{{data.contract_period}}个月</view> <view class="month">{{data.contract_period || 0}}个月</view>
<view class="tip2">计划持续时间</view> <view class="tip2">计划持续时间</view>
<view class="info_box"> <view class="info_box">
<view class="info_item info1"> <view class="info_item info1">
<view class="tip1">商品折扣</view> <view class="tip1">商品折扣</view>
<view class="month">{{data.discount*10}}</view> <view class="month">{{data.discount*10 || 0}}</view>
<view class="tip2">包年计划内商品</view> <view class="tip2">包年计划内商品</view>
</view> </view>
<view class="info_item info2"> <view class="info_item info2">
<view class="tip1">押金</view> <view class="tip1">押金</view>
<view class="month">{{data.min_quantity*data.deposit/100}}</view> <view class="month">{{(data.min_quantity*data.deposit/100) || 0}}</view>
<view class="tip2">达成计划后退还</view> <view class="tip2">达成计划后退还</view>
</view> </view>
</view> </view>
<view class="check_btn">查看我的合同</view> <view class="check_btn" @click="previewContract">查看我的合同</view>
<view class="pay_btn" @click="goPay">支付押金 ¥{{data.min_quantity*data.deposit/100}}</view> <view class="pay_btn" @click="goPay">支付押金 ¥{{(data.min_quantity*data.deposit/100) || 0}}</view>
<view class="cancel_btn" @click="open">取消支付 重新签署合同</view> <view class="cancel_btn" @click="open">取消支付 重新签署合同</view>
</view> </view>
<uni-popup ref="popup"> <uni-popup ref="popup">
...@@ -59,9 +59,9 @@ ...@@ -59,9 +59,9 @@
</uni-popup> </uni-popup>
<uni-popup ref="pay" type="bottom"> <uni-popup ref="pay" type="bottom">
<view class="popup_content"> <view class="popup_content">
<view class="popup_top_bar">选择支付方式<text @click="close()"></text></view> <view class="popup_top_bar">选择支付方式<text @click="closePay"></text></view>
<view class="flex"> <view class="flex">
<text class="pay_title">支付</text> <text class="pay_title">支付</text>
<text class="pay_num">¥{{data.min_quantity*data.deposit/100}}</text> <text class="pay_num">¥{{data.min_quantity*data.deposit/100}}</text>
</view> </view>
<view class="flex pay_item" @click="handleSelect(1)"> <view class="flex pay_item" @click="handleSelect(1)">
...@@ -107,7 +107,8 @@ ...@@ -107,7 +107,8 @@
return { return {
data: {}, data: {},
type: 1, type: 1,
isWx: false isWx: false,
pageShow: false
} }
}, },
onLoad(options) { onLoad(options) {
...@@ -118,6 +119,16 @@ ...@@ -118,6 +119,16 @@
dataType: 'json', dataType: 'json',
success: (res) => { success: (res) => {
if(res.data.code === 0) { if(res.data.code === 0) {
if(res.data.data === null) {
uni.showToast({
title: '您已支付过押金',
icon: 'none'
});
setTimeout(() => {
this.$jump('/pages/monthly/monthly', 2);
}, 2000);
return
}
this.data = res.data.data; this.data = res.data.data;
} else { } else {
uni.showToast({ uni.showToast({
...@@ -138,6 +149,9 @@ ...@@ -138,6 +149,9 @@
goPay() { goPay() {
this.$refs.pay.open(); this.$refs.pay.open();
}, },
closePay() {
this.$refs.pay.close();
},
// 选择支付方式 // 选择支付方式
handleSelect(type){ handleSelect(type){
this.type = type; this.type = type;
...@@ -147,6 +161,8 @@ ...@@ -147,6 +161,8 @@
const {origin} = location; const {origin} = location;
const amount = this.data.min_quantity*this.data.deposit/100; const amount = this.data.min_quantity*this.data.deposit/100;
// 余额支付 // 余额支付
this.pageShow = true;
this.$refs.pay.close();
if(this.type === 1){ if(this.type === 1){
uni.navigateTo({ uni.navigateTo({
url: `/pages/yuepay/yuepay?amount=${amount}&money=${this.data.money}&order_id=${this.data.order_no}&type=monthly` url: `/pages/yuepay/yuepay?amount=${amount}&money=${this.data.money}&order_id=${this.data.order_no}&type=monthly`
...@@ -202,6 +218,7 @@ ...@@ -202,6 +218,7 @@
}, },
success: (res) => { success: (res) => {
if(res.data.code === 0) { if(res.data.code === 0) {
this.close()
uni.showToast({ uni.showToast({
title: '您的合同已取消', title: '您的合同已取消',
icon: 'none' icon: 'none'
...@@ -212,6 +229,25 @@ ...@@ -212,6 +229,25 @@
} }
} }
}); });
},
previewContract() {
uni.showLoading({
title: '获取合同中'
});
uni.request({
url: '/uni/api/month_signcontract/PreviewContract',
method: 'POST',
dataType: 'json',
data: {},
success: (res) => {
if(res.data.code === 0) {
uni.hideLoading();
uni.navigateTo({
url: `/pages/web/web?contract_url=${res.data.data.viewUrl}`
});
}
}
})
} }
}, },
components: { components: {
......
...@@ -12,27 +12,41 @@ ...@@ -12,27 +12,41 @@
<view class="content_title"> <view class="content_title">
<text class="circle_num">1</text>怎么包月? <text class="circle_num">1</text>怎么包月?
</view> </view>
<view class="content_main">点击下方选择起订量,选择拿货周期和起订量,签署合同,缴纳金,则完成包月,合同有效期内,购买包月产品,立享折扣。</view> <view class="content_main">点击下方选择起订量,选择拿货周期和起订量,签署合同,缴纳金,则完成包月,合同有效期内,购买包月产品,立享折扣。</view>
<view class="content_title"> <view class="content_title">
<text class="circle_num">1</text>关于 <text class="circle_num">1</text>关于
</view> </view>
<view class="content_main">合同有效期内,包月产品消费总额(折扣价)达到起订量,自合同结束日期5个工作日内,全额退还金,否则不予以退还。</view> <view class="content_main">合同有效期内,包月产品消费总额(折扣价)达到起订量,自合同结束日期5个工作日内,全额退还金,否则不予以退还。</view>
<view class="content_title"> <view class="content_title">
<text class="circle_num">1</text>缴纳定金与不缴纳定金的区别 <text class="circle_num">1</text>缴纳押金与不缴纳押金的区别
</view> </view>
<view class="content_main">缴纳定金,合同有效期内购买包月产品可立享全额折扣;不缴纳定金,合同有效期内购买包月产品,统一享受8.5折,合同有效期内,包月产品消费总额(折扣价)达到起订量,自合同结束日期5个工作日内,按差价返现至账户余额,可提现,(例如全额折扣为6折,则返现消费总额的25%)反之不予以返现。</view> <view class="content_main">缴纳押金,合同有效期内购买包月产品可立享全额折扣;不缴纳押金,合同有效期内购买包月产品,统一享受8.5折,合同有效期内,包月产品消费总额(折扣价)达到起订量,自合同结束日期5个工作日内,按差价返现至账户余额,可提现,(例如全额折扣为6折,则返现消费总额的25%)反之不予以返现。</view>
<view class="content_title" style="margin-bottom: 0;">有任何问题</view> <view class="content_title" style="margin-bottom: 0;">有任何问题</view>
<view class="content_title">烦请点击页面上的消息按钮进行</view> <view class="content_title">烦请点击页面上的消息按钮进行咨询</view>
<view class="join_btn">加入包年计划</view> <view class="join_btn" @click="joinMonthly">加入包年计划</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { login } from '@/common/util.js';
export default { export default {
data() { data() {
return { return {
login_flg: 0
}
},
onLoad(options) {
this.login_flg = options.login_flg - 0;
},
methods: {
// 加入计划
joinMonthly() {
if(!this.login_flg) {
login();
return
}
this.$jump('/pages/monthlyJoin/monthlyJoin',2)
} }
} }
} }
......
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
</view> </view>
<view class="bar"> <view class="bar">
<text class="title1">选择押金方案</text> <text class="title1">选择押金方案</text>
<text class="title2">/ 达成计划后将退还</text> <text class="title2">/ 达成计划后将退还</text>
</view> </view>
<view class="pay_card"> <view class="pay_card">
<view class="title1" v-if="depositKey === '1'">先缴纳押金,可立享即时折扣</view> <view class="title1" v-if="depositKey === '1'">先缴纳押金,可立享即时折扣</view>
<view class="title1" v-else>0押金,先按原价购买</view> <view class="title1" v-else>0押金,先按原价购买</view>
<view class="title2" v-if="depositKey === '1'">达成计划:退还金¥{{Number(ruleList[key]['child'][monthKey]['min_quantity'])*Number(ruleList[key]['child'][monthKey]['deposit'])/100}}</view> <view class="title2" v-if="depositKey === '1'">达成计划:退还金¥{{Number(ruleList[key]['child'][monthKey]['min_quantity'])*Number(ruleList[key]['child'][monthKey]['deposit'])/100}}</view>
<view class="title2" v-else>达成计划:满¥{{ruleList[key]['child'][monthKey]['min_quantity']}}{{Number(ruleList[key]['child'][monthKey]['discount'])*10}}折返现</view> <view class="title2" v-else>达成计划:满¥{{ruleList[key]['child'][monthKey]['min_quantity']}}{{Number(ruleList[key]['child'][monthKey]['discount'])*10}}折返现</view>
<view class="pay_box"> <view class="pay_box">
<view class="pay_item" :class="{act: depositKey === '1'}" @click="changeDeposit('1')"> <view class="pay_item" :class="{act: depositKey === '1'}" @click="changeDeposit('1')">
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<text class="checked eosfont" v-if="checked" @click="check">&#xe61e;</text> <text class="checked eosfont" v-if="checked" @click="check">&#xe61e;</text>
<text class="uncheked" v-else @click="check"></text> <text class="uncheked" v-else @click="check"></text>
<text>我已阅读</text> <text>我已阅读</text>
<text class="contract">《谛宝多多包年会员合同》</text> <text class="contract" @click="previewContract">《谛宝多多包年会员合同》</text>
</view> </view>
<view class="fixed_bottom" @click="submit">同意并签署合同</view> <view class="fixed_bottom" @click="submit">同意并签署合同</view>
</view> </view>
...@@ -176,6 +176,25 @@ ...@@ -176,6 +176,25 @@
} else { } else {
this.$jump(`/pages/certification/certification?month_rule_id=${this.month_rule_id}&is_deposit=${this.depositKey}`,2) this.$jump(`/pages/certification/certification?month_rule_id=${this.month_rule_id}&is_deposit=${this.depositKey}`,2)
} }
},
previewContract() {
uni.showLoading({
title: '获取合同中'
});
uni.request({
url: '/uni/api/month_signcontract/PreviewContract',
method: 'POST',
dataType: 'json',
data: {},
success: (res) => {
if(res.data.code === 0) {
uni.hideLoading();
uni.navigateTo({
url: `/pages/web/web?contract_url=${res.data.data.viewUrl}`
});
}
}
})
} }
}, },
components: { components: {
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<view class="pro_item" v-for="(item, index) in month_order_list" :key="index"> <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_top">计划内采购金额:<text>¥{{item.total_price}}</text></view>
<view class="item_content"> <view class="item_content">
<view class="content_item" v-for="(vo, key) in item.child" :key="key" @click="$jumpGoodDetail(vo.goods_id)"> <view class="content_item" v-for="(vo, key) in item.child" :key="key" @click="$jumpOrderDetail(vo.order_id)">
<image class="item_img" :src="vo.goods_image || $noGoodsImg"/> <image class="item_img" :src="vo.goods_image || $noGoodsImg"/>
<view> <view>
<view class="item_name">{{vo.goods_name}}</view> <view class="item_name">{{vo.goods_name}}</view>
...@@ -92,6 +92,14 @@ ...@@ -92,6 +92,14 @@
}); });
this.month_order_list = res.data.data.month_order_list; this.month_order_list = res.data.data.month_order_list;
} else {
uni.showModal({
title: '提示',
content: '当前没有可履行的合同',
success: () => {
this.$jump('/pages/monthly/monthly',2);
}
})
} }
} }
}) })
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</view> </view>
<view v-if="!isLogin" class="unlogin_price">登录显示价格</view> <view v-if="!isLogin" class="unlogin_price">登录显示价格</view>
<!-- <view class="old-price"><text class="price-tips"></text>30.00</view> --> <!-- <view class="old-price"><text class="price-tips"></text>30.00</view> -->
<image class="cart-icon" @click="addCart(item._source.default_spec, 1)" src="https://dbc-static.oss-cn-beijing.aliyuncs.com/credit_shop/global/icon_gouwuche%402x.png"></image> <text class="cart-icon eosfont" @click="addCart(item._source.default_spec, 1)">&#xe74a;</text>
</view> </view>
</view> </view>
<uni-load-more :status="loadingType"></uni-load-more> <uni-load-more :status="loadingType"></uni-load-more>
...@@ -458,10 +458,9 @@ ...@@ -458,10 +458,9 @@
} }
.cart-icon{ .cart-icon{
position: absolute; position: absolute;
width: 64rpx;
height: 64rpx;
right: 24rpx; right: 24rpx;
bottom: 52rpx; bottom: 72rpx;
color: #7C7C7C;
} }
} }
} }
......
<template> <template>
<view> <view>
<TopBar title="分期合同"/> <TopBar title="我的合同"/>
<web-view :src="url"></web-view> <web-view :src="url"></web-view>
</view> </view>
</template> </template>
......
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