chore(组件): 组件尽量使用异步导入模式
This commit is contained in:
@@ -5,50 +5,48 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import htmlParser from '@/common/js/html-parser';
|
||||
import htmlParser from '@/common/js/html-parser.js';
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
content:'',
|
||||
type:'',
|
||||
uniacid:0
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
content: '',
|
||||
type: '',
|
||||
uniacid: 0
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.type = option.type
|
||||
this.uniacid = option.uniacid?option.uniacid:0
|
||||
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX()
|
||||
this.getcontent()
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getcontent() {
|
||||
this.uniacid = option.uniacid ? option.uniacid : 0
|
||||
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX()
|
||||
this.getcontent()
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getcontent() {
|
||||
// privacy content
|
||||
var data = {
|
||||
type:this.type
|
||||
type: this.type
|
||||
}
|
||||
if(this.uniacid > 0) data.uniacid = this.uniacid
|
||||
this.$api.sendRequest({
|
||||
url: '/api/config/agreement',
|
||||
data:data,
|
||||
success: res => {
|
||||
if (this.uniacid > 0) data.uniacid = this.uniacid
|
||||
this.$api.sendRequest({
|
||||
url: '/api/config/agreement',
|
||||
data: data,
|
||||
success: res => {
|
||||
console.log(res.data.title)
|
||||
uni.setNavigationBarTitle({
|
||||
title:res.data.title
|
||||
title: res.data.title
|
||||
})
|
||||
this.content = res.data.content
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
<style lang="scss"></style>
|
||||
@@ -25,134 +25,140 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import htmlParser from '@/common/js/html-parser';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
articleId: 0,
|
||||
detail: {},
|
||||
content: ''
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.articleId = options.article_id || 0;
|
||||
// 小程序扫码进入
|
||||
if (options.scene) {
|
||||
var sceneParams = decodeURIComponent(options.scene);
|
||||
this.articleId = sceneParams.split('-')[1];
|
||||
}
|
||||
if (this.articleId == 0) {
|
||||
this.$util.redirectTo('/pages_tool/article/list', {}, 'redirectTo');
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/article/info',
|
||||
data: {
|
||||
article_id: this.articleId
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data) {
|
||||
this.detail = res.data;
|
||||
this.$langConfig.title(this.detail.article_title);
|
||||
this.content = htmlParser(this.detail.article_content);
|
||||
this.setPublicShare();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/article/list', {}, 'redirectTo');
|
||||
}, 2000);
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置公众号分享
|
||||
setPublicShare() {
|
||||
let shareUrl = this.$config.h5Domain + '/pages_tool/article/detail?article_id=' + this.articleId;
|
||||
this.$util.setPublicShare({
|
||||
title: this.detail.article_title,
|
||||
desc: '',
|
||||
link: shareUrl,
|
||||
imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) : ''
|
||||
});
|
||||
}
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
var title = this.detail.article_title;
|
||||
var path = '/pages_tool/article/detail?article_id=' + this.articleId;
|
||||
return {
|
||||
title: title,
|
||||
path: path,
|
||||
success: res => {},
|
||||
fail: res => {}
|
||||
};
|
||||
},
|
||||
//分享到朋友圈
|
||||
onShareTimeline() {
|
||||
var title = this.detail.article_title;
|
||||
var query = 'article_id=' + this.articleId;
|
||||
return {
|
||||
title: title,
|
||||
query: query,
|
||||
imageUrl: ''
|
||||
};
|
||||
import htmlParser from '@/common/js/html-parser.js';
|
||||
export default {
|
||||
components: {
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
articleId: 0,
|
||||
detail: {},
|
||||
content: ''
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.articleId = options.article_id || 0;
|
||||
// 小程序扫码进入
|
||||
if (options.scene) {
|
||||
var sceneParams = decodeURIComponent(options.scene);
|
||||
this.articleId = sceneParams.split('-')[1];
|
||||
}
|
||||
};
|
||||
if (this.articleId == 0) {
|
||||
this.$util.redirectTo('/pages_tool/article/list', {}, 'redirectTo');
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/article/info',
|
||||
data: {
|
||||
article_id: this.articleId
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data) {
|
||||
this.detail = res.data;
|
||||
this.$langConfig.title(this.detail.article_title);
|
||||
this.content = htmlParser(this.detail.article_content);
|
||||
this.setPublicShare();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/article/list', {}, 'redirectTo');
|
||||
}, 2000);
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置公众号分享
|
||||
setPublicShare() {
|
||||
let shareUrl = this.$config.h5Domain + '/pages_tool/article/detail?article_id=' + this.articleId;
|
||||
this.$util.setPublicShare({
|
||||
title: this.detail.article_title,
|
||||
desc: '',
|
||||
link: shareUrl,
|
||||
imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) : ''
|
||||
});
|
||||
}
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
var title = this.detail.article_title;
|
||||
var path = '/pages_tool/article/detail?article_id=' + this.articleId;
|
||||
return {
|
||||
title: title,
|
||||
path: path,
|
||||
success: res => { },
|
||||
fail: res => { }
|
||||
};
|
||||
},
|
||||
//分享到朋友圈
|
||||
onShareTimeline() {
|
||||
var title = this.detail.article_title;
|
||||
var query = 'article_id=' + this.articleId;
|
||||
return {
|
||||
title: title,
|
||||
query: query,
|
||||
imageUrl: ''
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.help-title {
|
||||
font-size: $font-size-toolbar;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.help-content {
|
||||
margin-top: $margin-updown;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.help-meta {
|
||||
text-align: left;
|
||||
margin-top: $margin-updown;
|
||||
color: $color-tip;
|
||||
|
||||
.help-time {
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-area {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 40rpx;
|
||||
|
||||
.price-font {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.help-title {
|
||||
font-size: $font-size-toolbar;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.help-content {
|
||||
margin-top: $margin-updown;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.help-meta {
|
||||
text-align: left;
|
||||
margin-top: $margin-updown;
|
||||
color: $color-tip;
|
||||
|
||||
.help-time {
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-area {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 40rpx;
|
||||
|
||||
.price-font {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
view {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
view {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -6,7 +6,8 @@
|
||||
<ns-adv keyword="NS_ARTICLE" class-name="adv-wrap"></ns-adv>
|
||||
<view class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)">
|
||||
<view class="article-img">
|
||||
<image class="cover-img" :src="$util.img(item.cover_img)" mode="widthFix" @error="imgError(index)"/>
|
||||
<image class="cover-img" :src="$util.img(item.cover_img)" mode="widthFix"
|
||||
@error="imgError(index)" />
|
||||
</view>
|
||||
<view class="info-wrap">
|
||||
<text class="title">{{ item.article_title }}</text>
|
||||
@@ -33,203 +34,195 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsAdv from '@/pages_tool/components/ns-adv/ns-adv.vue';
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
},
|
||||
components: {
|
||||
nsAdv,
|
||||
MescrollUni,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
nsEmpty,
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
// #endif
|
||||
},
|
||||
onShow() {
|
||||
this.setPublicShare();
|
||||
},
|
||||
methods: {
|
||||
getData(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/article/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num
|
||||
},
|
||||
success: res => {
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
|
||||
this.list = this.list.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsAdv: () => import('@/pages_tool/components/ns-adv/ns-adv.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.setPublicShare();
|
||||
},
|
||||
methods: {
|
||||
getData(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/article/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num
|
||||
},
|
||||
success: res => {
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
toDetail(item) {
|
||||
this.$util.redirectTo('/pages_tool/article/detail', {
|
||||
article_id: item.article_id
|
||||
});
|
||||
},
|
||||
imgError(index) {
|
||||
if (this.list[index]) this.list[index].cover_img = this.$util.getDefaultImage().article;
|
||||
},
|
||||
// 设置公众号分享
|
||||
setPublicShare() {
|
||||
let shareUrl = this.$config.h5Domain + '/pages_tool/article/list';
|
||||
this.$util.setPublicShare({
|
||||
title: '文章列表',
|
||||
desc: '',
|
||||
link: shareUrl,
|
||||
imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) : ''
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
|
||||
this.list = this.list.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
var title = '文章列表';
|
||||
var path = '/pages_tool/article/list';
|
||||
return {
|
||||
title: title,
|
||||
path: path,
|
||||
success: res => {},
|
||||
fail: res => {}
|
||||
};
|
||||
toDetail(item) {
|
||||
this.$util.redirectTo('/pages_tool/article/detail', {
|
||||
article_id: item.article_id
|
||||
});
|
||||
},
|
||||
//分享到朋友圈
|
||||
onShareTimeline() {
|
||||
var title = '文章列表';
|
||||
var query = '/pages_tool/article/list';
|
||||
return {
|
||||
title: title,
|
||||
query: query,
|
||||
imageUrl: ''
|
||||
};
|
||||
imgError(index) {
|
||||
if (this.list[index]) this.list[index].cover_img = this.$util.getDefaultImage().article;
|
||||
},
|
||||
// 设置公众号分享
|
||||
setPublicShare() {
|
||||
let shareUrl = this.$config.h5Domain + '/pages_tool/article/list';
|
||||
this.$util.setPublicShare({
|
||||
title: '文章列表',
|
||||
desc: '',
|
||||
link: shareUrl,
|
||||
imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) : ''
|
||||
});
|
||||
}
|
||||
};
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
var title = '文章列表';
|
||||
var path = '/pages_tool/article/list';
|
||||
return {
|
||||
title: title,
|
||||
path: path,
|
||||
success: res => { },
|
||||
fail: res => { }
|
||||
};
|
||||
},
|
||||
//分享到朋友圈
|
||||
onShareTimeline() {
|
||||
var title = '文章列表';
|
||||
var query = '/pages_tool/article/list';
|
||||
return {
|
||||
title: title,
|
||||
query: query,
|
||||
imageUrl: ''
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .fixed {
|
||||
position: relative;
|
||||
top: 0;
|
||||
/deep/ .fixed {
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.empty-wrap {
|
||||
padding-top: 200rpx;
|
||||
}
|
||||
|
||||
.article-wrap {
|
||||
background: #f8f8f8;
|
||||
|
||||
.adv-wrap {
|
||||
margin: 24rpx 24rpx 0 24rpx;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.empty-wrap {
|
||||
padding-top: 200rpx;
|
||||
}
|
||||
.item {
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
margin: 24rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
.article-wrap {
|
||||
background: #f8f8f8;
|
||||
.article-img {
|
||||
margin-right: 20rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.adv-wrap {
|
||||
margin: 24rpx 24rpx 0 24rpx;
|
||||
width: auto;
|
||||
image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
.info-wrap {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
margin: 24rpx;
|
||||
border-radius: 16rpx;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.article-img {
|
||||
margin-right: 20rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
.title {
|
||||
font-weight: bold;
|
||||
margin-bottom: 10rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
}
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 30rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.info-wrap {
|
||||
flex: 1;
|
||||
.abstract {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
|
||||
.read-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
color: #999ca7;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 10rpx;
|
||||
line-height: 1;
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
margin-bottom: 10rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 30rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.abstract {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text {
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
|
||||
.read-wrap {
|
||||
display: flex;
|
||||
color: #999ca7;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 10rpx;
|
||||
line-height: 1;
|
||||
.iconfont {
|
||||
font-size: 36rpx;
|
||||
vertical-align: bottom;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
.category-icon {
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 50%;
|
||||
background: $base-color;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 36rpx;
|
||||
vertical-align: bottom;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.category-icon {
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 50%;
|
||||
background: $base-color;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.date {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.date {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view>
|
||||
<view :style="themeColor">
|
||||
<view class="about w100">
|
||||
<view class="list_cotact padding-top">
|
||||
<view class="container">
|
||||
@@ -8,7 +8,9 @@
|
||||
<view class="bl clearfix bor bg-white">
|
||||
<block v-if="item.$orig.case_type === 0">
|
||||
<view class="video-container">
|
||||
<video class="adaptive-video" style="height:400rpx;" autoPauseIfNavigate="true" autoPauseIfOpenNative="true" autoplay="false" enableAutoRotation="true" id="myVideo" :poster="item.g0" :src="item.g1" controls="true"></video>
|
||||
<video class="adaptive-video" style="height:400rpx;" autoPauseIfNavigate="true"
|
||||
autoPauseIfOpenNative="true" autoplay="false" enableAutoRotation="true" id="myVideo"
|
||||
:poster="item.g0" :src="item.g1" controls="true"></video>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="item.$orig.case_type === 1">
|
||||
@@ -17,16 +19,16 @@
|
||||
</view>
|
||||
</block>
|
||||
<view style="padding:20rpx;">
|
||||
<view style="font-size:36rpx;font-weight:600;">{{item.$orig.title}}</view>
|
||||
<view>{{item.$orig.desc}}</view>
|
||||
<view style="font-size:24rpx;color:#888;padding-top:20rpx;">{{"完成时间:" + item.g3}}</view>
|
||||
<view style="font-size:36rpx;font-weight:600;">{{ item.$orig.title }}</view>
|
||||
<view>{{ item.$orig.desc }}</view>
|
||||
<view style="font-size:24rpx;color:#888;padding-top:20rpx;">{{ "完成时间:" + item.g3 }}</view>
|
||||
<block v-if="item.$orig.files_url">
|
||||
<view @tap="toDetail(item.$orig)" class="item">
|
||||
<view class="article-img">
|
||||
<image class="cover-img" :src="item.g4" mode="widthFix" @error="imgError(index)"></image>
|
||||
</view>
|
||||
<view class="info-wrap">
|
||||
<view class="title">{{item.$orig.files_title}}</view>
|
||||
<view class="title">{{ item.$orig.files_title }}</view>
|
||||
<view class="read-wrap">
|
||||
<text>查看PDF文件</text>
|
||||
</view>
|
||||
@@ -59,13 +61,15 @@
|
||||
<view class="fui-cell">
|
||||
<view class="fui-cell-label">联系方式</view>
|
||||
<view class="fui-cell-info">
|
||||
<input class="fui-input" maxlength="11" placeholder="请输入您的手机号" type="number" v-model="Form.mobile" />
|
||||
<input class="fui-input" maxlength="11" placeholder="请输入您的手机号" type="number"
|
||||
v-model="Form.mobile" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="fui-cell">
|
||||
<view class="fui-cell-label" style="position:absolute;top:10px;">留言内容</view>
|
||||
<view class="fui-cell-info" style="margin-left:160rpx;border:solid 2rpx #eee;">
|
||||
<textarea class="textarea" style="font-size:28rpx;padding:10rpx;" placeholder="请输入留言内容" v-model="Form.remark"></textarea>
|
||||
<textarea class="textarea" style="font-size:28rpx;padding:10rpx;" placeholder="请输入留言内容"
|
||||
v-model="Form.remark"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -77,9 +81,11 @@
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
<uni-popup ref="videoPopup" class="vue-ref" style="background:transparent;width:100%;height:100%;" type="center" @change="videochange">
|
||||
<uni-popup ref="videoPopup" class="vue-ref" style="background:transparent;width:100%;height:100%;" type="center"
|
||||
@change="videochange">
|
||||
<view class="video-container" style="position:fixed;top:30%;width:100%;left:0;">
|
||||
<video class="adaptive-video" autoPauseIfNavigate="true" autoPauseIfOpenNative="true" autoplay="false" enableAutoRotation="true" id="myVideo" :src="video_url" controls="true"></video>
|
||||
<video class="adaptive-video" autoPauseIfNavigate="true" autoPauseIfOpenNative="true" autoplay="false"
|
||||
enableAutoRotation="true" id="myVideo" :src="video_url" controls="true"></video>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
@@ -88,6 +94,9 @@
|
||||
<script>
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
export default {
|
||||
components: {
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
@@ -113,7 +122,7 @@ export default {
|
||||
},
|
||||
components: {
|
||||
uniPopup
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.$api.sendRequest({
|
||||
@@ -535,14 +544,15 @@ image {
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
.list_cotact .bor .name, .view_ul_100 .name {
|
||||
.list_cotact .bor .name,
|
||||
.view_ul_100 .name {
|
||||
font-size: 32rpx;
|
||||
line-height: 44rpx;
|
||||
margin-top: 20rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.list_cotact .view_ul_one .view_li:nth-child(1) > button {
|
||||
.list_cotact .view_ul_one .view_li:nth-child(1)>button {
|
||||
background: #0054a5;
|
||||
height: 200rpx;
|
||||
line-height: 20rpx;
|
||||
@@ -563,7 +573,7 @@ image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.view_ul_100 > view {
|
||||
.view_ul_100>view {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
@@ -577,12 +587,12 @@ image {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.list_cotact .view_ul_two .view_li > view {
|
||||
.list_cotact .view_ul_two .view_li>view {
|
||||
background-color: #fff;
|
||||
padding: 20rpx 30rpx 0rpx 30rpx;
|
||||
}
|
||||
|
||||
.list_cotact .view_ul_two .view_li > view .address {
|
||||
.list_cotact .view_ul_two .view_li>view .address {
|
||||
background-color: #5dc2d0;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
|
||||
@@ -71,11 +71,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsChatGoods from '@/pages_tool/components/ns-chat/ns-chat-goods.vue';
|
||||
import nsChatOrder from '@/pages_tool/components/ns-chat/ns-chat-order.vue';
|
||||
import nsChatReceiveGoods from '@/pages_tool/components/ns-chat/ns-chat-receiveGoods.vue';
|
||||
import htmlParser from '@/common/js/html-parser';
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import htmlParser from '@/common/js/html-parser.js';
|
||||
import emjoy from '@/common/js/emjoy.js';
|
||||
|
||||
export default {
|
||||
@@ -88,6 +84,12 @@
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
components: {
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
nsChatGoods: () => import('@/pages_tool/components/ns-chat/ns-chat-goods.vue'),
|
||||
nsChatOrder: () => import('@/pages_tool/components/ns-chat/ns-chat-order.vue'),
|
||||
nsChatReceiveGoods: () => import('@/pages_tool/components/ns-chat/ns-chat-receiveGoods.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
avatar: '', //店铺头像
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
<script>
|
||||
import Calendar from './util.js';
|
||||
import uniCalendarItem from './uni-calendar-item.vue';
|
||||
|
||||
/**
|
||||
* Calendar 日历
|
||||
* @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等
|
||||
@@ -67,7 +67,7 @@ import uniCalendarItem from './uni-calendar-item.vue';
|
||||
*/
|
||||
export default {
|
||||
components: {
|
||||
uniCalendarItem
|
||||
uniCalendarItem: () => import('./uni-calendar-item.vue'),
|
||||
},
|
||||
props: {
|
||||
date: {
|
||||
|
||||
@@ -38,14 +38,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniStatusBar from '@/pages_tool/components/uni-status-bar/uni-status-bar.vue';
|
||||
import uniIcons from '@/components/uni-icons/uni-icons.vue';
|
||||
|
||||
export default {
|
||||
name: 'UniNavBar',
|
||||
components: {
|
||||
uniStatusBar,
|
||||
uniIcons
|
||||
uniStatusBar: () => import('@/pages_tool/components/uni-status-bar/uni-status-bar.vue'),
|
||||
uniIcons: () => import('@/components/uni-icons/uni-icons.vue'),
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
style="background: #1daa39;width: 100%;border-radius: 10rpx;">
|
||||
<view class="bl bor" style="box-sizing: border-box;">
|
||||
<image mode="heightFix" :src="$util.img('public/static/img/liuyan.png')"></image>
|
||||
<view class="name bl line1" style="margin-top: 6rpx;">{{ $lang('onlineMessage') }}</view>
|
||||
<view class="name bl line1" style="margin-top: 6rpx;">{{ $lang('onlineMessage') }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -28,7 +29,8 @@
|
||||
<view @click="tapMessage" class="view_li w50_li text-center">
|
||||
<view class="bl bor" style="box-sizing: border-box;">
|
||||
<image mode="heightFix" :src="$util.img('public/static/img/liuyan.png')"></image>
|
||||
<view class="name bl line1" style="margin-top: 6rpx;">{{ $lang('onlineMessage') }}</view>
|
||||
<view class="name bl line1" style="margin-top: 6rpx;">{{ $lang('onlineMessage') }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -51,7 +53,8 @@
|
||||
<image mode="widthFix" :src="$util.img('public/static/img/boda.png')"
|
||||
style="margin-top: 8rpx;margin-right: 10rpx;"></image>
|
||||
<view style="flex: 1;">{{ item.mobile }}</view>
|
||||
<view class="btn-container" @click="Tel(item.mobile)"><span class="contact-btn" style="background: #0054a5;">{{ $lang('call') }}</span>
|
||||
<view class="btn-container" @click="Tel(item.mobile)"><span class="contact-btn"
|
||||
style="background: #0054a5;">{{ $lang('call') }}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contact_name"
|
||||
@@ -59,7 +62,8 @@
|
||||
<image mode="widthFix" :src="$util.img('public/static/img/emall.png')"
|
||||
style="margin-top: 8rpx;margin-right: 10rpx;"></image>
|
||||
<view style="flex: 1;">{{ item.email }}</view>
|
||||
<view class="btn-container" @click="copy(item.email)"><span class="contact-btn" style="background: #888;">{{ $lang('copy') }}</span>
|
||||
<view class="btn-container" @click="copy(item.email)"><span class="contact-btn"
|
||||
style="background: #888;">{{ $lang('copy') }}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -84,7 +88,8 @@
|
||||
:longitude="shop.longitude" :latitude="shop.latitude" show-location>
|
||||
<cover-view
|
||||
style="position:absolute;right:10px;bottom:30rpx;z-index:9;background:#4d83ff;padding:5px 10px;wxcs_style_padding:10rpx 20rpx;border-radius:8rpx;color: #fff;"
|
||||
@click="tomap"><cover-view style="font-size:24rpx">{{ $lang('oneClickNavigation') }}</cover-view>
|
||||
@click="tomap"><cover-view style="font-size:24rpx">{{ $lang('oneClickNavigation')
|
||||
}}</cover-view>
|
||||
</cover-view>
|
||||
</map>
|
||||
</view>
|
||||
@@ -113,26 +118,32 @@
|
||||
<view class="fui-cell ">
|
||||
<view class="fui-cell-label ">{{ $lang('name') }}</view>
|
||||
<view class="fui-cell-info">
|
||||
<input v-model="Form.realname" class="fui-input" :placeholder="$lang('pleaseEnterName')" value=""></input>
|
||||
<input v-model="Form.realname" class="fui-input"
|
||||
:placeholder="$lang('pleaseEnterName')" value=""></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fui-cell ">
|
||||
<view class="fui-cell-label">{{ $lang('contactInfo') }}</view>
|
||||
<view class="fui-cell-info">
|
||||
<input v-model="Form.mobile" class="fui-input" maxlength="11" :placeholder="$lang('pleaseEnterMobile')" type="number"></input>
|
||||
<input v-model="Form.mobile" class="fui-input" maxlength="11"
|
||||
:placeholder="$lang('pleaseEnterMobile')" type="number"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fui-cell ">
|
||||
<view class="fui-cell-label" style="position: absolute;top:10px">{{ $lang('messageContent') }}</view>
|
||||
<view class="fui-cell-label" style="position: absolute;top:10px">{{
|
||||
$lang('messageContent') }}</view>
|
||||
<view class="fui-cell-info" style="margin-left: 160rpx;border: solid 2rpx #eee;">
|
||||
<!-- <input v-model="Form.mailbox" class="fui-input" placeholder="请输入您的邮箱" type="text" ></input> -->
|
||||
<textarea class="textarea" v-model="Form.remark" :placeholder="$lang('pleaseEnterMessage')" style="font-size: 28rpx;padding: 10rpx;"></textarea>
|
||||
<textarea class="textarea" v-model="Form.remark"
|
||||
:placeholder="$lang('pleaseEnterMessage')"
|
||||
style="font-size: 28rpx;padding: 10rpx;"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="button-box"><button type="primary" @click="save()">{{ $lang('submit') }}</button></view>
|
||||
<view class="button-box"><button type="primary" @click="save()">{{ $lang('submit') }}</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
@@ -143,12 +154,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import toTop from '@/components/toTop/toTop.vue';
|
||||
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
toTop
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
||||
hoverNav: () => import('@/components/hover-nav/hover-nav.vue'),
|
||||
diyBottomNav: () => import('@/components-diy/diy-bottom-nav.vue'),
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
@@ -277,7 +291,7 @@ export default {
|
||||
console.log('复制失败');
|
||||
// 可以添加错误处理或用户友好的提示
|
||||
uni.showToast({
|
||||
title: err.message || err.errMsg || this.$lang('copyFailed'),
|
||||
title: err.message || err.errMsg || this.$lang('copyFailed'),
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
@@ -2,41 +2,23 @@
|
||||
<view>
|
||||
<view class="search-wrap uni-flex uni-row">
|
||||
<view class="flex-item input-wrap">
|
||||
<input
|
||||
class="uni-input"
|
||||
maxlength="50"
|
||||
placeholder="请输入您要搜索的文件名称"
|
||||
v-model="keyword"
|
||||
@confirm="search"
|
||||
@input="__set_model($event, 'keyword')"
|
||||
/>
|
||||
<input class="uni-input" maxlength="50" placeholder="请输入您要搜索的文件名称" v-model="keyword" @confirm="search"
|
||||
@input="__set_model($event, 'keyword')" />
|
||||
<text class="iconfont icon-sousuo3" @tap="search"></text>
|
||||
</view>
|
||||
</view>
|
||||
<mescroll-uni
|
||||
ref="mescroll"
|
||||
top="100"
|
||||
@getData="getData"
|
||||
>
|
||||
<mescroll-uni ref="mescroll" top="100" @getData="getData">
|
||||
<view slot="list">
|
||||
<block v-if="list.length > 0">
|
||||
<view class="article-wrap">
|
||||
<ns-adv
|
||||
keyword="NS_ARTICLE"
|
||||
class-name="adv-wrap"
|
||||
></ns-adv>
|
||||
<ns-adv keyword="NS_ARTICLE" class-name="adv-wrap"></ns-adv>
|
||||
<block v-for="(item, index) in list" :key="index">
|
||||
<view class="item" @tap="toDetail(item.$orig)">
|
||||
<view class="article-img">
|
||||
<image
|
||||
class="cover-img"
|
||||
:src="item.g1"
|
||||
mode="widthFix"
|
||||
@error="imgError(index)"
|
||||
></image>
|
||||
<image class="cover-img" :src="item.g1" mode="widthFix" @error="imgError(index)"></image>
|
||||
</view>
|
||||
<view class="info-wrap">
|
||||
<view class="title">{{item.$orig.files_title}}</view>
|
||||
<view class="title">{{ item.$orig.files_title }}</view>
|
||||
<view class="read-wrap">
|
||||
<text>查看PDF文件</text>
|
||||
</view>
|
||||
@@ -53,227 +35,250 @@
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- 小程序隐私协议 -->
|
||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
category_id: '',
|
||||
list: [],
|
||||
title: '',
|
||||
keyword: ''
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
category_id: '',
|
||||
list: [],
|
||||
title: '',
|
||||
keyword: ''
|
||||
}
|
||||
},
|
||||
components: {
|
||||
nsAdv: () => import('@/pages_tool/components/ns-adv/ns-adv.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.category_id > 0) {
|
||||
this.category_id = options.category_id
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
__set_model(event, field) {
|
||||
this[field] = event.detail.value
|
||||
},
|
||||
components: {
|
||||
nsAdv: () => import('@/pages_tool/components/ns-adv/ns-adv.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue')
|
||||
search() {
|
||||
this.list = []
|
||||
this.$refs.mescroll.refresh()
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.category_id > 0) {
|
||||
this.category_id = options.category_id
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
__set_model(event, field) {
|
||||
this[field] = event.detail.value
|
||||
},
|
||||
search() {
|
||||
this.list = []
|
||||
this.$refs.mescroll.refresh()
|
||||
},
|
||||
getData(page) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/files/getpage',
|
||||
data: {
|
||||
page_size: page.size,
|
||||
page: page.num,
|
||||
category_id: this.category_id,
|
||||
keyword: this.keyword
|
||||
},
|
||||
success: res => {
|
||||
let list = []
|
||||
let message = res.message
|
||||
if (res.code === 0 && res.data) {
|
||||
list = res.data.list
|
||||
if (!this.title && res.data.list.length > 0) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.list[0].category_name
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: message
|
||||
getData(page) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/files/getpage',
|
||||
data: {
|
||||
page_size: page.size,
|
||||
page: page.num,
|
||||
category_id: this.category_id,
|
||||
keyword: this.keyword
|
||||
},
|
||||
success: res => {
|
||||
let list = []
|
||||
let message = res.message
|
||||
if (res.code === 0 && res.data) {
|
||||
list = res.data.list
|
||||
if (!this.title && res.data.list.length > 0) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.list[0].category_name
|
||||
})
|
||||
}
|
||||
page.endSuccess(list.length)
|
||||
if (page.num === 1) {
|
||||
this.list = []
|
||||
}
|
||||
this.list = this.list.concat(list.map(item => {
|
||||
const orig = item
|
||||
const g1 = this.$util.img("addon/personnel/shop/view/enterprise/fileicon.png")
|
||||
return { $orig: orig, g1: g1 }
|
||||
}))
|
||||
if (this.$refs.loadingCover) {
|
||||
this.$refs.loadingCover.hide()
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: message
|
||||
})
|
||||
}
|
||||
page.endSuccess(list.length)
|
||||
if (page.num === 1) {
|
||||
this.list = []
|
||||
}
|
||||
this.list = this.list.concat(list.map(item => {
|
||||
const orig = item
|
||||
const g1 = this.$util.img("addon/personnel/shop/view/enterprise/fileicon.png")
|
||||
return { $orig: orig, g1: g1 }
|
||||
}))
|
||||
if (this.$refs.loadingCover) {
|
||||
this.$refs.loadingCover.hide()
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
page.endErr()
|
||||
if (this.$refs.loadingCover) {
|
||||
this.$refs.loadingCover.hide()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
toDetail(item) {
|
||||
console.log(item.files_url)
|
||||
uni.showLoading({
|
||||
title: '正在加载'
|
||||
})
|
||||
try {
|
||||
uni.downloadFile({
|
||||
url: item.files_url,
|
||||
success: res => {
|
||||
console.log(res)
|
||||
if (res.statusCode === 200) {
|
||||
uni.openDocument({
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
console.log('打开成功')
|
||||
},
|
||||
fail: () => {
|
||||
},
|
||||
complete: () => {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
page.endErr()
|
||||
if (this.$refs.loadingCover) {
|
||||
this.$refs.loadingCover.hide()
|
||||
uni.hideLoading()
|
||||
},
|
||||
complete: res => {
|
||||
console.log('下载完成', res)
|
||||
if (res.statusCode === 404) {
|
||||
uni.showToast({
|
||||
title: '文件不存在',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
toDetail(item) {
|
||||
console.log(item.files_url)
|
||||
uni.showLoading({
|
||||
title: '正在加载'
|
||||
})
|
||||
try {
|
||||
uni.downloadFile({
|
||||
url: item.files_url,
|
||||
success: res => {
|
||||
console.log(res)
|
||||
if (res.statusCode === 200) {
|
||||
uni.openDocument({
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
console.log('打开成功')
|
||||
},
|
||||
fail: () => {
|
||||
},
|
||||
complete: () => {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading()
|
||||
},
|
||||
complete: res => {
|
||||
console.log('下载完成', res)
|
||||
if (res.statusCode === 404) {
|
||||
uni.showToast({
|
||||
title: '文件不存在',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log('CatchClause', e)
|
||||
uni.hideLoading()
|
||||
}
|
||||
},
|
||||
imgError(index) {
|
||||
if (this.list[index]) {
|
||||
this.list[index].cover_img = this.$util.getDefaultImage().article
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('CatchClause', e)
|
||||
uni.hideLoading()
|
||||
}
|
||||
},
|
||||
imgError(index) {
|
||||
if (this.list[index]) {
|
||||
this.list[index].cover_img = this.$util.getDefaultImage().article
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-wrap {
|
||||
flex: 0.5;
|
||||
padding: 30rpx 30rpx 0;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.search-wrap .iconfont {
|
||||
margin-left: 16rpx;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
.search-wrap .input-wrap {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
height: 64rpx;
|
||||
padding-left: 10rpx;
|
||||
border-radius: 70rpx;
|
||||
}
|
||||
.search-wrap .input-wrap input {
|
||||
width: 90%;
|
||||
background: #fff;
|
||||
font-size: 24rpx;
|
||||
height: 100%;
|
||||
padding: 0 25rpx 0 40rpx;
|
||||
line-height: 50rpx;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
.search-wrap .input-wrap text {
|
||||
font-size: 32rpx;
|
||||
color: #909399;
|
||||
width: 80rpx;
|
||||
text-align: center;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.empty-wrap {
|
||||
padding-top: 200rpx;
|
||||
}
|
||||
.article-wrap {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
.article-wrap .adv-wrap {
|
||||
margin: 24rpx 24rpx 0 24rpx;
|
||||
width: auto;
|
||||
}
|
||||
.article-wrap .item {
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
margin: 24rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.article-wrap .item .article-img {
|
||||
margin-right: 20rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.article-wrap .item .article-img image {
|
||||
width: 100%;
|
||||
}
|
||||
.article-wrap .item .info-wrap {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.article-wrap .item .info-wrap .title {
|
||||
font-weight: 700;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.article-wrap .item .info-wrap .read-wrap {
|
||||
display: flex;
|
||||
color: #999ca7;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 10rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
.article-wrap .item .info-wrap .read-wrap text {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.search-wrap {
|
||||
flex: 0.5;
|
||||
padding: 30rpx 30rpx 0;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-wrap .iconfont {
|
||||
margin-left: 16rpx;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.search-wrap .input-wrap {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
height: 64rpx;
|
||||
padding-left: 10rpx;
|
||||
border-radius: 70rpx;
|
||||
}
|
||||
|
||||
.search-wrap .input-wrap input {
|
||||
width: 90%;
|
||||
background: #fff;
|
||||
font-size: 24rpx;
|
||||
height: 100%;
|
||||
padding: 0 25rpx 0 40rpx;
|
||||
line-height: 50rpx;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
.search-wrap .input-wrap text {
|
||||
font-size: 32rpx;
|
||||
color: #909399;
|
||||
width: 80rpx;
|
||||
text-align: center;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.empty-wrap {
|
||||
padding-top: 200rpx;
|
||||
}
|
||||
|
||||
.article-wrap {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.article-wrap .adv-wrap {
|
||||
margin: 24rpx 24rpx 0 24rpx;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.article-wrap .item {
|
||||
display: flex;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
margin: 24rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.article-wrap .item .article-img {
|
||||
margin-right: 20rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.article-wrap .item .article-img image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.article-wrap .item .info-wrap {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.article-wrap .item .info-wrap .title {
|
||||
font-weight: 700;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.article-wrap .item .info-wrap .read-wrap {
|
||||
display: flex;
|
||||
color: #999ca7;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 10rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.article-wrap .item .info-wrap .read-wrap text {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -10,7 +10,7 @@
|
||||
<button type="primary" size="mini" class="button mini" @click="create()">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
<ns-empty :text="complete ? '提交成功' : '未获取到表单信息'" v-else></ns-empty>
|
||||
<ns-empty :text="complete ? '提交成功' : '未获取到表单信息'" v-else></ns-empty>
|
||||
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
<ns-login ref="login"></ns-login>
|
||||
@@ -18,130 +18,135 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
detail: null,
|
||||
isRepeat: false,
|
||||
complete: false,
|
||||
scroll:true
|
||||
};
|
||||
},
|
||||
onLoad(data) {
|
||||
// #ifdef MP-ALIPAY
|
||||
let options = my.getLaunchOptionsSync();
|
||||
options.query && Object.assign(data, options.query)
|
||||
// #endif
|
||||
export default {
|
||||
components: {
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsForm: () => import('@/components/ns-form/ns-form.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
detail: null,
|
||||
isRepeat: false,
|
||||
complete: false,
|
||||
scroll: true
|
||||
};
|
||||
},
|
||||
onLoad(data) {
|
||||
// #ifdef MP-ALIPAY
|
||||
let options = my.getLaunchOptionsSync();
|
||||
options.query && Object.assign(data, options.query)
|
||||
// #endif
|
||||
|
||||
this.id = data.id || 0;
|
||||
if (data.scene) {
|
||||
var sceneParams = decodeURIComponent(data.scene);
|
||||
sceneParams = sceneParams.split('&');
|
||||
if (sceneParams.length) {
|
||||
sceneParams.forEach(item => {
|
||||
if (item.indexOf('id') != -1) this.id = item.split('-')[1];
|
||||
});
|
||||
this.id = data.id || 0;
|
||||
if (data.scene) {
|
||||
var sceneParams = decodeURIComponent(data.scene);
|
||||
sceneParams = sceneParams.split('&');
|
||||
if (sceneParams.length) {
|
||||
sceneParams.forEach(item => {
|
||||
if (item.indexOf('id') != -1) this.id = item.split('-')[1];
|
||||
});
|
||||
}
|
||||
}
|
||||
if (this.storeToken) {
|
||||
this.getData();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/form/form?id=' + this.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function (nVal, oVal) {
|
||||
if (nVal) this.getData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.$api.sendRequest({
|
||||
url: '/form/api/form/info',
|
||||
data: {
|
||||
form_id: this.id
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data) {
|
||||
this.detail = res.data;
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
}
|
||||
if (this.storeToken) {
|
||||
this.getData();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/form/form?id=' + this.id)
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) this.getData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
create() {
|
||||
if (this.$refs.form.verify()) {
|
||||
if (this.isRepeat) return;
|
||||
this.isRepeat = true;
|
||||
|
||||
this.$api.sendRequest({
|
||||
url: '/form/api/form/info',
|
||||
url: '/form/api/form/create',
|
||||
data: {
|
||||
form_id: this.id
|
||||
form_id: this.id,
|
||||
form_data: JSON.stringify(this.$refs.form.formData)
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data) {
|
||||
this.detail = res.data;
|
||||
if (res.code == 0) {
|
||||
this.$util.showToast({ title: '提交成功' })
|
||||
setTimeout(() => {
|
||||
this.complete = true;
|
||||
this.detail = null;
|
||||
}, 1500)
|
||||
} else {
|
||||
this.isRepeat = false;
|
||||
this.$util.showToast({ title: res.message })
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
create() {
|
||||
if (this.$refs.form.verify()) {
|
||||
if (this.isRepeat) return;
|
||||
this.isRepeat = true;
|
||||
|
||||
this.$api.sendRequest({
|
||||
url: '/form/api/form/create',
|
||||
data: {
|
||||
form_id: this.id,
|
||||
form_data: JSON.stringify(this.$refs.form.formData)
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.$util.showToast({ title: '提交成功' })
|
||||
setTimeout(() => {
|
||||
this.complete = true;
|
||||
this.detail = null;
|
||||
}, 1500)
|
||||
} else {
|
||||
this.isRepeat = false;
|
||||
this.$util.showToast({ title: res.message })
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.form-banner {
|
||||
width: 100vw;
|
||||
line-height: 1;
|
||||
|
||||
.form-banner {
|
||||
width: 100vw;
|
||||
image {
|
||||
width: 100%;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
line-height: 1;
|
||||
}
|
||||
.system-form-wrap {
|
||||
background: $color-bg;
|
||||
border-radius: 32rpx;
|
||||
overflow: hidden;
|
||||
margin: 0 0 60rpx 0;
|
||||
padding: 0 26rpx;
|
||||
transform: translateY(-40rpx);
|
||||
|
||||
.form-title {
|
||||
line-height: 100rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.system-form-wrap {
|
||||
background: $color-bg;
|
||||
.button {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx !important;
|
||||
margin-top: 30rpx !important;
|
||||
width: 100%;
|
||||
border-radius: 80rpx;
|
||||
}
|
||||
|
||||
/deep/ .form-wrap {
|
||||
background: #fff;
|
||||
padding: 30rpx;
|
||||
border-radius: 32rpx;
|
||||
overflow: hidden;
|
||||
margin: 0 0 60rpx 0;
|
||||
padding: 0 26rpx;
|
||||
transform: translateY(-40rpx);
|
||||
|
||||
.form-title {
|
||||
line-height: 100rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.button {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx !important;
|
||||
margin-top: 30rpx !important;
|
||||
width: 100%;
|
||||
border-radius: 80rpx;
|
||||
}
|
||||
|
||||
/deep/ .form-wrap {
|
||||
background: #fff;
|
||||
padding: 30rpx;
|
||||
border-radius: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,11 +3,13 @@
|
||||
<block v-if="detail">
|
||||
<view class="page">
|
||||
<view class="system-form-wrap">
|
||||
<view class="form-title" style="text-align:center;padding-top:40rpx;font-weight:600;font-size:30rpx;">
|
||||
<view class="form-title"
|
||||
style="text-align:center;padding-top:40rpx;font-weight:600;font-size:30rpx;">
|
||||
请填写表单所需信息
|
||||
</view>
|
||||
<ns-newform ref="form" :data="detail.json_data" @submit="create"></ns-newform>
|
||||
<button class="button mini" style="font-size:32rpx;" type="primary" size="mini" @click="create">提交</button>
|
||||
<button class="button mini" style="font-size:32rpx;" type="primary" size="mini"
|
||||
@click="create">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -21,6 +23,12 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsNewform: () => import('@/components/ns-newform/ns-newform.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
@@ -37,7 +45,7 @@ export default {
|
||||
title: '提示',
|
||||
content: '参数错误',
|
||||
showCancel: false,
|
||||
success: () => {}
|
||||
success: () => { }
|
||||
})
|
||||
return false
|
||||
}
|
||||
@@ -103,7 +111,7 @@ export default {
|
||||
title: '提示',
|
||||
content: '提交成功',
|
||||
showCancel: false,
|
||||
success: () => {}
|
||||
success: () => { }
|
||||
})
|
||||
} else {
|
||||
this.isRepeat = false
|
||||
|
||||
@@ -24,116 +24,106 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniGrid from '@/components/uni-grid/uni-grid.vue';
|
||||
import uniGridItem from '@/components/uni-grid-item/uni-grid-item.vue';
|
||||
import nsAdv from '@/pages_tool/components/ns-adv/ns-adv.vue';
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
export default {
|
||||
components: {
|
||||
uniGrid,
|
||||
uniGridItem,
|
||||
nsAdv,
|
||||
MescrollUni,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
nsEmpty,
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
// #endif
|
||||
export default {
|
||||
components: {
|
||||
uniGrid: () => import('@/components/uni-grid/uni-grid.vue'),
|
||||
uniGridItem: () => import('@/components/uni-grid-item/uni-grid-item.vue'),
|
||||
nsAdv: () => import('@/pages_tool/components/ns-adv/ns-adv.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
brandList: [],
|
||||
siteId: 0
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.site_id) this.siteId = options.site_id;
|
||||
},
|
||||
onShow() { },
|
||||
methods: {
|
||||
change(e) {
|
||||
this.$util.redirectTo('/pages_goods/list', {
|
||||
brand_id: this.brandList[e.detail.index].brand_id
|
||||
});
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
brandList: [],
|
||||
siteId: 0
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.site_id) this.siteId = options.site_id;
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
change(e) {
|
||||
this.$util.redirectTo('/pages_goods/list', {
|
||||
brand_id: this.brandList[e.detail.index].brand_id
|
||||
});
|
||||
},
|
||||
getBrandList(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/goodsbrand/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num,
|
||||
site_id: this.siteId
|
||||
},
|
||||
success: res => {
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.brandList = []; //如果是第一页需手动制空列表
|
||||
this.brandList = this.brandList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail() {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
getBrandList(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/goodsbrand/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num,
|
||||
site_id: this.siteId
|
||||
},
|
||||
success: res => {
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
var title = '你想要的大牌都在这里';
|
||||
var path = '/pages_tool/goods/brand';
|
||||
return {
|
||||
title: title,
|
||||
path: path,
|
||||
success: res => {},
|
||||
fail: res => {}
|
||||
};
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.brandList = []; //如果是第一页需手动制空列表
|
||||
this.brandList = this.brandList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail() {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
var title = '你想要的大牌都在这里';
|
||||
var path = '/pages_tool/goods/brand';
|
||||
return {
|
||||
title: title,
|
||||
path: path,
|
||||
success: res => { },
|
||||
fail: res => { }
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .uni-grid-item {
|
||||
width: calc((100vw - (#{$margin-both} * 2)) / 3) !important;
|
||||
/deep/ .uni-grid-item {
|
||||
width: calc((100vw - (#{$margin-both} * 2)) / 3) !important;
|
||||
}
|
||||
|
||||
.adv-wrap {
|
||||
margin: $margin-updown $margin-both;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.brand-content {
|
||||
padding: $padding 0;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
margin: $margin-updown $margin-both 0;
|
||||
|
||||
.brand-pic {
|
||||
width: 60%;
|
||||
height: 50%;
|
||||
}
|
||||
|
||||
.adv-wrap {
|
||||
margin: $margin-updown $margin-both;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.brand-content {
|
||||
padding: $padding 0;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
margin: $margin-updown $margin-both 0;
|
||||
|
||||
.brand-pic {
|
||||
width: 60%;
|
||||
height: 50%;
|
||||
}
|
||||
|
||||
.brand_name {
|
||||
width: 70%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
.brand_name {
|
||||
width: 70%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,42 +2,53 @@
|
||||
<view :style="themeColor">
|
||||
<view class="cf-container color-line-border">
|
||||
<view class="tab">
|
||||
<view @click="changeSort(1)"><text :class="sort == 1 ? 'color-base-text active color-base-border-bottom' : ''">全部</text></view>
|
||||
<view @click="changeSort(2, 'reward')"><text :class="sort == 2 ? 'color-base-text active color-base-border-bottom' : ''">满减券</text></view>
|
||||
<view @click="changeSort(3, 'discount')"><text :class="sort == 3 ? 'color-base-text active color-base-border-bottom' : ''">折扣券</text></view>
|
||||
<!-- <view @click="changeSort(4, 'no_threshold')"><text :class="sort == 4 ? 'color-base-text active color-base-border-bottom' : ''">无门槛券</text></view> -->
|
||||
<view @click="changeSort(1)"><text
|
||||
:class="sort == 1 ? 'color-base-text active color-base-border-bottom' : ''">全部</text></view>
|
||||
<view @click="changeSort(2, 'reward')"><text
|
||||
:class="sort == 2 ? 'color-base-text active color-base-border-bottom' : ''">满减券</text></view>
|
||||
<view @click="changeSort(3, 'discount')"><text
|
||||
:class="sort == 3 ? 'color-base-text active color-base-border-bottom' : ''">折扣券</text></view>
|
||||
<!-- <view @click="changeSort(4, 'no_threshold')"><text :class="sort == 4 ? 'color-base-text active color-base-border-bottom' : ''">无门槛券</text></view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<mescroll-uni ref="mescroll" top="100" @getData="getMemberCouponList">
|
||||
<block slot="list">
|
||||
<view class="coupon-listone">
|
||||
<view class="item" v-for="(item, index) in list" :key="index" @click="liClick(item, index)" :style="{ backgroundColor: item.useState == 2 ? '#F2F2F2' : 'var(--main-color-shallow)' }">
|
||||
<view class="item" v-for="(item, index) in list" :key="index" @click="liClick(item, index)"
|
||||
:style="{ backgroundColor: item.useState == 2 ? '#F2F2F2' : 'var(--main-color-shallow)' }">
|
||||
<view class="item-base" :class="{ disabled: item.useState == 2 }">
|
||||
<image class="coupon-line" mode="heightFix" :src="$util.img('public/uniapp/coupon/coupon_line.png')"></image>
|
||||
<image class="coupon-line" mode="heightFix"
|
||||
:src="$util.img('public/uniapp/coupon/coupon_line.png')"></image>
|
||||
<view>
|
||||
<view class="use_price price-font" v-if="item.type == 'reward'" :class="{ disabled: item.useState == 2 }">
|
||||
<view class="use_price price-font" v-if="item.type == 'reward'"
|
||||
:class="{ disabled: item.useState == 2 }">
|
||||
<text>¥</text>
|
||||
{{ parseFloat(item.money) }}
|
||||
</view>
|
||||
<view class="use_price price-font" v-else-if="item.type == 'discount'" :class="{ disabled: item.useState == 2 }">
|
||||
<view class="use_price price-font" v-else-if="item.type == 'discount'"
|
||||
:class="{ disabled: item.useState == 2 }">
|
||||
{{ parseFloat(item.discount) }}
|
||||
<text>折</text>
|
||||
</view>
|
||||
<view class="use_condition font-size-tag" v-if="item.at_least > 0" :class="{ disabled: item.useState == 2 }">满{{ item.at_least }}元可用</view>
|
||||
<view class="use_condition font-size-tag" v-else :class="{ disabled: item.useState == 2 }">无门槛优惠券</view>
|
||||
<view class="use_condition font-size-tag" v-if="item.at_least > 0"
|
||||
:class="{ disabled: item.useState == 2 }">满{{ item.at_least }}元可用</view>
|
||||
<view class="use_condition font-size-tag" v-else
|
||||
:class="{ disabled: item.useState == 2 }">无门槛优惠券</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-info">
|
||||
<view class="use_title">
|
||||
<view class="title">{{ item.coupon_name }}</view>
|
||||
<view class="max_price" v-if="item.goods_type == 2 || item.goods_type == 3" :class="{ disabled: item.useState == 2 }">指定商品</view>
|
||||
<view class="max_price" v-if="item.goods_type == 2 || item.goods_type == 3"
|
||||
:class="{ disabled: item.useState == 2 }">指定商品</view>
|
||||
<view class="max_price" v-else :class="{ disabled: item.useState == 2 }">全场商品</view>
|
||||
<view class="max_price" v-if="item.discount_limit != '0.00'">
|
||||
(最大优惠{{ item.discount_limit }}元)
|
||||
</view>
|
||||
<view class="max_price" :class="{ disabled: item.useState == 2 }">{{ item.use_channel_name }}</view>
|
||||
<!-- <view class="max_price truncate" v-if="item.use_channel!='online'" :class="{ disabled: item.useState == 2 }">
|
||||
<view class="max_price" :class="{ disabled: item.useState == 2 }">{{
|
||||
item.use_channel_name }}</view>
|
||||
<!-- <view class="max_price truncate" v-if="item.use_channel!='online'" :class="{ disabled: item.useState == 2 }">
|
||||
{{ item.use_store==='all'?'适用门店:全部门店': '适用门店:'+item.use_store_name}}
|
||||
</view> -->
|
||||
</view>
|
||||
@@ -70,406 +81,401 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
export default {
|
||||
components: {
|
||||
MescrollUni,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
nsEmpty,
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
sort: 1,
|
||||
types: '',
|
||||
couponBtnSwitch: false,
|
||||
//分享建立上下级id
|
||||
mpShareData: null //小程序分享数据
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.coupon) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启优惠券',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
|
||||
//小程序分享接收source_member
|
||||
if (option.source_member) {
|
||||
uni.setStorageSync('source_member', option.source_member);
|
||||
}
|
||||
// 小程序扫码进入,接收source_member
|
||||
if (option.scene) {
|
||||
var sceneParams = decodeURIComponent(option.scene);
|
||||
sceneParams = sceneParams.split('&');
|
||||
if (sceneParams.length) {
|
||||
sceneParams.forEach(item => {
|
||||
if (item.indexOf('sku_id') != -1) this.skuId = item.split('-')[1];
|
||||
if (item.indexOf('m') != -1) uni.setStorageSync('source_member', item.split('-')[1]);
|
||||
if (item.indexOf('is_test') != -1) uni.setStorageSync('is_test', 1);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
//记录分享关系
|
||||
if (this.storeToken && uni.getStorageSync('source_member')) {
|
||||
this.$util.onSourceMember(uni.getStorageSync('source_member'));
|
||||
}
|
||||
|
||||
//小程序分享
|
||||
// #ifdef MP-WEIXIN
|
||||
this.$util.getMpShare().then(res => {
|
||||
this.mpShareData = res;
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
//分享给好友
|
||||
onShareAppMessage() {
|
||||
return this.mpShareData.appMessage;
|
||||
},
|
||||
//分享到朋友圈
|
||||
onShareTimeline() {
|
||||
return this.mpShareData.timeLine;
|
||||
},
|
||||
methods: {
|
||||
changeSort(sort, types) {
|
||||
this.list = [];
|
||||
this.sort = sort;
|
||||
this.types = types;
|
||||
this.$refs.mescroll.refresh(false);
|
||||
},
|
||||
liClick(item, index) {
|
||||
if(['limit', 'expire', 'out'].includes(item.receivedType)) return false;
|
||||
if (item.useState == 0) this.receiveCoupon(item, index);
|
||||
else this.toGoodsList(item, index);
|
||||
},
|
||||
|
||||
//领取优惠券
|
||||
receiveCoupon(item, index) {
|
||||
if (this.couponBtnSwitch) return;
|
||||
this.couponBtnSwitch = true;
|
||||
if (this.storeToken) {
|
||||
this.$api.sendRequest({
|
||||
url: '/coupon/api/coupon/receive',
|
||||
data: {
|
||||
coupon_type_id: item.coupon_type_id,
|
||||
get_type: 2 //获取方式:1订单2.直接领取3.活动领取
|
||||
},
|
||||
success: res => {
|
||||
this.couponBtnSwitch = false;
|
||||
let msg = '领取成功,快去使用吧';
|
||||
let list = this.list;
|
||||
if (res.code < 0) msg = res.message;
|
||||
|
||||
if (res.data.is_exist == 1) {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].coupon_type_id == item.coupon_type_id) {
|
||||
list[i].useState = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].coupon_type_id == item.coupon_type_id) {
|
||||
list[i].receivedType = res.data.type;
|
||||
list[i].useState = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
},
|
||||
fail: res => {
|
||||
this.couponBtnSwitch = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.couponBtnSwitch = false;
|
||||
this.$refs.login.open('/pages_tool/goods/coupon');
|
||||
}
|
||||
},
|
||||
//获取优惠券列表
|
||||
getMemberCouponList(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/coupon/api/coupon/typepagelists',
|
||||
data: {
|
||||
page: mescroll.num,
|
||||
page_size: mescroll.size,
|
||||
sort: this.sort,
|
||||
type: this.types
|
||||
},
|
||||
success: res => {
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
if (newArr.length) {
|
||||
newArr.forEach(v => {
|
||||
if (v.count == v.lead_count) v.useState = 2;
|
||||
else if (v.max_fetch != 0 && v.member_coupon_num && v.member_coupon_num >= v.max_fetch) v.useState = 1;
|
||||
else v.useState = 0;
|
||||
});
|
||||
}
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
|
||||
this.list = this.list.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail() {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
sort: 1,
|
||||
types: '',
|
||||
couponBtnSwitch: false,
|
||||
//分享建立上下级id
|
||||
mpShareData: null //小程序分享数据
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
setTimeout(() => {
|
||||
if (!this.addonIsExist.coupon) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启优惠券',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
//小程序分享接收source_member
|
||||
if (option.source_member) {
|
||||
uni.setStorageSync('source_member', option.source_member);
|
||||
}
|
||||
// 小程序扫码进入,接收source_member
|
||||
if (option.scene) {
|
||||
var sceneParams = decodeURIComponent(option.scene);
|
||||
sceneParams = sceneParams.split('&');
|
||||
if (sceneParams.length) {
|
||||
sceneParams.forEach(item => {
|
||||
if (item.indexOf('sku_id') != -1) this.skuId = item.split('-')[1];
|
||||
if (item.indexOf('m') != -1) uni.setStorageSync('source_member', item.split('-')[1]);
|
||||
if (item.indexOf('is_test') != -1) uni.setStorageSync('is_test', 1);
|
||||
});
|
||||
},
|
||||
imageError(index) {
|
||||
this.list[index].logo = this.$util.getDefaultImage().goods;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
couponImageError(index) {
|
||||
this.list[index].image = this.$util.img('public/uniapp/goods/coupon.png');
|
||||
this.$forceUpdate();
|
||||
},
|
||||
toGoodsList(item) {
|
||||
if (item.goods_type != 1) {
|
||||
this.$util.redirectTo('/pages_goods/list', {
|
||||
coupon: item.coupon_type_id
|
||||
});
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_goods/list', {});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
//记录分享关系
|
||||
if (this.storeToken && uni.getStorageSync('source_member')) {
|
||||
this.$util.onSourceMember(uni.getStorageSync('source_member'));
|
||||
}
|
||||
|
||||
//小程序分享
|
||||
// #ifdef MP-WEIXIN
|
||||
this.$util.getMpShare().then(res => {
|
||||
this.mpShareData = res;
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
//分享给好友
|
||||
onShareAppMessage() {
|
||||
return this.mpShareData.appMessage;
|
||||
},
|
||||
//分享到朋友圈
|
||||
onShareTimeline() {
|
||||
return this.mpShareData.timeLine;
|
||||
},
|
||||
methods: {
|
||||
changeSort(sort, types) {
|
||||
this.list = [];
|
||||
this.sort = sort;
|
||||
this.types = types;
|
||||
this.$refs.mescroll.refresh(false);
|
||||
},
|
||||
liClick(item, index) {
|
||||
if (['limit', 'expire', 'out'].includes(item.receivedType)) return false;
|
||||
if (item.useState == 0) this.receiveCoupon(item, index);
|
||||
else this.toGoodsList(item, index);
|
||||
},
|
||||
|
||||
//领取优惠券
|
||||
receiveCoupon(item, index) {
|
||||
if (this.couponBtnSwitch) return;
|
||||
this.couponBtnSwitch = true;
|
||||
if (this.storeToken) {
|
||||
this.$api.sendRequest({
|
||||
url: '/coupon/api/coupon/receive',
|
||||
data: {
|
||||
coupon_type_id: item.coupon_type_id,
|
||||
get_type: 2 //获取方式:1订单2.直接领取3.活动领取
|
||||
},
|
||||
success: res => {
|
||||
this.couponBtnSwitch = false;
|
||||
let msg = '领取成功,快去使用吧';
|
||||
let list = this.list;
|
||||
if (res.code < 0) msg = res.message;
|
||||
|
||||
if (res.data.is_exist == 1) {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].coupon_type_id == item.coupon_type_id) {
|
||||
list[i].useState = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].coupon_type_id == item.coupon_type_id) {
|
||||
list[i].receivedType = res.data.type;
|
||||
list[i].useState = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
},
|
||||
fail: res => {
|
||||
this.couponBtnSwitch = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.couponBtnSwitch = false;
|
||||
this.$refs.login.open('/pages_tool/goods/coupon');
|
||||
}
|
||||
},
|
||||
//获取优惠券列表
|
||||
getMemberCouponList(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/coupon/api/coupon/typepagelists',
|
||||
data: {
|
||||
page: mescroll.num,
|
||||
page_size: mescroll.size,
|
||||
sort: this.sort,
|
||||
type: this.types
|
||||
},
|
||||
success: res => {
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
if (newArr.length) {
|
||||
newArr.forEach(v => {
|
||||
if (v.count == v.lead_count) v.useState = 2;
|
||||
else if (v.max_fetch != 0 && v.member_coupon_num && v.member_coupon_num >= v.max_fetch) v.useState = 1;
|
||||
else v.useState = 0;
|
||||
});
|
||||
}
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
|
||||
this.list = this.list.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail() {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
imageError(index) {
|
||||
this.list[index].logo = this.$util.getDefaultImage().goods;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
couponImageError(index) {
|
||||
this.list[index].image = this.$util.img('public/uniapp/goods/coupon.png');
|
||||
this.$forceUpdate();
|
||||
},
|
||||
toGoodsList(item) {
|
||||
if (item.goods_type != 1) {
|
||||
this.$util.redirectTo('/pages_goods/list', {
|
||||
coupon: item.coupon_type_id
|
||||
});
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_goods/list', {});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.coupon-head {
|
||||
padding: 20rpx 50rpx;
|
||||
display: flex;
|
||||
background: #fff;
|
||||
.coupon-head {
|
||||
padding: 20rpx 50rpx;
|
||||
display: flex;
|
||||
background: #fff;
|
||||
|
||||
.sort {
|
||||
border: 2rpx solid #c5c5c5;
|
||||
padding: 1rpx 20rpx;
|
||||
border-radius: $border-radius;
|
||||
cursor: pointer;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.sort {
|
||||
border: 2rpx solid #c5c5c5;
|
||||
padding: 1rpx 20rpx;
|
||||
border-radius: $border-radius;
|
||||
cursor: pointer;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.coupon-listone {
|
||||
padding: 0 30rpx;
|
||||
.coupon-listone {
|
||||
padding: 0 30rpx;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
background-color: #fff2f0;
|
||||
.item {
|
||||
display: flex;
|
||||
background-color: #fff2f0;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 20rpx;
|
||||
align-items: stretch;
|
||||
margin-top: $padding;
|
||||
overflow: hidden;
|
||||
|
||||
.item-base {
|
||||
position: relative;
|
||||
width: 197rpx;
|
||||
min-width: 197rpx;
|
||||
text-align: center;
|
||||
background: linear-gradient(to left, var(--bg-color), var(--bg-color-shallow));
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 20rpx;
|
||||
align-items: stretch;
|
||||
margin-top: $padding;
|
||||
overflow: hidden;
|
||||
padding: 38rpx 10rpx 38rpx 18rpx;
|
||||
|
||||
.item-base {
|
||||
&.disabled {
|
||||
background: #dedede;
|
||||
}
|
||||
|
||||
.coupon-line {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
>view {
|
||||
height: auto;
|
||||
position: relative;
|
||||
width: 197rpx;
|
||||
min-width: 197rpx;
|
||||
text-align: center;
|
||||
background: linear-gradient(to left, var(--bg-color), var(--bg-color-shallow));
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
padding: 38rpx 10rpx 38rpx 18rpx;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
}
|
||||
|
||||
.use_price {
|
||||
font-size: 60rpx;
|
||||
line-height: 1;
|
||||
color: #fff;
|
||||
|
||||
text {
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
background: #dedede;
|
||||
}
|
||||
|
||||
.coupon-line {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
>view {
|
||||
height: auto;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
}
|
||||
|
||||
.use_price {
|
||||
font-size: 60rpx;
|
||||
line-height: 1;
|
||||
color: #fff;
|
||||
|
||||
text {
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
.use_condition {
|
||||
color: #fff;
|
||||
margin-top: $padding;
|
||||
|
||||
&.margin_top_none {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: #f8f8f8;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
height: 30rpx;
|
||||
width: 15rpx;
|
||||
border-radius: 0 30rpx 30rpx 0;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
.item-btn {
|
||||
width: 160rpx;
|
||||
min-width: 160rpx;
|
||||
align-self: center;
|
||||
position: relative;
|
||||
.use_condition {
|
||||
color: #fff;
|
||||
margin-top: $padding;
|
||||
|
||||
view {
|
||||
width: 100rpx;
|
||||
height: 50rpx;
|
||||
border-radius: $border-radius;
|
||||
line-height: 50rpx;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
background-image: linear-gradient(to right, var(--bg-color), var(--bg-color-shallow));
|
||||
color: var(--btn-text-color);
|
||||
&.margin_top_none {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: #f8f8f8;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
height: 30rpx;
|
||||
width: 15rpx;
|
||||
border-radius: 0 30rpx 30rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
.item-btn {
|
||||
width: 160rpx;
|
||||
min-width: 160rpx;
|
||||
align-self: center;
|
||||
position: relative;
|
||||
|
||||
view {
|
||||
width: 100rpx;
|
||||
height: 50rpx;
|
||||
border-radius: $border-radius;
|
||||
line-height: 50rpx;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
background-image: linear-gradient(to right, var(--bg-color), var(--bg-color-shallow));
|
||||
color: var(--btn-text-color);
|
||||
font-size: $font-size-tag;
|
||||
|
||||
&.disabled {
|
||||
background: #dedede !important;
|
||||
color: #909399 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: #f8f8f8;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
height: 30rpx;
|
||||
width: 15rpx;
|
||||
border-radius: 30rpx 0 0 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-left: 20rpx;
|
||||
overflow: hidden;
|
||||
background-repeat-x: no-repeat;
|
||||
background-repeat-y: repeat;
|
||||
|
||||
.use_time {
|
||||
padding: 20rpx 0;
|
||||
border-top: 2rpx dashed #cccccc;
|
||||
font-size: $font-size-activity-tag;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.use_title {
|
||||
font-size: $font-size-base;
|
||||
font-weight: 500;
|
||||
padding: 20rpx 0;
|
||||
|
||||
// height:80rpx;
|
||||
.title {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.max_price {
|
||||
font-weight: 400;
|
||||
font-size: $font-size-tag;
|
||||
|
||||
&.disabled {
|
||||
background: #dedede !important;
|
||||
color: #909399 !important;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: #f8f8f8;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
height: 30rpx;
|
||||
width: 15rpx;
|
||||
border-radius: 30rpx 0 0 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-left: 20rpx;
|
||||
overflow: hidden;
|
||||
background-repeat-x: no-repeat;
|
||||
background-repeat-y: repeat;
|
||||
|
||||
.use_time {
|
||||
padding: 20rpx 0;
|
||||
border-top: 2rpx dashed #cccccc;
|
||||
font-size: $font-size-activity-tag;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.use_title {
|
||||
font-size: $font-size-base;
|
||||
font-weight: 500;
|
||||
padding: 20rpx 0;
|
||||
|
||||
// height:80rpx;
|
||||
.title {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.max_price {
|
||||
font-weight: 400;
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
margin-top: 200rpx;
|
||||
}
|
||||
.empty {
|
||||
margin-top: 200rpx;
|
||||
}
|
||||
|
||||
.cf-container {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
.cf-container {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tab {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.tab {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 86rpx;
|
||||
|
||||
>view {
|
||||
text-align: center;
|
||||
width: 33%;
|
||||
height: 86rpx;
|
||||
|
||||
>view {
|
||||
text-align: center;
|
||||
width: 33%;
|
||||
height: 86rpx;
|
||||
|
||||
text {
|
||||
display: inline-block;
|
||||
line-height: 86rpx;
|
||||
height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
text {
|
||||
display: inline-block;
|
||||
line-height: 86rpx;
|
||||
height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
border-bottom: 4rpx solid;
|
||||
}
|
||||
.truncate {
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.active {
|
||||
border-bottom: 4rpx solid;
|
||||
}
|
||||
|
||||
.truncate {
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
@@ -39,6 +39,13 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</view>
|
||||
<text class="evaluator-name using-hidden" v-else>{{ item.member_name }}</text>
|
||||
<view class="evaluator-time color-tip">{{ $util.timeStampTurnTime(item.create_time)
|
||||
}}</view>
|
||||
}}</view>
|
||||
</view>
|
||||
<view class="evaluator-xing">
|
||||
<xiaoStarComponent :starCount="item.scores * 2"></xiaoStarComponent>
|
||||
@@ -74,24 +74,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
|
||||
import xiaoStarComponent from '@/components/xiao-star-component/xiao-star-component.vue';
|
||||
export default {
|
||||
components: {
|
||||
xiaoStarComponent,
|
||||
MescrollUni,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
nsEmpty,
|
||||
xiaoStarComponent: () => import('@/components/xiao-star-component/xiao-star-component.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -12,16 +12,17 @@ export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onShow() {},
|
||||
onShow() { },
|
||||
methods: {}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page{
|
||||
.page {
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.closeBox {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@@ -30,9 +31,11 @@ export default {
|
||||
align-items: center;
|
||||
margin-top: 260rpx;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 400rpx;
|
||||
}
|
||||
|
||||
.close-title {
|
||||
font-size: $font-size-base;
|
||||
color: $color-tip;
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<view class="content">
|
||||
<view class="cate-search">
|
||||
<view class="search-box" @click="search()" @tap.stop="search()">
|
||||
<input class="uni-input" maxlength="50" v-model="inputValue" confirm-type="search" @focus="inputFocus" focus @confirm="search()" @click="search()" @tap="search()" :placeholder="searchWords ? searchWords : ''" />
|
||||
<input class="uni-input" maxlength="50" v-model="inputValue" confirm-type="search"
|
||||
@focus="inputFocus" focus @confirm="search()" @click="search()" @tap="search()"
|
||||
:placeholder="searchWords ? searchWords : ''" />
|
||||
<text class="iconfont icon-sousuo3" @click="search()"></text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -15,8 +17,10 @@
|
||||
<view class="title">历史搜索</view>
|
||||
<view class="icon iconfont icon-icon7" @click="deleteHistoryList"></view>
|
||||
</view>
|
||||
<view class="history-bottom " id="history-list" :style="{ maxHeight: !isAllHistory ? '100%' : '168rpx' }">
|
||||
<view class="history-li" v-for="(item, index) in historyList" :key="index" @click="otherSearch(item)">
|
||||
<view class="history-bottom " id="history-list"
|
||||
:style="{ maxHeight: !isAllHistory ? '100%' : '168rpx' }">
|
||||
<view class="history-li" v-for="(item, index) in historyList" :key="index"
|
||||
@click="otherSearch(item)">
|
||||
<view>{{ item }}</view>
|
||||
</view>
|
||||
<view class="history-li history_more" v-if="isAllHistory" @click="isAllHistory = false">
|
||||
@@ -33,7 +37,8 @@
|
||||
<view class="title">热门搜索</view>
|
||||
</view>
|
||||
<view class="history-bottom">
|
||||
<view class="history-li" v-for="(item, index) in hotList" :key="index" @click="otherSearch(item)" @longtap="deleteItem(item)">
|
||||
<view class="history-li" v-for="(item, index) in hotList" :key="index"
|
||||
@click="otherSearch(item)" @longtap="deleteItem(item)">
|
||||
<view>{{ item }}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -45,297 +50,297 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
inputValue: '', //搜索框的值
|
||||
historyList: [], //历史搜索记录
|
||||
searchList: [], //搜索发现列表
|
||||
alikeList: [],
|
||||
isIndex: false,
|
||||
searchWords: '',
|
||||
hotList: [],
|
||||
isAllHistory: false
|
||||
};
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
inputValue: '', //搜索框的值
|
||||
historyList: [], //历史搜索记录
|
||||
searchList: [], //搜索发现列表
|
||||
alikeList: [],
|
||||
isIndex: false,
|
||||
searchWords: '',
|
||||
hotList: [],
|
||||
isAllHistory: false
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.keyword) this.inputValue = options.keyword;
|
||||
uni.getStorageSync('search') ? '' : uni.setStorageSync('search', []);
|
||||
},
|
||||
onShow() {
|
||||
this.findHistoryList();
|
||||
this.defaultSearch();
|
||||
this.findHotList();
|
||||
this.$nextTick(function () {
|
||||
this.getHistoryHeight();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//获取历史搜索记录
|
||||
findHistoryList() {
|
||||
this.historyList = uni.getStorageSync('search').reverse();
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.keyword) this.inputValue = options.keyword;
|
||||
uni.getStorageSync('search') ? '' : uni.setStorageSync('search', []);
|
||||
},
|
||||
onShow() {
|
||||
this.findHistoryList();
|
||||
this.defaultSearch();
|
||||
this.findHotList();
|
||||
this.$nextTick(function() {
|
||||
this.getHistoryHeight();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//获取历史搜索记录
|
||||
findHistoryList() {
|
||||
this.historyList = uni.getStorageSync('search').reverse();
|
||||
},
|
||||
//删除所有历史记录
|
||||
deleteHistoryList() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认删除全部历史记录?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
uni.setStorageSync('search', []);
|
||||
this.findHistoryList();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//删除历史记录的某一项
|
||||
deleteItem(e) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认删除该条历史记录?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
let array = uni.getStorageSync('search');
|
||||
let newArr = array.filter(v => {
|
||||
return v != e;
|
||||
});
|
||||
uni.setStorageSync('search', newArr);
|
||||
this.findHistoryList();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取默认搜素
|
||||
defaultSearch() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/goods/defaultSearchWords',
|
||||
success: res => {
|
||||
this.searchWords = res.data.words;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取热门搜素
|
||||
findHotList() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/goods/hotSearchWords',
|
||||
success: res => {
|
||||
if (res.data.words != '') {
|
||||
this.hotList = res.data.words.split(',');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//input框获取焦点事件
|
||||
inputFocus(e) {
|
||||
if (this.inputValue.trim() != '') this.dataList = [];
|
||||
},
|
||||
//点击其他列表搜索
|
||||
otherSearch(e) {
|
||||
this.inputValue = e;
|
||||
this.search();
|
||||
},
|
||||
//搜索
|
||||
search() {
|
||||
|
||||
if (this.inputValue.trim() != '') {
|
||||
|
||||
// 对历史搜索处理,判断有无,最近搜索显示在最前
|
||||
let historyList = uni.getStorageSync('search');
|
||||
let array = [];
|
||||
if (historyList.length) {
|
||||
array = historyList.filter(v => {
|
||||
return v != this.inputValue.trim();
|
||||
});
|
||||
array.push(this.inputValue.trim());
|
||||
} else {
|
||||
array.push(this.inputValue.trim());
|
||||
}
|
||||
uni.setStorageSync('search', array);
|
||||
|
||||
this.$util.redirectTo('/pages_goods/list', {
|
||||
keyword: this.inputValue.trim()
|
||||
});
|
||||
} else {
|
||||
if (this.searchWords == '') {
|
||||
this.$util.showToast({
|
||||
title: '搜索内容不能为空哦'
|
||||
});
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_goods/list', {
|
||||
//keyword: this.searchWords
|
||||
});
|
||||
//删除所有历史记录
|
||||
deleteHistoryList() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认删除全部历史记录?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
uni.setStorageSync('search', []);
|
||||
this.findHistoryList();
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取元素高度
|
||||
getHistoryHeight() {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('#history-list')
|
||||
.boundingClientRect(data => {
|
||||
if (data && data.height > uni.upx2px(70) * 2 + uni.upx2px(35) * 2) {
|
||||
this.isAllHistory = true;
|
||||
}
|
||||
}).exec();
|
||||
});
|
||||
},
|
||||
//删除历史记录的某一项
|
||||
deleteItem(e) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认删除该条历史记录?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
let array = uni.getStorageSync('search');
|
||||
let newArr = array.filter(v => {
|
||||
return v != e;
|
||||
});
|
||||
uni.setStorageSync('search', newArr);
|
||||
this.findHistoryList();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取默认搜素
|
||||
defaultSearch() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/goods/defaultSearchWords',
|
||||
success: res => {
|
||||
this.searchWords = res.data.words;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取热门搜素
|
||||
findHotList() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/goods/hotSearchWords',
|
||||
success: res => {
|
||||
if (res.data.words != '') {
|
||||
this.hotList = res.data.words.split(',');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//input框获取焦点事件
|
||||
inputFocus(e) {
|
||||
if (this.inputValue.trim() != '') this.dataList = [];
|
||||
},
|
||||
//点击其他列表搜索
|
||||
otherSearch(e) {
|
||||
this.inputValue = e;
|
||||
this.search();
|
||||
},
|
||||
//搜索
|
||||
search() {
|
||||
|
||||
if (this.inputValue.trim() != '') {
|
||||
|
||||
// 对历史搜索处理,判断有无,最近搜索显示在最前
|
||||
let historyList = uni.getStorageSync('search');
|
||||
let array = [];
|
||||
if (historyList.length) {
|
||||
array = historyList.filter(v => {
|
||||
return v != this.inputValue.trim();
|
||||
});
|
||||
array.push(this.inputValue.trim());
|
||||
} else {
|
||||
array.push(this.inputValue.trim());
|
||||
}
|
||||
uni.setStorageSync('search', array);
|
||||
|
||||
this.$util.redirectTo('/pages_goods/list', {
|
||||
keyword: this.inputValue.trim()
|
||||
});
|
||||
} else {
|
||||
if (this.searchWords == '') {
|
||||
this.$util.showToast({
|
||||
title: '搜索内容不能为空哦'
|
||||
});
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_goods/list', {
|
||||
//keyword: this.searchWords
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取元素高度
|
||||
getHistoryHeight() {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('#history-list')
|
||||
.boundingClientRect(data => {
|
||||
if (data && data.height > uni.upx2px(70) * 2 + uni.upx2px(35) * 2) {
|
||||
this.isAllHistory = true;
|
||||
}
|
||||
}).exec();
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .fixed {
|
||||
position: relative;
|
||||
top: 0;
|
||||
/deep/ .fixed {
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/deep/ .empty {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.cart-empty {
|
||||
padding-top: 54px;
|
||||
}
|
||||
|
||||
.content {
|
||||
// overflow: hidden;
|
||||
width: 100vw;
|
||||
/* #ifdef MP */
|
||||
height: 100vh;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
height: calc(100vh - env(safe-area-inset-bottom) - var(--status-bar-height));
|
||||
/* #endif */
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(100vh - 44px - env(safe-area-inset-bottom));
|
||||
/* #endif */
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.cate-search {
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
padding: 10rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
/* #ifdef H5 */
|
||||
padding-top: 30rpx;
|
||||
/* #endif */
|
||||
|
||||
input {
|
||||
font-size: $font-size-base;
|
||||
height: 100%;
|
||||
padding: 0 25rpx 0 30rpx;
|
||||
width: calc(100% - 120rpx);
|
||||
}
|
||||
|
||||
/deep/ .empty {
|
||||
margin-top: 0 !important;
|
||||
text {
|
||||
font-size: 32rpx;
|
||||
color: $color-tip;
|
||||
width: 120rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cart-empty {
|
||||
padding-top: 54px;
|
||||
}
|
||||
|
||||
.content {
|
||||
// overflow: hidden;
|
||||
width: 100vw;
|
||||
/* #ifdef MP */
|
||||
height: 100vh;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
height: calc(100vh - env(safe-area-inset-bottom) - var(--status-bar-height));
|
||||
/* #endif */
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(100vh - 44px - env(safe-area-inset-bottom));
|
||||
/* #endif */
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.cate-search {
|
||||
.search-box {
|
||||
width: 100%;
|
||||
height: 64rpx;
|
||||
background: $color-bg;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.search-content {
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.history {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
.history-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
padding: 10rpx 30rpx;
|
||||
padding: 30rpx 30rpx 0rpx 30rpx;
|
||||
|
||||
box-sizing: border-box;
|
||||
/* #ifdef H5 */
|
||||
padding-top: 30rpx;
|
||||
/* #endif */
|
||||
overflow: hidden;
|
||||
|
||||
input {
|
||||
font-size: $font-size-base;
|
||||
height: 100%;
|
||||
padding: 0 25rpx 0 30rpx;
|
||||
width: calc(100% - 120rpx);
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 32rpx;
|
||||
color: $color-tip;
|
||||
width: 120rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
.history-top {
|
||||
width: 100%;
|
||||
height: 64rpx;
|
||||
background: $color-bg;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
}
|
||||
font-size: $font-size-toolbar;
|
||||
|
||||
.search-content {
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.history {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
.history-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
padding: 30rpx 30rpx 0rpx 30rpx;
|
||||
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
|
||||
.history-top {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.title {
|
||||
font-weight: 500;
|
||||
font-size: $font-size-toolbar;
|
||||
|
||||
.title {
|
||||
font-weight: 500;
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
color: $color-tip;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
|
||||
.history-bottom {
|
||||
width: 100%;
|
||||
padding-top: $padding;
|
||||
position: relative;
|
||||
|
||||
.history-li {
|
||||
display: inline-block;
|
||||
margin-right: 20rpx;
|
||||
margin-bottom: 15rpx;
|
||||
max-width: 100%;
|
||||
|
||||
view {
|
||||
line-height: 66rpx;
|
||||
background: #f8f8f8 !important;
|
||||
height: 66rpx;
|
||||
color: #303133 !important;
|
||||
margin: 0 0rpx 4rpx 0 !important;
|
||||
padding: 0 $padding;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
&.history_more {
|
||||
margin-right: 0;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
.iconfont {
|
||||
color: $color-tip;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
|
||||
.hidden-show {
|
||||
.history-bottom {
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
text-align: center;
|
||||
line-height: 70rpx;
|
||||
padding-top: $padding;
|
||||
position: relative;
|
||||
|
||||
.history-li {
|
||||
display: inline-block;
|
||||
margin-right: 20rpx;
|
||||
margin-bottom: 15rpx;
|
||||
max-width: 100%;
|
||||
|
||||
view {
|
||||
line-height: 66rpx;
|
||||
background: #f8f8f8 !important;
|
||||
height: 66rpx;
|
||||
color: #303133 !important;
|
||||
margin: 0 0rpx 4rpx 0 !important;
|
||||
padding: 0 $padding;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
&.history_more {
|
||||
margin-right: 0;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search-alike {
|
||||
.hidden-show {
|
||||
width: 100%;
|
||||
height: calc(100vh - 100rpx);
|
||||
|
||||
padding: 0 $padding;
|
||||
box-sizing: border-box;
|
||||
|
||||
.alike-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: $padding;
|
||||
overflow: hidden;
|
||||
}
|
||||
height: 70rpx;
|
||||
text-align: center;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.search-alike {
|
||||
width: 100%;
|
||||
height: calc(100vh - 100rpx);
|
||||
|
||||
padding: 0 $padding;
|
||||
box-sizing: border-box;
|
||||
|
||||
.alike-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: $padding;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -15,51 +15,49 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import htmlParser from '@/common/js/html-parser';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
detail: {},
|
||||
content: ''
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.id = options.id || 0;
|
||||
// 小程序扫码进入
|
||||
if (options.scene) {
|
||||
var sceneParams = decodeURIComponent(options.scene);
|
||||
this.id = sceneParams.split('-')[1];
|
||||
}
|
||||
if (this.id == 0) {
|
||||
this.$util.redirectTo('/pages_tool/help/list', {}, 'redirectTo');
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/help/info',
|
||||
data: {
|
||||
id: this.id
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data) {
|
||||
this.detail = res.data;
|
||||
this.$langConfig.title(this.detail.title);
|
||||
this.content = htmlParser(res.data.content);
|
||||
this.setPublicShare();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/help/list', {}, 'redirectTo');
|
||||
}, 2000);
|
||||
}
|
||||
import htmlParser from '@/common/js/html-parser.js';
|
||||
export default {
|
||||
components: {
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
detail: {},
|
||||
content: ''
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.id = options.id || 0;
|
||||
// 小程序扫码进入
|
||||
if (options.scene) {
|
||||
var sceneParams = decodeURIComponent(options.scene);
|
||||
this.id = sceneParams.split('-')[1];
|
||||
}
|
||||
if (this.id == 0) {
|
||||
this.$util.redirectTo('/pages_tool/help/list', {}, 'redirectTo');
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/help/info',
|
||||
data: {
|
||||
id: this.id
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data) {
|
||||
this.detail = res.data;
|
||||
this.$langConfig.title(this.detail.title);
|
||||
this.content = htmlParser(res.data.content);
|
||||
this.setPublicShare();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
@@ -68,73 +66,81 @@
|
||||
this.$util.redirectTo('/pages_tool/help/list', {}, 'redirectTo');
|
||||
}, 2000);
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/help/list', {}, 'redirectTo');
|
||||
}, 2000);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置公众号分享
|
||||
setPublicShare() {
|
||||
let shareUrl = this.$config.h5Domain + '/pages_tool/help/detail?id=' + this.id;
|
||||
this.$util.setPublicShare({
|
||||
title: this.detail.title,
|
||||
desc: '',
|
||||
link: shareUrl,
|
||||
imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) : ''
|
||||
});
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
var title = this.detail.title;
|
||||
var path = '/pages_tool/help/detail?id=' + this.id;
|
||||
return {
|
||||
title: title,
|
||||
path: path,
|
||||
success: res => {},
|
||||
fail: res => {}
|
||||
};
|
||||
},
|
||||
//分享到朋友圈
|
||||
onShareTimeline() {
|
||||
var title = this.detail.title;
|
||||
var query = 'id=' + this.id;
|
||||
return {
|
||||
title: title,
|
||||
query: query,
|
||||
imageUrl: ''
|
||||
};
|
||||
// 设置公众号分享
|
||||
setPublicShare() {
|
||||
let shareUrl = this.$config.h5Domain + '/pages_tool/help/detail?id=' + this.id;
|
||||
this.$util.setPublicShare({
|
||||
title: this.detail.title,
|
||||
desc: '',
|
||||
link: shareUrl,
|
||||
imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) : ''
|
||||
});
|
||||
}
|
||||
};
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
var title = this.detail.title;
|
||||
var path = '/pages_tool/help/detail?id=' + this.id;
|
||||
return {
|
||||
title: title,
|
||||
path: path,
|
||||
success: res => { },
|
||||
fail: res => { }
|
||||
};
|
||||
},
|
||||
//分享到朋友圈
|
||||
onShareTimeline() {
|
||||
var title = this.detail.title;
|
||||
var query = 'id=' + this.id;
|
||||
return {
|
||||
title: title,
|
||||
query: query,
|
||||
imageUrl: ''
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
}
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.help-title {
|
||||
font-size: $font-size-toolbar;
|
||||
text-align: center;
|
||||
}
|
||||
.help-title {
|
||||
font-size: $font-size-toolbar;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.help-content {
|
||||
margin-top: $margin-updown;
|
||||
word-break: break-all;
|
||||
}
|
||||
.help-content {
|
||||
margin-top: $margin-updown;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.help-meta {
|
||||
text-align: right;
|
||||
margin-top: $margin-updown;
|
||||
color: $color-tip;
|
||||
.help-meta {
|
||||
text-align: right;
|
||||
margin-top: $margin-updown;
|
||||
color: $color-tip;
|
||||
|
||||
.help-time {
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
.help-time {
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,7 +3,8 @@
|
||||
<block v-if="dataList.length">
|
||||
<view class="help-item" v-for="(item, index) in dataList" :key="index">
|
||||
<view :class="['item-title', item.child_list.length == 0 ? 'empty' : '']">{{ item.class_name }}</view>
|
||||
<view class="item-content" v-for="(s_item, s_index) in item.child_list" :key="s_index" @click="helpDetail(s_item)">{{ s_item.title }}</view>
|
||||
<view class="item-content" v-for="(s_item, s_index) in item.child_list" :key="s_index"
|
||||
@click="helpDetail(s_item)">{{ s_item.title }}</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else><ns-empty text="暂无帮助信息" :isIndex="false"></ns-empty></block>
|
||||
@@ -19,12 +20,18 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: []
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
onLoad() { },
|
||||
onShow() {
|
||||
this.setPublicShare();
|
||||
this.getData();
|
||||
@@ -85,8 +92,8 @@ export default {
|
||||
return {
|
||||
title: title,
|
||||
path: path,
|
||||
success: res => {},
|
||||
fail: res => {}
|
||||
success: res => { },
|
||||
fail: res => { }
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -112,6 +119,7 @@ export default {
|
||||
font-size: 30rpx;
|
||||
color: #000;
|
||||
border-bottom: 2rpx solid #f1f1f1;
|
||||
|
||||
&.empty {
|
||||
padding-bottom: 0;
|
||||
border-bottom: none;
|
||||
|
||||
@@ -56,15 +56,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import nsNavbar from '@/components/ns-navbar/ns-navbar.vue';
|
||||
import diyJs from '@/common/js/diy.js';
|
||||
import microPageJs from './public/js/diy.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniPopup,
|
||||
nsNavbar
|
||||
diyIndexPage: () => import('@/components-diy/diy-index-page.vue'),
|
||||
diyGroup: () => import('@/components-diy/diy-group.vue'),
|
||||
diyBottomNav: () => import('@/components-diy/diy-bottom-nav.vue'),
|
||||
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
nsNavbar: () => import('@/components/ns-navbar/ns-navbar.vue'),
|
||||
nsCopyright: () => import('@/components/ns-copyright/ns-copyright.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
mixins: [diyJs, microPageJs]
|
||||
};
|
||||
@@ -79,13 +89,16 @@ export default {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.choose-store>>>.goodslist-uni-popup-box {
|
||||
width: 80%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/deep/ .placeholder {
|
||||
height: 0;
|
||||
@@ -101,4 +114,4 @@ export default {
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -23,25 +23,13 @@
|
||||
<!-- 输入手机号和验证码 -->
|
||||
<block v-if="stepShow == 0">
|
||||
<view class="form-input">
|
||||
<input
|
||||
class="uni-input"
|
||||
placeholder-class="placeholder-class"
|
||||
type="text"
|
||||
maxlength="17"
|
||||
v-model="formData.mobile"
|
||||
:placeholder="$lang('accountPlaceholder')"
|
||||
/>
|
||||
<input class="uni-input" placeholder-class="placeholder-class" type="text" maxlength="17"
|
||||
v-model="formData.mobile" :placeholder="$lang('accountPlaceholder')" />
|
||||
</view>
|
||||
|
||||
<view class="form-input align-type">
|
||||
<input
|
||||
class="uni-input info-content"
|
||||
placeholder-class="placeholder-class"
|
||||
type="number"
|
||||
maxlength="4"
|
||||
:placeholder="$lang('captchaPlaceholder')"
|
||||
v-model="formData.captcha"
|
||||
/>
|
||||
<input class="uni-input info-content" placeholder-class="placeholder-class" type="number"
|
||||
maxlength="4" :placeholder="$lang('captchaPlaceholder')" v-model="formData.captcha" />
|
||||
<image :src="captcha.img" class="captcha" @click="getCaptcha"></image>
|
||||
</view>
|
||||
|
||||
@@ -56,27 +44,13 @@
|
||||
<!-- 输入新密码 -->
|
||||
<block v-if="stepShow == 2">
|
||||
<view class="form-input">
|
||||
<input
|
||||
class="uni-input"
|
||||
placeholder-class="placeholder-class"
|
||||
type="text"
|
||||
maxlength="30"
|
||||
password="true"
|
||||
:placeholder="$lang('passwordPlaceholder')"
|
||||
v-model="formData.password"
|
||||
/>
|
||||
<input class="uni-input" placeholder-class="placeholder-class" type="text" maxlength="30"
|
||||
password="true" :placeholder="$lang('passwordPlaceholder')" v-model="formData.password" />
|
||||
</view>
|
||||
|
||||
<view class="form-input">
|
||||
<input
|
||||
class="uni-input"
|
||||
placeholder-class="placeholder-class"
|
||||
type="text"
|
||||
maxlength="30"
|
||||
password="true"
|
||||
:placeholder="$lang('rePasswordPlaceholder')"
|
||||
v-model="formData.rePassword"
|
||||
/>
|
||||
<input class="uni-input" placeholder-class="placeholder-class" type="text" maxlength="30"
|
||||
password="true" :placeholder="$lang('rePasswordPlaceholder')" v-model="formData.rePassword" />
|
||||
</view>
|
||||
|
||||
<button type="primary" class="find-btn" @click="save">{{ $lang('save') }}</button>
|
||||
@@ -87,10 +61,9 @@
|
||||
|
||||
<script>
|
||||
import validate from 'common/js/validate.js';
|
||||
import mypOne from '@/pages_tool/components/myp-one/myp-one.vue';
|
||||
export default {
|
||||
components: {
|
||||
mypOne
|
||||
mypOne: () => import('@/pages_tool/components/myp-one/myp-one.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -138,17 +111,17 @@ export default {
|
||||
// 下一步
|
||||
async nextStep() {
|
||||
let step0Rule = [
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'phoneno',
|
||||
errorMsg: '请输入正确的手机号'
|
||||
},
|
||||
{
|
||||
name: 'captcha',
|
||||
checkType: 'required',
|
||||
errorMsg: this.$lang('captchaPlaceholder')
|
||||
}
|
||||
], //手机验证
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'phoneno',
|
||||
errorMsg: '请输入正确的手机号'
|
||||
},
|
||||
{
|
||||
name: 'captcha',
|
||||
checkType: 'required',
|
||||
errorMsg: this.$lang('captchaPlaceholder')
|
||||
}
|
||||
], //手机验证
|
||||
step0CheckRes;
|
||||
|
||||
step0CheckRes = validate.check(this.formData, step0Rule);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<view :style="themeColor">
|
||||
<scroll-view scroll-y="false" class="container">
|
||||
<view class="header-wrap" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/member/head.png') + ')' }">
|
||||
<view class="header-wrap"
|
||||
:style="{ backgroundImage: 'url(' + $util.img('public/uniapp/member/head.png') + ')' }">
|
||||
<view class="t-b">
|
||||
<div v-html="$lang('welcomeText')"></div>
|
||||
</view>
|
||||
@@ -66,9 +67,12 @@
|
||||
|
||||
<script>
|
||||
import validate from 'common/js/validate.js';
|
||||
import registerReward from '@/components/register-reward/register-reward.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
registerReward: () => import('@/components/register-reward/register-reward.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isAgree: false,
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<mescroll-uni ref="mescroll" @getData="getData" v-if="storeToken">
|
||||
<block slot="list">
|
||||
<view class="nc-info-list-content">
|
||||
<view class="list-item balance-item" @click="setBalanceDefault()" v-if="type=='fenxiao' && payList && payList.balance">
|
||||
<view class="list-item balance-item" @click="setBalanceDefault()"
|
||||
v-if="type == 'fenxiao' && payList && payList.balance">
|
||||
<view class="item-top">
|
||||
<view class="item-left">
|
||||
<view class="title-text">提现到余额</view>
|
||||
@@ -32,9 +33,10 @@
|
||||
</view>
|
||||
|
||||
<view class="item-bottom">
|
||||
<view class="account-default" @click="setDefault(item.id,item.is_default)">
|
||||
<view class="account-default" @click="setDefault(item.id, item.is_default)">
|
||||
<text class="default">设为默认账户</text>
|
||||
<switch v-if="item.is_default == 1" checked disabled style="transform:scale(0.7)" :color="themeStyle.main_color" />
|
||||
<switch v-if="item.is_default == 1" checked disabled style="transform:scale(0.7)"
|
||||
:color="themeStyle.main_color" />
|
||||
<switch v-else style="transform:scale(0.7)" :color="themeStyle.main_color" />
|
||||
</view>
|
||||
<view class="account-btn">
|
||||
@@ -46,10 +48,13 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view v-if="dataList.length <= 0 && (type != 'fenxiao' || (type == 'fenxiao' && payList && !payList.balance))" class="empty-box">
|
||||
<view
|
||||
v-if="dataList.length <= 0 && (type != 'fenxiao' || (type == 'fenxiao' && payList && !payList.balance))"
|
||||
class="empty-box">
|
||||
<image :src="$util.img('public/uniapp/member/account/empty.png')" mode="widthFix"></image>
|
||||
<view class="tips">暂无账户信息,请添加</view>
|
||||
<button type="primary" class="add-account" @click="editAccount('add')">{{ $lang('newAddAccount') }}</button>
|
||||
<button type="primary" class="add-account" @click="editAccount('add')">{{ $lang('newAddAccount')
|
||||
}}</button>
|
||||
</view>
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
@@ -62,404 +67,399 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MescrollUni,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
nsEmpty,
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
// #endif
|
||||
export default {
|
||||
components: {
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: [], //账号列表
|
||||
back: '', // 返回页
|
||||
redirect: 'redirectTo', // 跳转方式
|
||||
type: 'member',
|
||||
payList: null
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.back) this.back = option.back;
|
||||
if (option.type) this.type = option.type;
|
||||
if (option.redirect) this.redirect = option.redirect;
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
this.getTransferType();
|
||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/account');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 编辑提现账户信息
|
||||
editAccount(type, id) {
|
||||
let data = {};
|
||||
data.type = this.type;
|
||||
if (type == 'edit') data.id = id;
|
||||
if (this.back) data.back = this.back;
|
||||
this.$util.redirectTo('/pages_tool/member/account_edit', data);
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: [], //账号列表
|
||||
back: '', // 返回页
|
||||
redirect: 'redirectTo', // 跳转方式
|
||||
type: 'member',
|
||||
payList: null
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.back) this.back = option.back;
|
||||
if (option.type) this.type = option.type;
|
||||
if (option.redirect) this.redirect = option.redirect;
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
this.getTransferType();
|
||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/account');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 编辑提现账户信息
|
||||
editAccount(type, id) {
|
||||
let data = {};
|
||||
data.type = this.type;
|
||||
if (type == 'edit') data.id = id;
|
||||
if (this.back) data.back = this.back;
|
||||
this.$util.redirectTo('/pages_tool/member/account_edit', data);
|
||||
},
|
||||
deleteAccount(id) {
|
||||
uni.showModal({
|
||||
title: '操作提示',
|
||||
content: '确定要删除该账户吗?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/delete',
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: result => {
|
||||
if (result.code == 0) {
|
||||
this.$util.showToast({
|
||||
title: '删除成功'
|
||||
});
|
||||
this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '删除失败'
|
||||
});
|
||||
}
|
||||
deleteAccount(id) {
|
||||
uni.showModal({
|
||||
title: '操作提示',
|
||||
content: '确定要删除该账户吗?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/delete',
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: result => {
|
||||
if (result.code == 0) {
|
||||
this.$util.showToast({
|
||||
title: '删除成功'
|
||||
});
|
||||
this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '删除失败'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
setDefault(id, is_default) {
|
||||
if (is_default == 1) return;
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/setdefault',
|
||||
data: {
|
||||
id
|
||||
},
|
||||
success: res => {
|
||||
if (res.data >= 0) {
|
||||
if (this.back != '') {
|
||||
this.$util.redirectTo(this.back, {}, this.redirect);
|
||||
} else {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.show();
|
||||
this.dataList = [];
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
setBalanceDefault() {
|
||||
this.$util.redirectTo(this.back, {
|
||||
'is_balance': 1
|
||||
}, this.redirect);
|
||||
},
|
||||
getData(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num
|
||||
},
|
||||
success: res => {
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.dataList = []; //如果是第一页需手动制空列表
|
||||
this.dataList = this.dataList.concat(newArr); //追加新数据
|
||||
|
||||
let withdrawType = {
|
||||
bank: '银行',
|
||||
alipay: '支付宝',
|
||||
wechatpay: '微信'
|
||||
};
|
||||
|
||||
this.dataList.forEach(item => {
|
||||
item.withdraw_type_name = withdrawType[item.withdraw_type] ? withdrawType[
|
||||
item.withdraw_type] : '';
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
getTransferType() {
|
||||
let url = this.type == "member" ? "/api/memberwithdraw/transferType" :
|
||||
"/fenxiao/api/withdraw/transferType";
|
||||
this.$api.sendRequest({
|
||||
url: url,
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.payList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
});
|
||||
},
|
||||
setDefault(id, is_default) {
|
||||
if (is_default == 1) return;
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/setdefault',
|
||||
data: {
|
||||
id
|
||||
},
|
||||
success: res => {
|
||||
if (res.data >= 0) {
|
||||
if (this.back != '') {
|
||||
this.$util.redirectTo(this.back, {}, this.redirect);
|
||||
} else {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.show();
|
||||
this.dataList = [];
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
setBalanceDefault() {
|
||||
this.$util.redirectTo(this.back, {
|
||||
'is_balance': 1
|
||||
}, this.redirect);
|
||||
},
|
||||
getData(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num
|
||||
},
|
||||
success: res => {
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.dataList = []; //如果是第一页需手动制空列表
|
||||
this.dataList = this.dataList.concat(newArr); //追加新数据
|
||||
|
||||
let withdrawType = {
|
||||
bank: '银行',
|
||||
alipay: '支付宝',
|
||||
wechatpay: '微信'
|
||||
};
|
||||
|
||||
this.dataList.forEach(item => {
|
||||
item.withdraw_type_name = withdrawType[item.withdraw_type] ? withdrawType[
|
||||
item.withdraw_type] : '';
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
getTransferType() {
|
||||
let url = this.type == "member" ? "/api/memberwithdraw/transferType" :
|
||||
"/fenxiao/api/withdraw/transferType";
|
||||
this.$api.sendRequest({
|
||||
url: url,
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.payList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function (nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.empty-box {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.empty-box {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
image {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.tips {
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.get-account,
|
||||
.add-account {
|
||||
width: 50%;
|
||||
height: 78rpx;
|
||||
line-height: 78rpx;
|
||||
border-radius: 78rpx;
|
||||
margin-top: 50rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.get-account {
|
||||
width: 50%;
|
||||
background: #fff;
|
||||
color: $base-color;
|
||||
border: 2rpx solid $base-color;
|
||||
margin-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
image {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.mescroll-downwarp+.empty-box {
|
||||
height: calc(100vh - 260rpx);
|
||||
.tips {
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.get-account,
|
||||
.add-account {
|
||||
width: 50%;
|
||||
height: 78rpx;
|
||||
line-height: 78rpx;
|
||||
border-radius: 78rpx;
|
||||
margin-top: 50rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
margin-top: 60rpx;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
.get-account {
|
||||
width: 50%;
|
||||
background: #fff;
|
||||
position: fixed;
|
||||
padding: 0 30rpx;
|
||||
color: $base-color;
|
||||
border: 2rpx solid $base-color;
|
||||
margin-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
.add-account {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
margin: 30rpx 0 30rpx;
|
||||
font-size: $font-size-toolbar;
|
||||
.mescroll-downwarp+.empty-box {
|
||||
height: calc(100vh - 260rpx);
|
||||
}
|
||||
|
||||
text {
|
||||
margin-right: 10rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
margin-top: 60rpx;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
position: fixed;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
z-index: 10;
|
||||
|
||||
.add-account {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
margin: 30rpx 0 30rpx;
|
||||
font-size: $font-size-toolbar;
|
||||
|
||||
text {
|
||||
margin-right: 10rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zw {
|
||||
margin-top: 250rpx;
|
||||
}
|
||||
.zw {
|
||||
margin-top: 250rpx;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 0;
|
||||
padding: 24rpx $margin-both;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
margin-bottom: 18rpx;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
&.balance-item {
|
||||
.item-top {
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
margin-top: 18rpx;
|
||||
}
|
||||
|
||||
.item-mr {
|
||||
font-size: $font-size-activity-tag;
|
||||
color: #fff;
|
||||
height: 150rpx;
|
||||
width: 150rpx;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
right: -90rpx;
|
||||
top: -90rpx;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.list-item {
|
||||
margin: 0 0;
|
||||
padding: 24rpx $margin-both;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
margin-bottom: 18rpx;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
&.balance-item {
|
||||
.item-top {
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
padding-bottom: 26rpx;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
margin-top: 18rpx;
|
||||
}
|
||||
|
||||
.item-mr {
|
||||
font-size: $font-size-activity-tag;
|
||||
color: #fff;
|
||||
height: 150rpx;
|
||||
width: 150rpx;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
right: -90rpx;
|
||||
top: -90rpx;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.item-top {
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
padding-bottom: 26rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.item-left {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-direction: column;
|
||||
width: calc(100% - 100rpx);
|
||||
|
||||
.item-left {
|
||||
.title-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: calc(100% - 100rpx);
|
||||
|
||||
.title-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
display: flex;
|
||||
|
||||
.top-title {
|
||||
font-size: 26rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.top-num {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content-bottom {
|
||||
.top-title {
|
||||
font-size: 26rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.top-num {
|
||||
font-size: 26rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item-btn {
|
||||
width: 100rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
justify-content: flex-end;
|
||||
.content-bottom {
|
||||
font-size: 26rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.item-bottom {
|
||||
.item-btn {
|
||||
width: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-top: 24rpx;
|
||||
align-items: center;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.account-default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.item-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-top: 24rpx;
|
||||
|
||||
.account-default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
line-height: 1;
|
||||
color: #666666;
|
||||
|
||||
.default {}
|
||||
|
||||
.iconfont {
|
||||
line-height: 1;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.default {}
|
||||
.account-btn {
|
||||
font-size: $font-size-base;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.iconfont {
|
||||
line-height: 1;
|
||||
.edit {
|
||||
text {
|
||||
vertical-align: center;
|
||||
margin-right: 10rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.account-btn {
|
||||
font-size: $font-size-base;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
.delete {
|
||||
background: #F1F1F1;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
padding: 10rpx;
|
||||
text-align: center;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.edit {
|
||||
text {
|
||||
vertical-align: center;
|
||||
margin-right: 10rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.delete {
|
||||
background: #F1F1F1;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
padding: 10rpx;
|
||||
text-align: center;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
/deep/ .mescroll-upwarp {
|
||||
padding-bottom: 150rpx;
|
||||
}
|
||||
/deep/ .mescroll-upwarp {
|
||||
padding-bottom: 150rpx;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.item-bottom>>>.uni-switch-wrapper .uni-switch-input {
|
||||
height: 48rpx !important;
|
||||
width: 88rpx !important;
|
||||
}
|
||||
.item-bottom>>>.uni-switch-wrapper .uni-switch-input {
|
||||
height: 48rpx !important;
|
||||
width: 88rpx !important;
|
||||
}
|
||||
|
||||
.item-bottom>>>.uni-switch-wrapper .uni-switch-input:after {
|
||||
height: 44rpx !important;
|
||||
width: 44rpx !important;
|
||||
}
|
||||
.item-bottom>>>.uni-switch-wrapper .uni-switch-input:after {
|
||||
height: 44rpx !important;
|
||||
width: 44rpx !important;
|
||||
}
|
||||
|
||||
.item-bottom>>>.uni-switch-wrapper .uni-switch-input:before {
|
||||
background-color: #EDEDED !important;
|
||||
height: 44rpx !important;
|
||||
width: 90rpx !important;
|
||||
}
|
||||
.item-bottom>>>.uni-switch-wrapper .uni-switch-input:before {
|
||||
background-color: #EDEDED !important;
|
||||
height: 44rpx !important;
|
||||
width: 90rpx !important;
|
||||
}
|
||||
</style>
|
||||
@@ -2,7 +2,8 @@
|
||||
<view class="account-list-content" :style="themeColor">
|
||||
<view class="edit-item">
|
||||
<text class="tit">{{ $lang('name') }}</text>
|
||||
<input class="desc uni-input" type="text" maxlength="30" placeholder="请输入真实姓名" name="name" v-model="formData.realname" />
|
||||
<input class="desc uni-input" type="text" maxlength="30" placeholder="请输入真实姓名" name="name"
|
||||
v-model="formData.realname" />
|
||||
</view>
|
||||
<view class="edit-item">
|
||||
<text class="tit">{{ $lang('mobilePhone') }}</text>
|
||||
@@ -17,11 +18,13 @@
|
||||
</view>
|
||||
<view class="edit-item" v-if="formData.withdraw_type == 'bank'">
|
||||
<text class="tit">银行名称</text>
|
||||
<input class="desc uni-input" type="text" maxlength="50" placeholder="请输入银行名称" v-model.trim="formData.branch_bank_name" />
|
||||
<input class="desc uni-input" type="text" maxlength="50" placeholder="请输入银行名称"
|
||||
v-model.trim="formData.branch_bank_name" />
|
||||
</view>
|
||||
<view class="edit-item" v-if="formData.withdraw_type != 'wechatpay'">
|
||||
<text class="tit">提现账号</text>
|
||||
<input class="desc uni-input" type="text" maxlength="30" placeholder="请输入提现账号" v-model.trim="formData.bank_account" />
|
||||
<input class="desc uni-input" type="text" maxlength="30" placeholder="请输入提现账号"
|
||||
v-model.trim="formData.bank_account" />
|
||||
</view>
|
||||
<view class="btn">
|
||||
<button type="primary" class="add" @click="saveAccount">{{ $lang('save') }}</button>
|
||||
@@ -33,6 +36,9 @@
|
||||
<script>
|
||||
import validate from 'common/js/validate.js';
|
||||
export default {
|
||||
components: {
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
@@ -294,7 +300,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.account-list-content > .edit-item + .edit-item {
|
||||
.account-list-content>.edit-item+.edit-item {
|
||||
border-top: 2rpx solid $color-line;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,26 +97,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
Weixin
|
||||
} from 'common/js/wx-jssdk.js';
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
import { Weixin } from 'common/js/wx-jssdk.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MescrollUni,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
nsEmpty,
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -7,31 +7,21 @@
|
||||
{{ $lang('consignee') }}
|
||||
<text>*</text>
|
||||
</text>
|
||||
<input
|
||||
class="uni-input"
|
||||
type="text"
|
||||
placeholder-class="placeholder-class"
|
||||
:placeholder="$lang('consigneePlaceholder')"
|
||||
maxlength="30"
|
||||
name="name"
|
||||
v-model="formData.name" />
|
||||
<input class="uni-input" type="text" placeholder-class="placeholder-class"
|
||||
:placeholder="$lang('consigneePlaceholder')" maxlength="30" name="name" v-model="formData.name" />
|
||||
</view>
|
||||
<view class="edit-item">
|
||||
<text class="tit">
|
||||
{{ $lang('mobile') }}
|
||||
<text>*</text>
|
||||
</text>
|
||||
<input class="uni-input" type="number" placeholder-class="placeholder-class" :placeholder="$lang('mobilePlaceholder')" maxlength="11" v-model="formData.mobile" />
|
||||
<input class="uni-input" type="number" placeholder-class="placeholder-class"
|
||||
:placeholder="$lang('mobilePlaceholder')" maxlength="11" v-model="formData.mobile" />
|
||||
</view>
|
||||
<view class="edit-item">
|
||||
<text class="tit">{{ $lang('telephone') }}</text>
|
||||
<input
|
||||
class="uni-input"
|
||||
type="text"
|
||||
placeholder-class="placeholder-class"
|
||||
:placeholder="$lang('telephonePlaceholder')"
|
||||
maxlength="20"
|
||||
v-model="formData.telephone" />
|
||||
<input class="uni-input" type="text" placeholder-class="placeholder-class"
|
||||
:placeholder="$lang('telephonePlaceholder')" maxlength="20" v-model="formData.telephone" />
|
||||
</view>
|
||||
<!-- 外卖地址区分 -->
|
||||
<block v-if="localType == 2">
|
||||
@@ -40,7 +30,9 @@
|
||||
{{ $lang('receivingCity') }}
|
||||
<text>*</text>
|
||||
</text>
|
||||
<view class="text_inp" :class="{ empty: !formData.full_address, 'color-tip': !formData.full_address }" @click="selectAddress">
|
||||
<view class="text_inp"
|
||||
:class="{ empty: !formData.full_address, 'color-tip': !formData.full_address }"
|
||||
@click="selectAddress">
|
||||
{{ formData.full_address ? formData.full_address : '请选择省市区县' }}
|
||||
</view>
|
||||
|
||||
@@ -54,7 +46,8 @@
|
||||
<text>*</text>
|
||||
</text>
|
||||
<pick-regions :default-regions="defaultRegions" @getRegions="handleGetRegions">
|
||||
<text class="select-address " :class="{ empty: !formData.full_address, 'color-tip': !formData.full_address }">
|
||||
<text class="select-address "
|
||||
:class="{ empty: !formData.full_address, 'color-tip': !formData.full_address }">
|
||||
{{ formData.full_address ? formData.full_address : '请选择省市区县' }}
|
||||
</text>
|
||||
</pick-regions>
|
||||
@@ -66,7 +59,8 @@
|
||||
{{ $lang('address') }}
|
||||
<text>*</text>
|
||||
</text>
|
||||
<input class="uni-input" type="text" placeholder-class="placeholder-class" :placeholder="$lang('addressPlaceholder')" maxlength="50" v-model="formData.address" />
|
||||
<input class="uni-input" type="text" placeholder-class="placeholder-class"
|
||||
:placeholder="$lang('addressPlaceholder')" maxlength="50" v-model="formData.address" />
|
||||
<!-- <textarea class="uni-input " type="text" placeholder-class="placeholder-class" :placeholder="$lang('addressPlaceholder')" maxlength="50" v-model="formData.address" ></textarea> -->
|
||||
</view>
|
||||
</view>
|
||||
@@ -79,423 +73,424 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pickRegions from '@/components/pick-regions/pick-regions.vue';
|
||||
import validate from 'common/js/validate.js';
|
||||
import Config from '@/common/js/config.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
pickRegions
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
id: 0,
|
||||
name: '',
|
||||
mobile: '',
|
||||
telephone: '',
|
||||
province_id: '',
|
||||
city_id: '',
|
||||
district_id: '',
|
||||
community_id: '',
|
||||
address: '',
|
||||
full_address: '',
|
||||
latitude: 0,
|
||||
longitude: 0,
|
||||
is_default: 1
|
||||
},
|
||||
import validate from 'common/js/validate.js';
|
||||
import Config from '@/common/js/config.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
pickRegions: () => import('@/components/pick-regions/pick-regions.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
id: 0,
|
||||
name: '',
|
||||
mobile: '',
|
||||
telephone: '',
|
||||
province_id: '',
|
||||
city_id: '',
|
||||
district_id: '',
|
||||
community_id: '',
|
||||
address: '',
|
||||
addressValue: '',
|
||||
back: '', // 返回页
|
||||
redirect: 'redirectTo', // 跳转方式
|
||||
flag: false, //防重复标识
|
||||
defaultRegions: [],
|
||||
localType: 1
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.back) this.back = option.back;
|
||||
if (option.redirect) this.redirect = option.redirect;
|
||||
if (option.type) this.localType = option.type;
|
||||
if (option.id && !option.name) {
|
||||
this.formData.id = option.id;
|
||||
this.getAddressDetail();
|
||||
} else if (option.name) {
|
||||
if (uni.getStorageSync('addressInfo')) this.formData = uni.getStorageSync('addressInfo');
|
||||
this.formData.address = option.name;
|
||||
this.localType = 2;
|
||||
this.getAddress(option.latng);
|
||||
//给formData复制
|
||||
var tempArr = this.getQueryVariable('latng').split(',');
|
||||
this.formData.latitude = tempArr[0];
|
||||
this.formData.longitude = tempArr[1];
|
||||
} else {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
},
|
||||
onBackPress() {
|
||||
uni.setStorageSync('addressInfo', '');
|
||||
},
|
||||
onShow() {
|
||||
if (this.formData.id) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '编辑收货地址'
|
||||
});
|
||||
} else {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '新增收货地址'
|
||||
});
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.loadingCover.hide();
|
||||
},
|
||||
onHide() {
|
||||
this.flag = false;
|
||||
},
|
||||
methods: {
|
||||
// 获取地址信息
|
||||
getAddressDetail() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/info',
|
||||
data: {
|
||||
id: this.formData.id
|
||||
},
|
||||
success: res => {
|
||||
let data = res.data;
|
||||
if (data != null) {
|
||||
this.formData.name = data.name;
|
||||
this.formData.mobile = data.mobile;
|
||||
this.formData.telephone = data.telephone;
|
||||
this.formData.address = data.address;
|
||||
this.formData.full_address = data.full_address;
|
||||
this.formData.latitude = data.latitude;
|
||||
this.formData.longitude = data.longitude;
|
||||
this.formData.is_default = data.is_default;
|
||||
this.localType = data.type;
|
||||
this.defaultRegions = [data.province_id, data.city_id, data.district_id];
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
full_address: '',
|
||||
latitude: 0,
|
||||
longitude: 0,
|
||||
is_default: 1
|
||||
},
|
||||
address: '',
|
||||
addressValue: '',
|
||||
back: '', // 返回页
|
||||
redirect: 'redirectTo', // 跳转方式
|
||||
flag: false, //防重复标识
|
||||
defaultRegions: [],
|
||||
localType: 1
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.back) this.back = option.back;
|
||||
if (option.redirect) this.redirect = option.redirect;
|
||||
if (option.type) this.localType = option.type;
|
||||
if (option.id && !option.name) {
|
||||
this.formData.id = option.id;
|
||||
this.getAddressDetail();
|
||||
} else if (option.name) {
|
||||
if (uni.getStorageSync('addressInfo')) this.formData = uni.getStorageSync('addressInfo');
|
||||
this.formData.address = option.name;
|
||||
this.localType = 2;
|
||||
this.getAddress(option.latng);
|
||||
//给formData复制
|
||||
var tempArr = this.getQueryVariable('latng').split(',');
|
||||
this.formData.latitude = tempArr[0];
|
||||
this.formData.longitude = tempArr[1];
|
||||
} else {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
},
|
||||
onBackPress() {
|
||||
uni.setStorageSync('addressInfo', '');
|
||||
},
|
||||
onShow() {
|
||||
if (this.formData.id) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '编辑收货地址'
|
||||
});
|
||||
} else {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '新增收货地址'
|
||||
});
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.loadingCover.hide();
|
||||
},
|
||||
onHide() {
|
||||
this.flag = false;
|
||||
},
|
||||
methods: {
|
||||
// 获取地址信息
|
||||
getAddressDetail() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/info',
|
||||
data: {
|
||||
id: this.formData.id
|
||||
},
|
||||
success: res => {
|
||||
let data = res.data;
|
||||
if (data != null) {
|
||||
this.formData.name = data.name;
|
||||
this.formData.mobile = data.mobile;
|
||||
this.formData.telephone = data.telephone;
|
||||
this.formData.address = data.address;
|
||||
this.formData.full_address = data.full_address;
|
||||
this.formData.latitude = data.latitude;
|
||||
this.formData.longitude = data.longitude;
|
||||
this.formData.is_default = data.is_default;
|
||||
this.localType = data.type;
|
||||
this.defaultRegions = [data.province_id, data.city_id, data.district_id];
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取详细地址
|
||||
getAddress(value) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/tranAddressInfo',
|
||||
data: {
|
||||
latlng: value
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.formData.full_address = '';
|
||||
this.formData.full_address += res.data.province != undefined ? res.data.province : '';
|
||||
this.formData.full_address += res.data.city != undefined ? '-' + res.data.city : '';
|
||||
this.formData.full_address += res.data.district != undefined ? '-' + res.data.district : '';
|
||||
this.addressValue = '';
|
||||
this.addressValue += res.data.province_id != undefined ? res.data.province_id : '';
|
||||
this.addressValue += res.data.city_id != undefined ? '-' + res.data.city_id : '';
|
||||
this.addressValue += res.data.district_id != undefined ? '-' + res.data.district_id : '';
|
||||
} else {
|
||||
this.showToast({
|
||||
title: '数据有误'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取选择的地区
|
||||
handleGetRegions(regions) {
|
||||
this.formData.full_address = '';
|
||||
this.formData.full_address += regions[0] != undefined ? regions[0].label : '';
|
||||
this.formData.full_address += regions[1] != undefined ? '-' + regions[1].label : '';
|
||||
this.formData.full_address += regions[2] != undefined ? '-' + regions[2].label : '';
|
||||
this.addressValue = '';
|
||||
this.addressValue += regions[0] != undefined ? regions[0].value : '';
|
||||
this.addressValue += regions[1] != undefined ? '-' + regions[1].value : '';
|
||||
this.addressValue += regions[2] != undefined ? '-' + regions[2].value : '';
|
||||
},
|
||||
|
||||
selectAddress() {
|
||||
// #ifdef MP
|
||||
/* uni.chooseLocation({
|
||||
success: res => {
|
||||
this.formData.latitude = res.latitude;
|
||||
this.formData.longitude = res.longitude;
|
||||
this.formData.address = res.name;
|
||||
this.getAddress(res.latitude + ',' + res.longitude);
|
||||
},
|
||||
fail(res) {
|
||||
uni.getSetting({
|
||||
success: function(res) {
|
||||
var statu = res.authSetting;
|
||||
if (!statu['scope.userLocation']) {
|
||||
uni.showModal({
|
||||
title: '是否授权当前位置',
|
||||
content: '需要获取您的地理位置,请确认授权,否则地图功能将无法使用',
|
||||
success(tip) {
|
||||
if (tip.confirm) {
|
||||
uni.openSetting({
|
||||
success: function (data) {
|
||||
if (data.authSetting['scope.userLocation'] === true) {
|
||||
this.$util.showToast({
|
||||
title: '授权成功'
|
||||
});
|
||||
//授权成功之后,再调用chooseLocation选择地方
|
||||
setTimeout(function () {
|
||||
uni.chooseLocation({
|
||||
success: data => {
|
||||
this.formData.latitude = res.latitude;
|
||||
this.formData.longitude = res.longitude;
|
||||
this.formData.address = res.name;
|
||||
this.getAddress(res.latitude + ',' + res.longitude);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '授权失败'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取详细地址
|
||||
getAddress(value) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/tranAddressInfo',
|
||||
data: {
|
||||
latlng: value
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.formData.full_address = '';
|
||||
this.formData.full_address += res.data.province != undefined ? res.data.province : '';
|
||||
this.formData.full_address += res.data.city != undefined ? '-' + res.data.city : '';
|
||||
this.formData.full_address += res.data.district != undefined ? '-' + res.data.district : '';
|
||||
this.addressValue = '';
|
||||
this.addressValue += res.data.province_id != undefined ? res.data.province_id : '';
|
||||
this.addressValue += res.data.city_id != undefined ? '-' + res.data.city_id : '';
|
||||
this.addressValue += res.data.district_id != undefined ? '-' + res.data.district_id : '';
|
||||
} else {
|
||||
this.showToast({
|
||||
title: '数据有误'
|
||||
});
|
||||
}
|
||||
});*/
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
var urlencode = this.formData;
|
||||
uni.setStorageSync('addressInfo', urlencode);
|
||||
let backurl = Config.h5Domain + '/pages_tool/member/address_edit?type=' + this.localType;
|
||||
if (this.formData.id) backurl += '&id=' + this.formData.id;
|
||||
if (this.back) backurl += '&back=' + this.back;
|
||||
|
||||
window.location.href = 'https://apis.map.qq.com/tools/locpicker?search=1&type=0&backurl=' + encodeURIComponent(backurl) + '&key=' + Config.mpKey + '&referer=myapp';
|
||||
// #endif
|
||||
},
|
||||
|
||||
getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split('&');
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split('=');
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取选择的地区
|
||||
handleGetRegions(regions) {
|
||||
this.formData.full_address = '';
|
||||
this.formData.full_address += regions[0] != undefined ? regions[0].label : '';
|
||||
this.formData.full_address += regions[1] != undefined ? '-' + regions[1].label : '';
|
||||
this.formData.full_address += regions[2] != undefined ? '-' + regions[2].label : '';
|
||||
this.addressValue = '';
|
||||
this.addressValue += regions[0] != undefined ? regions[0].value : '';
|
||||
this.addressValue += regions[1] != undefined ? '-' + regions[1].value : '';
|
||||
this.addressValue += regions[2] != undefined ? '-' + regions[2].value : '';
|
||||
},
|
||||
|
||||
selectAddress() {
|
||||
// #ifdef MP
|
||||
/* uni.chooseLocation({
|
||||
success: res => {
|
||||
this.formData.latitude = res.latitude;
|
||||
this.formData.longitude = res.longitude;
|
||||
this.formData.address = res.name;
|
||||
this.getAddress(res.latitude + ',' + res.longitude);
|
||||
},
|
||||
fail(res) {
|
||||
uni.getSetting({
|
||||
success: function(res) {
|
||||
var statu = res.authSetting;
|
||||
if (!statu['scope.userLocation']) {
|
||||
uni.showModal({
|
||||
title: '是否授权当前位置',
|
||||
content: '需要获取您的地理位置,请确认授权,否则地图功能将无法使用',
|
||||
success(tip) {
|
||||
if (tip.confirm) {
|
||||
uni.openSetting({
|
||||
success: function (data) {
|
||||
if (data.authSetting['scope.userLocation'] === true) {
|
||||
this.$util.showToast({
|
||||
title: '授权成功'
|
||||
});
|
||||
//授权成功之后,再调用chooseLocation选择地方
|
||||
setTimeout(function () {
|
||||
uni.chooseLocation({
|
||||
success: data => {
|
||||
this.formData.latitude = res.latitude;
|
||||
this.formData.longitude = res.longitude;
|
||||
this.formData.address = res.name;
|
||||
this.getAddress(res.latitude + ',' + res.longitude);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '授权失败'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});*/
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
var urlencode = this.formData;
|
||||
uni.setStorageSync('addressInfo', urlencode);
|
||||
let backurl = Config.h5Domain + '/pages_tool/member/address_edit?type=' + this.localType;
|
||||
if (this.formData.id) backurl += '&id=' + this.formData.id;
|
||||
if (this.back) backurl += '&back=' + this.back;
|
||||
|
||||
window.location.href = 'https://apis.map.qq.com/tools/locpicker?search=1&type=0&backurl=' + encodeURIComponent(backurl) + '&key=' + Config.mpKey + '&referer=myapp';
|
||||
// #endif
|
||||
},
|
||||
|
||||
getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split('&');
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split('=');
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
vertify() {
|
||||
this.formData.name = this.formData.name.trim();
|
||||
this.formData.mobile = this.formData.mobile.trim();
|
||||
this.formData.address = this.formData.address.trim();
|
||||
var rule = [{
|
||||
name: 'name',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入姓名'
|
||||
},
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入手机号'
|
||||
},
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'phoneno',
|
||||
errorMsg: '请输入正确的手机号'
|
||||
},
|
||||
{
|
||||
name: 'full_address',
|
||||
checkType: 'required',
|
||||
errorMsg: '请选择省市区县'
|
||||
},
|
||||
{
|
||||
name: 'address',
|
||||
checkType: 'required',
|
||||
errorMsg: '详细地址不能为空'
|
||||
}
|
||||
];
|
||||
var checkRes = validate.check(this.formData, rule);
|
||||
if (checkRes) {
|
||||
return true;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: validate.error
|
||||
});
|
||||
this.flag = false;
|
||||
return false;
|
||||
},
|
||||
vertify() {
|
||||
this.formData.name = this.formData.name.trim();
|
||||
this.formData.mobile = this.formData.mobile.trim();
|
||||
this.formData.address = this.formData.address.trim();
|
||||
var rule = [{
|
||||
name: 'name',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入姓名'
|
||||
},
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入手机号'
|
||||
},
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'phoneno',
|
||||
errorMsg: '请输入正确的手机号'
|
||||
},
|
||||
{
|
||||
name: 'full_address',
|
||||
checkType: 'required',
|
||||
errorMsg: '请选择省市区县'
|
||||
},
|
||||
{
|
||||
name: 'address',
|
||||
checkType: 'required',
|
||||
errorMsg: '详细地址不能为空'
|
||||
}
|
||||
];
|
||||
var checkRes = validate.check(this.formData, rule);
|
||||
if (checkRes) {
|
||||
return true;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: validate.error
|
||||
});
|
||||
this.flag = false;
|
||||
return false;
|
||||
}
|
||||
},
|
||||
saveAddress() {
|
||||
if (this.flag) return;
|
||||
this.flag = true;
|
||||
if (this.vertify()) {
|
||||
let addressValueArr = this.addressValue.split('-'),
|
||||
data = {},
|
||||
url = '';
|
||||
|
||||
data = {
|
||||
name: this.formData.name,
|
||||
mobile: this.formData.mobile,
|
||||
telephone: this.formData.telephone,
|
||||
province_id: addressValueArr[0],
|
||||
city_id: addressValueArr[1],
|
||||
district_id: addressValueArr[2] ? addressValueArr[2] : '',
|
||||
community_id: 0,
|
||||
address: this.formData.address,
|
||||
full_address: this.formData.full_address,
|
||||
latitude: this.formData.latitude,
|
||||
longitude: this.formData.longitude,
|
||||
is_default: this.formData.is_default,
|
||||
type: this.localType
|
||||
};
|
||||
|
||||
url = 'add';
|
||||
if (this.formData.id) {
|
||||
url = 'edit';
|
||||
data.id = this.formData.id;
|
||||
if (this.back != '') data.is_default = 1;
|
||||
}
|
||||
},
|
||||
saveAddress() {
|
||||
if (this.flag) return;
|
||||
this.flag = true;
|
||||
if (this.vertify()) {
|
||||
let addressValueArr = this.addressValue.split('-'),
|
||||
data = {},
|
||||
url = '';
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/' + url,
|
||||
data: data,
|
||||
success: res => {
|
||||
this.flag = false;
|
||||
|
||||
data = {
|
||||
name: this.formData.name,
|
||||
mobile: this.formData.mobile,
|
||||
telephone: this.formData.telephone,
|
||||
province_id: addressValueArr[0],
|
||||
city_id: addressValueArr[1],
|
||||
district_id: addressValueArr[2] ? addressValueArr[2] : '',
|
||||
community_id: 0,
|
||||
address: this.formData.address,
|
||||
full_address: this.formData.full_address,
|
||||
latitude: this.formData.latitude,
|
||||
longitude: this.formData.longitude,
|
||||
is_default: this.formData.is_default,
|
||||
type: this.localType
|
||||
};
|
||||
|
||||
url = 'add';
|
||||
if (this.formData.id) {
|
||||
url = 'edit';
|
||||
data.id = this.formData.id;
|
||||
if (this.back != '') data.is_default = 1;
|
||||
}
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/' + url,
|
||||
data: data,
|
||||
success: res => {
|
||||
this.flag = false;
|
||||
|
||||
if (res.code == 0) {
|
||||
if (this.back != '') {
|
||||
this.$util.redirectTo(this.back, {}, 'redirectTo');
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
uni.removeStorageSync('addressInfo');
|
||||
if (res.code == 0) {
|
||||
if (this.back != '') {
|
||||
this.$util.redirectTo(this.back, {}, 'redirectTo');
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.flag = false;
|
||||
uni.removeStorageSync('addressInfo');
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.flag = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ pick-regions,
|
||||
.pick-regions {
|
||||
/deep/ pick-regions,
|
||||
.pick-regions {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.edit-wrap {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
|
||||
.tip {
|
||||
padding: 20rpx 30rpx 10rpx;
|
||||
background-color: #f8f8f8;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 30rpx;
|
||||
min-height: 100rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.text_inp {
|
||||
margin-left: $margin-updown;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.edit-wrap {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
.tit {
|
||||
width: 148rpx;
|
||||
|
||||
.tip {
|
||||
padding: 20rpx 30rpx 10rpx;
|
||||
background-color: #f8f8f8;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 30rpx;
|
||||
min-height: 100rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.text_inp {
|
||||
margin-left: $margin-updown;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.tit {
|
||||
width: 148rpx;
|
||||
|
||||
text {
|
||||
margin-left: 10rpx;
|
||||
color: #ff4544;
|
||||
}
|
||||
|
||||
&.margin_tit {
|
||||
align-self: flex-start;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-location {
|
||||
color: #606266;
|
||||
align-self: flex-start;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.select-address {
|
||||
display: block;
|
||||
text {
|
||||
margin-left: 10rpx;
|
||||
|
||||
&.empty {
|
||||
color: #808080;
|
||||
}
|
||||
color: #ff4544;
|
||||
}
|
||||
|
||||
textarea,
|
||||
input {
|
||||
flex: 1;
|
||||
font-size: $font-size-base;
|
||||
margin-left: 20rpx;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
textarea {
|
||||
margin-top: 6rpx;
|
||||
height: 100rpx;
|
||||
padding-bottom: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
line-height: 50rpx;
|
||||
&.margin_tit {
|
||||
align-self: flex-start;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-wrap>.edit-item+.edit-item {
|
||||
border-top: 2rpx solid #ebedf0;
|
||||
.icon-location {
|
||||
color: #606266;
|
||||
align-self: flex-start;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.add {
|
||||
margin-top: 60rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx !important;
|
||||
border-radius: 80rpx;
|
||||
font-weight: 500;
|
||||
width: calc(100% - 60rpx);
|
||||
margin-left: 30rpx;
|
||||
font-size: 32rpx;
|
||||
.select-address {
|
||||
display: block;
|
||||
margin-left: 10rpx;
|
||||
|
||||
&.empty {
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
bottom: 30rpx;
|
||||
height: auto;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
/*兼容 IOS<11.2*/
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
/*兼容 IOS>11.2*/
|
||||
textarea,
|
||||
input {
|
||||
flex: 1;
|
||||
font-size: $font-size-base;
|
||||
margin-left: 20rpx;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
textarea {
|
||||
margin-top: 6rpx;
|
||||
height: 100rpx;
|
||||
padding-bottom: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-wrap>.edit-item+.edit-item {
|
||||
border-top: 2rpx solid #ebedf0;
|
||||
}
|
||||
|
||||
.add {
|
||||
margin-top: 60rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx !important;
|
||||
border-radius: 80rpx;
|
||||
font-weight: 500;
|
||||
width: calc(100% - 60rpx);
|
||||
margin-left: 30rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
bottom: 30rpx;
|
||||
height: auto;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
/*兼容 IOS<11.2*/
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
/*兼容 IOS>11.2*/
|
||||
}
|
||||
</style>
|
||||
@@ -31,7 +31,8 @@
|
||||
</view>
|
||||
<view class="bootom">
|
||||
<view>
|
||||
<text class="color-tip">可提现余额:{{ $lang('common.currencySymbol') }}{{ withdrawInfo.member_info.balance_money | moneyFormat }}</text>
|
||||
<text class="color-tip">可提现余额:{{ $lang('common.currencySymbol') }}{{
|
||||
withdrawInfo.member_info.balance_money | moneyFormat }}</text>
|
||||
<text class="all-tx color-base-text" @click="allTx">全部提现</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -41,7 +42,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn color-base-border ns-gradient-otherpages-member-widthdrawal-withdrawal" :class="{ disabled: withdrawMoney == '' || withdrawMoney == 0 }" @click="withdraw">
|
||||
<view class="btn color-base-border ns-gradient-otherpages-member-widthdrawal-withdrawal"
|
||||
:class="{ disabled: withdrawMoney == '' || withdrawMoney == 0 }" @click="withdraw">
|
||||
提现
|
||||
</view>
|
||||
|
||||
@@ -53,163 +55,130 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
withdrawInfo: {
|
||||
config: {
|
||||
is_use: 0,
|
||||
min: 1,
|
||||
rate: 0
|
||||
},
|
||||
member_info: {
|
||||
balance_money: 0,
|
||||
balance_withdraw: 0,
|
||||
balance_withdraw_apply: 0
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
withdrawInfo: {
|
||||
config: {
|
||||
is_use: 0,
|
||||
min: 1,
|
||||
rate: 0
|
||||
},
|
||||
bankAccountInfo: {},
|
||||
withdrawMoney: '',
|
||||
isSub: false
|
||||
};
|
||||
member_info: {
|
||||
balance_money: 0,
|
||||
balance_withdraw: 0,
|
||||
balance_withdraw_apply: 0
|
||||
}
|
||||
},
|
||||
bankAccountInfo: {},
|
||||
withdrawMoney: '',
|
||||
isSub: false
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
this.getWithdrawInfo();
|
||||
this.getBankAccountInfo();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/login/login', {
|
||||
back: '/pages_tool/member/apply_withdrawal'
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toWithdrawal() {
|
||||
this.$util.redirectTo('/pages_tool/member/withdrawal');
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
this.getWithdrawInfo();
|
||||
this.getBankAccountInfo();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/login/login', {
|
||||
back: '/pages_tool/member/apply_withdrawal'
|
||||
//全部提现
|
||||
allTx() {
|
||||
this.withdrawMoney = this.withdrawInfo.member_info.balance_money;
|
||||
},
|
||||
// 删除提现金额
|
||||
remove() {
|
||||
this.withdrawMoney = '';
|
||||
},
|
||||
/**
|
||||
* 获取提现信息
|
||||
*/
|
||||
getWithdrawInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberwithdraw/info',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.withdrawInfo = res.data;
|
||||
if (this.withdrawInfo.config.is_use == 0) {
|
||||
this.$util.showToast({
|
||||
title: '未开启提现'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
}, 1500);
|
||||
}
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 银行账号信息
|
||||
*/
|
||||
getBankAccountInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/defaultinfo',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.bankAccountInfo = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
verify() {
|
||||
if (this.withdrawMoney == '' || this.withdrawMoney == 0 || isNaN(parseFloat(this.withdrawMoney))) {
|
||||
this.$util.showToast({
|
||||
title: '请输入提现金额'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(this.withdrawMoney) > parseFloat(this.withdrawInfo.member_info.balance_money)) {
|
||||
this.$util.showToast({
|
||||
title: '提现金额超出可提现金额'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(this.withdrawMoney) < parseFloat(this.withdrawInfo.config.min)) {
|
||||
this.$util.showToast({
|
||||
title: '提现金额小于最低提现金额'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
methods: {
|
||||
toWithdrawal() {
|
||||
this.$util.redirectTo('/pages_tool/member/withdrawal');
|
||||
},
|
||||
//全部提现
|
||||
allTx() {
|
||||
this.withdrawMoney = this.withdrawInfo.member_info.balance_money;
|
||||
},
|
||||
// 删除提现金额
|
||||
remove() {
|
||||
this.withdrawMoney = '';
|
||||
},
|
||||
/**
|
||||
* 获取提现信息
|
||||
*/
|
||||
getWithdrawInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberwithdraw/info',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.withdrawInfo = res.data;
|
||||
if (this.withdrawInfo.config.is_use == 0) {
|
||||
this.$util.showToast({
|
||||
title: '未开启提现'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
}, 1500);
|
||||
}
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
withdraw() {
|
||||
if (!this.bankAccountInfo.withdraw_type) {
|
||||
this.$util.showToast({
|
||||
title: '请先添加提现方式'
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 银行账号信息
|
||||
*/
|
||||
getBankAccountInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/defaultinfo',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.bankAccountInfo = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
verify() {
|
||||
if (this.withdrawMoney == '' || this.withdrawMoney == 0 || isNaN(parseFloat(this.withdrawMoney))) {
|
||||
this.$util.showToast({
|
||||
title: '请输入提现金额'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(this.withdrawMoney) > parseFloat(this.withdrawInfo.member_info.balance_money)) {
|
||||
this.$util.showToast({
|
||||
title: '提现金额超出可提现金额'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(this.withdrawMoney) < parseFloat(this.withdrawInfo.config.min)) {
|
||||
this.$util.showToast({
|
||||
title: '提现金额小于最低提现金额'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
withdraw() {
|
||||
if (!this.bankAccountInfo.withdraw_type) {
|
||||
this.$util.showToast({
|
||||
title: '请先添加提现方式'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.verify()) {
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
|
||||
var applet_type = 0;
|
||||
if (this.bankAccountInfo.withdraw_type == 'wechatpay') {
|
||||
// #ifdef MP
|
||||
applet_type = 1;
|
||||
// #endif
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (this.verify()) {
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
|
||||
var applet_type = 0;
|
||||
if (this.bankAccountInfo.withdraw_type == 'wechatpay') {
|
||||
// #ifdef MP
|
||||
this.subscribeMessage(() => {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberwithdraw/apply',
|
||||
data: {
|
||||
apply_money: this.withdrawMoney,
|
||||
transfer_type: this.bankAccountInfo.withdraw_type, //转账提现类型
|
||||
realname: this.bankAccountInfo.realname,
|
||||
mobile: this.bankAccountInfo.mobile,
|
||||
bank_name: this.bankAccountInfo.branch_bank_name,
|
||||
account_number: this.bankAccountInfo.bank_account,
|
||||
applet_type: applet_type
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: '提现申请成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/member/withdrawal', {},
|
||||
'redirectTo');
|
||||
}, 1500);
|
||||
} else {
|
||||
this.isSub = false;
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.isSub = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
applet_type = 1;
|
||||
// #endif
|
||||
}
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
// #ifdef MP
|
||||
this.subscribeMessage(() => {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberwithdraw/apply',
|
||||
data: {
|
||||
@@ -227,7 +196,8 @@
|
||||
title: '提现申请成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/member/withdrawal', {},
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/member/withdrawal', {},
|
||||
'redirectTo');
|
||||
}, 1500);
|
||||
} else {
|
||||
@@ -241,185 +211,220 @@
|
||||
this.isSub = false;
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
goAccount() {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/member/account', {
|
||||
back: '/pages_tool/member/apply_withdrawal'
|
||||
},
|
||||
'redirectTo'
|
||||
);
|
||||
},
|
||||
/**
|
||||
* 微信订阅消息
|
||||
*/
|
||||
subscribeMessage(callback) {
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
this.$api.sendRequest({
|
||||
url: '/weapp/api/weapp/messagetmplids',
|
||||
url: '/api/memberwithdraw/apply',
|
||||
data: {
|
||||
keywords: 'USER_WITHDRAWAL_SUCCESS'
|
||||
apply_money: this.withdrawMoney,
|
||||
transfer_type: this.bankAccountInfo.withdraw_type, //转账提现类型
|
||||
realname: this.bankAccountInfo.realname,
|
||||
mobile: this.bankAccountInfo.mobile,
|
||||
bank_name: this.bankAccountInfo.branch_bank_name,
|
||||
account_number: this.bankAccountInfo.bank_account,
|
||||
applet_type: applet_type
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data.length) {
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: res.data,
|
||||
fail: res => {
|
||||
console.log('fail', res);
|
||||
},
|
||||
complete: () => {
|
||||
callback();
|
||||
}
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: '提现申请成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/member/withdrawal', {},
|
||||
'redirectTo');
|
||||
}, 1500);
|
||||
} else {
|
||||
callback();
|
||||
this.isSub = false;
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
callback();
|
||||
this.isSub = false;
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
};
|
||||
goAccount() {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/member/account', {
|
||||
back: '/pages_tool/member/apply_withdrawal'
|
||||
},
|
||||
'redirectTo'
|
||||
);
|
||||
},
|
||||
/**
|
||||
* 微信订阅消息
|
||||
*/
|
||||
subscribeMessage(callback) {
|
||||
this.$api.sendRequest({
|
||||
url: '/weapp/api/weapp/messagetmplids',
|
||||
data: {
|
||||
keywords: 'USER_WITHDRAWAL_SUCCESS'
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data.length) {
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: res.data,
|
||||
fail: res => {
|
||||
console.log('fail', res);
|
||||
},
|
||||
complete: () => {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: #fff;
|
||||
}
|
||||
.container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.empty-box {
|
||||
height: 20rpx;
|
||||
}
|
||||
.empty-box {
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.bank-account-wrap {
|
||||
margin: 0 20rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
border-bottom: 2rpx solid #f7f7f7;
|
||||
position: relative;
|
||||
.bank-account-wrap {
|
||||
margin: 0 20rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
border-bottom: 2rpx solid #f7f7f7;
|
||||
position: relative;
|
||||
|
||||
.tx-wrap {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.tx-wrap {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-right: 60rpx;
|
||||
|
||||
.tx-bank {
|
||||
margin-right: 60rpx;
|
||||
|
||||
.tx-bank {
|
||||
margin-right: 60rpx;
|
||||
flex: 1;
|
||||
margin-left: 10rpx;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tx-img {
|
||||
position: absolute;
|
||||
right: 100rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
flex: 1;
|
||||
margin-left: 10rpx;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
.tx-img {
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
right: 100rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
|
||||
.withdraw-wrap {
|
||||
margin: 0 20rpx;
|
||||
padding: 30rpx;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: rgba(110, 110, 110, 0.09) 0 0 20rpx 0;
|
||||
|
||||
.money-wrap {
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 2rpx solid #eee;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
|
||||
.unit {
|
||||
font-size: 60rpx;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.withdraw-money {
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
min-height: 70rpx;
|
||||
padding-left: 20rpx;
|
||||
font-size: 60rpx;
|
||||
flex: 1;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.delete {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bootom {
|
||||
display: flex;
|
||||
padding-top: 20rpx;
|
||||
|
||||
text {
|
||||
line-height: 1;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.all-tx {
|
||||
padding-left: 10rpx;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 0 30rpx;
|
||||
margin-top: 60rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: $border-radius;
|
||||
.iconfont {
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.withdraw-wrap {
|
||||
margin: 0 20rpx;
|
||||
padding: 30rpx;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: rgba(110, 110, 110, 0.09) 0 0 20rpx 0;
|
||||
|
||||
.money-wrap {
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 2rpx solid #eee;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
|
||||
.unit {
|
||||
font-size: 60rpx;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.withdraw-money {
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
min-height: 70rpx;
|
||||
padding-left: 20rpx;
|
||||
font-size: 60rpx;
|
||||
flex: 1;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.delete {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bootom {
|
||||
display: flex;
|
||||
padding-top: 20rpx;
|
||||
|
||||
text {
|
||||
line-height: 1;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.all-tx {
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 0 30rpx;
|
||||
margin-top: 60rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: $border-radius;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background-color: var(--main-color);
|
||||
|
||||
&.disabled {
|
||||
background: #ccc;
|
||||
border-color: #ccc;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.recoend {
|
||||
margin-top: 40rpx;
|
||||
|
||||
.recoend-con {
|
||||
text-align: center;
|
||||
background-color: var(--main-color);
|
||||
|
||||
&.disabled {
|
||||
background: #ccc;
|
||||
border-color: #ccc;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.recoend {
|
||||
margin-top: 40rpx;
|
||||
|
||||
.recoend-con {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: $font-size-tag;
|
||||
color: #999;
|
||||
}
|
||||
.desc {
|
||||
font-size: $font-size-tag;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
@@ -2,9 +2,9 @@
|
||||
<view class="balance" :style="themeColor">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="custom-navbar" :style="{
|
||||
'padding-top': menuButtonBounding.top + 'px',
|
||||
'height': menuButtonBounding.height + 'px'
|
||||
}">
|
||||
'padding-top': menuButtonBounding.top + 'px',
|
||||
'height': menuButtonBounding.height + 'px'
|
||||
}">
|
||||
<view class="navbar-wrap">
|
||||
<text class="iconfont icon-back_light back" @click="$util.redirectTo('/pages/member/index')"></text>
|
||||
<view class="navbar-title">
|
||||
@@ -13,12 +13,14 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<view class="head-wrap" :style="{ background: 'url(' + $util.img('public/uniapp/balance/balance-bg.png') + ')',backgroundSize:'100% 100%' }">
|
||||
<!-- <view class="head-wrap" :style="{ background: 'url(' + $util.img('public/uniapp/balance/balance-bg.png') + ') no-repeat right bottom/ auto 380rpx, linear-gradient(314deg, #FE7849 0%, #FF1959 100%)' }"> -->
|
||||
|
||||
<view class="head-wrap"
|
||||
:style="{ background: 'url(' + $util.img('public/uniapp/balance/balance-bg.png') + ')', backgroundSize: '100% 100%' }">
|
||||
<!-- <view class="head-wrap" :style="{ background: 'url(' + $util.img('public/uniapp/balance/balance-bg.png') + ') no-repeat right bottom/ auto 380rpx, linear-gradient(314deg, #FE7849 0%, #FF1959 100%)' }"> -->
|
||||
<view class="title">账户余额(元)</view>
|
||||
<view class="balance price-font">{{ (parseFloat(balanceInfo.balance) + parseFloat(balanceInfo.balance_money)).toFixed(2) }}</view>
|
||||
<!-- <view class="flex-box">
|
||||
<view class="balance price-font">{{ (parseFloat(balanceInfo.balance) +
|
||||
parseFloat(balanceInfo.balance_money)).toFixed(2) }}</view>
|
||||
<!-- <view class="flex-box">
|
||||
<view class="flex-item">
|
||||
<view class="num price-font">{{ balanceInfo.balance_money|moneyFormat }}</view>
|
||||
<view class="font-size-tag">现金余额(元)</view>
|
||||
@@ -49,7 +51,7 @@
|
||||
<text class="title">余额明细</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
<!-- <view class="menu-item" @click="toOrderList">
|
||||
<!-- <view class="menu-item" @click="toOrderList">
|
||||
<view class="icon">
|
||||
<text class="iconfont icon-chongzhijilu"></text>
|
||||
</view>
|
||||
@@ -57,8 +59,8 @@
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<!-- <view class="action">
|
||||
|
||||
<!-- <view class="action">
|
||||
<view @click="toList" class="recharge-withdraw" v-if="addonIsExist.memberrecharge && memberrechargeConfig && memberrechargeConfig.is_use">
|
||||
{{ $lang('recharge') }}
|
||||
</view>
|
||||
@@ -72,11 +74,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
|
||||
export default {
|
||||
components: { nsLogin, loadingCover },
|
||||
components: {
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
balanceInfo: {
|
||||
@@ -114,7 +116,7 @@ export default {
|
||||
toBalanceDetail() {
|
||||
this.$util.redirectTo('/pages_tool/member/balance_detail');
|
||||
},
|
||||
toApply(){
|
||||
toApply() {
|
||||
this.$util.redirectTo('/pages_tool/member/withdrawal');
|
||||
},
|
||||
toList() {
|
||||
@@ -178,7 +180,7 @@ export default {
|
||||
return true;
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
storeToken: function (nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getUserInfo();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<text class="uni-tab-item-title" :class="statusIndex == orderStatus ? 'uni-tab-item-title-active' : ''">{{ statusItem.name }}</text>
|
||||
</view>
|
||||
</scroll-view> -->
|
||||
<!-- <view class="tab color-bg">
|
||||
<!-- <view class="tab color-bg">
|
||||
<view class="tab-left">
|
||||
<picker mode="date" :value="searchType.date" @change="bindDateChange" fields="month">
|
||||
<view class="uni-input">
|
||||
@@ -27,15 +27,18 @@
|
||||
<block v-if="dataList.length > 0">
|
||||
<view class="detailed-wrap">
|
||||
<view class="balances" v-for="(item, index) in dataList" :key="index">
|
||||
<image :src="$util.img('public/uniapp/balance/recharge.png')" class="balances-img" v-if="item.account_data > 0"></image>
|
||||
<image v-else :src="$util.img('public/uniapp/balance/shopping.png')" mode="widthFix"></image>
|
||||
<image :src="$util.img('public/uniapp/balance/recharge.png')" class="balances-img"
|
||||
v-if="item.account_data > 0"></image>
|
||||
<image v-else :src="$util.img('public/uniapp/balance/shopping.png')" mode="widthFix">
|
||||
</image>
|
||||
<view class="balances-info" @click="toFromDetail(item)">
|
||||
<text class="title">{{ item.remark }}</text>
|
||||
<!-- <text>{{ item.remark }}</text> -->
|
||||
<!-- <text>{{ item.remark }}</text> -->
|
||||
<text>{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
||||
</view>
|
||||
<view class="balances-num">
|
||||
<text :class="item.account_data > 0 ? 'color-base-text' : ''">{{ item.account_data > 0 ? '+' + item.account_data : item.account_data }}元</text>
|
||||
<text :class="item.account_data > 0 ? 'color-base-text' : ''">{{ item.account_data > 0 ?
|
||||
'+' + item.account_data : item.account_data }}元</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -50,324 +53,319 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsEmpty,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
MescrollUni,
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
const currentDate = this.getDate({
|
||||
format: true
|
||||
data() {
|
||||
const currentDate = this.getDate({
|
||||
format: true
|
||||
});
|
||||
return {
|
||||
dataList: [],
|
||||
statusList: [{
|
||||
name: '全部',
|
||||
id: '0'
|
||||
}, {
|
||||
name: '收入',
|
||||
id: '1'
|
||||
}, {
|
||||
name: '支出',
|
||||
id: '2'
|
||||
}],
|
||||
scrollInto: '',
|
||||
orderStatus: '0',
|
||||
date: currentDate,
|
||||
searchType: {
|
||||
from_type: 0,
|
||||
date: ''
|
||||
},
|
||||
balanceType: [{
|
||||
label: '全部',
|
||||
value: '0'
|
||||
}], //积分类型
|
||||
balanceIndex: 0,
|
||||
related_id: 0
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.group_id) this.related_id = option.group_id ? option.group_id : 0;
|
||||
if (option.from_type) this.searchType.from_type = option.from_type;
|
||||
if (option.related_id) this.related_id = option.related_id ? option.related_id : 0;
|
||||
if (option.status) this.orderStatus = option.status;
|
||||
this.getbalanceType();
|
||||
},
|
||||
onShow() {
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/balance');
|
||||
});
|
||||
return {
|
||||
dataList: [],
|
||||
statusList: [{
|
||||
name: '全部',
|
||||
id: '0'
|
||||
}, {
|
||||
name: '收入',
|
||||
id: '1'
|
||||
}, {
|
||||
name: '支出',
|
||||
id: '2'
|
||||
}],
|
||||
scrollInto: '',
|
||||
orderStatus: '0',
|
||||
date: currentDate,
|
||||
searchType: {
|
||||
from_type: 0,
|
||||
date: ''
|
||||
},
|
||||
balanceType: [{
|
||||
label: '全部',
|
||||
value: '0'
|
||||
}], //积分类型
|
||||
balanceIndex: 0,
|
||||
related_id: 0
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindDateChange: function (e) {
|
||||
var temp = e.target.value;
|
||||
var tempArr = temp.split('-');
|
||||
this.date = tempArr[0] + '年' + tempArr[1] + '月';
|
||||
this.searchType.date = e.target.value;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.group_id) this.related_id = option.group_id ? option.group_id : 0;
|
||||
if (option.from_type) this.searchType.from_type = option.from_type;
|
||||
if (option.related_id) this.related_id = option.related_id ? option.related_id : 0;
|
||||
if (option.status) this.orderStatus = option.status;
|
||||
this.getbalanceType();
|
||||
},
|
||||
onShow() {
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/balance');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindDateChange: function(e) {
|
||||
var temp = e.target.value;
|
||||
var tempArr = temp.split('-');
|
||||
this.date = tempArr[0] + '年' + tempArr[1] + '月';
|
||||
this.searchType.date = e.target.value;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
getDate(type) {
|
||||
const date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
getDate(type) {
|
||||
const date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
|
||||
if (type === 'start') {
|
||||
year = year - 60;
|
||||
} else if (type === 'end') {
|
||||
year = year + 2;
|
||||
}
|
||||
month = month > 9 ? month : '0' + month;
|
||||
day = day > 9 ? day : '0' + day;
|
||||
return `${year}年${month}月`;
|
||||
},
|
||||
bindPickerChange(e) {
|
||||
this.balanceIndex = e.detail.value;
|
||||
this.searchType.from_type = this.balanceType[this.balanceIndex].value;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
//获取分类类型
|
||||
getbalanceType() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaccount/fromType',
|
||||
success: res => {
|
||||
let balanceType = Object.assign(res.balance, res.balance_money),
|
||||
typeArr = [{
|
||||
label: '全部',
|
||||
value: '0'
|
||||
}];
|
||||
for (var index in balanceType) {
|
||||
typeArr.push({
|
||||
label: balanceType[index].type_name,
|
||||
value: index
|
||||
})
|
||||
}
|
||||
this.balanceType = typeArr;
|
||||
if (type === 'start') {
|
||||
year = year - 60;
|
||||
} else if (type === 'end') {
|
||||
year = year + 2;
|
||||
}
|
||||
month = month > 9 ? month : '0' + month;
|
||||
day = day > 9 ? day : '0' + day;
|
||||
return `${year}年${month}月`;
|
||||
},
|
||||
bindPickerChange(e) {
|
||||
this.balanceIndex = e.detail.value;
|
||||
this.searchType.from_type = this.balanceType[this.balanceIndex].value;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
//获取分类类型
|
||||
getbalanceType() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaccount/fromType',
|
||||
success: res => {
|
||||
let balanceType = Object.assign(res.balance, res.balance_money),
|
||||
typeArr = [{
|
||||
label: '全部',
|
||||
value: '0'
|
||||
}];
|
||||
for (var index in balanceType) {
|
||||
typeArr.push({
|
||||
label: balanceType[index].type_name,
|
||||
value: index
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
ontabtap(e) {
|
||||
let index = e.currentTarget.dataset.current;
|
||||
this.orderStatus = this.statusList[index].id;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
getData(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaccount/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num,
|
||||
account_type: 'balance,balance_money',
|
||||
from_type: this.searchType.from_type,
|
||||
date: this.searchType.date,
|
||||
related_id: this.related_id
|
||||
},
|
||||
success: res => {
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) {
|
||||
this.dataList = []; //如果是第一页需手动制空列表
|
||||
this.related_id = 0;
|
||||
}
|
||||
this.dataList = this.dataList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
toFromDetail(item) {
|
||||
if (item.from_type == 'order' && !isNaN(parseInt(item.type_tag))) {
|
||||
this.$util.redirectTo('/pages_order/detail', {
|
||||
order_id: item.type_tag
|
||||
});
|
||||
} else if (item.from_type == 'refund' && parseInt(item.type_tag) != 0) {
|
||||
this.$util.redirectTo('/pages_order/detail', {
|
||||
order_id: item.type_tag
|
||||
});
|
||||
this.balanceType = typeArr;
|
||||
}
|
||||
});
|
||||
},
|
||||
ontabtap(e) {
|
||||
let index = e.currentTarget.dataset.current;
|
||||
this.orderStatus = this.statusList[index].id;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
getData(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaccount/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num,
|
||||
account_type: 'balance,balance_money',
|
||||
from_type: this.searchType.from_type,
|
||||
date: this.searchType.date,
|
||||
related_id: this.related_id
|
||||
},
|
||||
success: res => {
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) {
|
||||
this.dataList = []; //如果是第一页需手动制空列表
|
||||
this.related_id = 0;
|
||||
}
|
||||
this.dataList = this.dataList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
toFromDetail(item) {
|
||||
if (item.from_type == 'order' && !isNaN(parseInt(item.type_tag))) {
|
||||
this.$util.redirectTo('/pages_order/detail', {
|
||||
order_id: item.type_tag
|
||||
});
|
||||
} else if (item.from_type == 'refund' && parseInt(item.type_tag) != 0) {
|
||||
this.$util.redirectTo('/pages_order/detail', {
|
||||
order_id: item.type_tag
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.detailed-wrap {
|
||||
padding-top: 20rpx;
|
||||
|
||||
margin: 24rpx;
|
||||
}
|
||||
.detailed-wrap {
|
||||
padding-top: 20rpx;
|
||||
|
||||
.tab {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 80rpx;
|
||||
background-color: $color-bg;
|
||||
margin: 24rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
.tab {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 80rpx;
|
||||
background-color: $color-bg;
|
||||
|
||||
text {
|
||||
margin-left: 10rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
view {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
|
||||
.tab-left {
|
||||
display: flex;
|
||||
padding-left: 46rpx;
|
||||
}
|
||||
|
||||
.tab-right {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-right: 26rpx;
|
||||
text {
|
||||
margin-left: 10rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
|
||||
.order-nav {
|
||||
width: 100vw;
|
||||
height: 70rpx;
|
||||
.tab-left {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding-left: 46rpx;
|
||||
}
|
||||
|
||||
.tab-right {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-right: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.order-nav {
|
||||
width: 100vw;
|
||||
height: 70rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
/* #ifndef APP-PLUS */
|
||||
white-space: nowrap;
|
||||
/* #endif */
|
||||
background: #fff;
|
||||
border-bottom-left-radius: 24rpx;
|
||||
border-bottom-right-radius: 24rpx;
|
||||
padding-bottom: 30rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
z-index: 998;
|
||||
|
||||
.uni-tab-item {
|
||||
width: 33.33%;
|
||||
text-align: center;
|
||||
/* #ifndef APP-PLUS */
|
||||
display: inline-block;
|
||||
/* #endif */
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.uni-tab-item-title {
|
||||
color: #555;
|
||||
font-size: $font-size-base;
|
||||
display: block;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
border-bottom: 4rpx solid #fff;
|
||||
padding: 0 10rpx;
|
||||
flex-wrap: nowrap;
|
||||
/* #ifndef APP-PLUS */
|
||||
white-space: nowrap;
|
||||
/* #endif */
|
||||
background: #fff;
|
||||
border-bottom-left-radius: 24rpx;
|
||||
border-bottom-right-radius: 24rpx;
|
||||
padding-bottom: 30rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
z-index: 998;
|
||||
|
||||
.uni-tab-item {
|
||||
width: 33.33%;
|
||||
text-align: center;
|
||||
/* #ifndef APP-PLUS */
|
||||
display: inline-block;
|
||||
/* #endif */
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.uni-tab-item-title {
|
||||
color: #555;
|
||||
font-size: $font-size-base;
|
||||
display: block;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
border-bottom: 4rpx solid #fff;
|
||||
padding: 0 10rpx;
|
||||
flex-wrap: nowrap;
|
||||
/* #ifndef APP-PLUS */
|
||||
white-space: nowrap;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.uni-tab-item-title-active {
|
||||
display: block;
|
||||
height: 64rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.balances {
|
||||
padding: $margin-both 24rpx;
|
||||
// margin: 0 $margin-both;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 24rpx;
|
||||
image {
|
||||
width: 54rpx;
|
||||
height: 54rpx;
|
||||
border-radius: 50%;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.balances-info {
|
||||
flex: 1;
|
||||
margin-left: 16rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
text {
|
||||
font-size: $font-size-toolbar;
|
||||
line-height: 1;
|
||||
|
||||
&:last-child {}
|
||||
|
||||
&:nth-child(2) {
|
||||
margin-top: $margin-updown;
|
||||
font-size: $font-size-activity-tag;
|
||||
color: $color-tip;
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
font-size: $font-size-activity-tag;
|
||||
margin-top: $margin-updown;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.balances-num {
|
||||
text {
|
||||
line-height: 1;
|
||||
font-size: $font-size-toolbar;
|
||||
font-weight: 500;
|
||||
color:#09c15f;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
.uni-tab-item-title-active {
|
||||
display: block;
|
||||
height: 64rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.empty {
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.balances {
|
||||
padding: $margin-both 24rpx;
|
||||
// margin: 0 $margin-both;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 24rpx;
|
||||
|
||||
image {
|
||||
width: 54rpx;
|
||||
height: 54rpx;
|
||||
border-radius: 50%;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.balances-info {
|
||||
flex: 1;
|
||||
margin-left: 16rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
text {
|
||||
font-size: $font-size-toolbar;
|
||||
line-height: 1;
|
||||
|
||||
&:last-child {}
|
||||
|
||||
&:nth-child(2) {
|
||||
margin-top: $margin-updown;
|
||||
font-size: $font-size-activity-tag;
|
||||
color: $color-tip;
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
font-size: $font-size-activity-tag;
|
||||
margin-top: $margin-updown;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.balances-num {
|
||||
text {
|
||||
line-height: 1;
|
||||
font-size: $font-size-toolbar;
|
||||
font-weight: 500;
|
||||
color: #09c15f;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -19,7 +19,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import htmlParser from '@/common/js/html-parser';
|
||||
import htmlParser from '@/common/js/html-parser.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<view class="container" :style="themeColor">
|
||||
<view class="cancel-wrap">
|
||||
<view class="cancel-img"><image :src="$util.img('public/uniapp/member/refuse.png')"></image></view>
|
||||
<view class="cancel-img">
|
||||
<image :src="$util.img('public/uniapp/member/refuse.png')"></image>
|
||||
</view>
|
||||
<view class="cancel-title">您的申请已拒绝</view>
|
||||
<view class="cancel-reason">拒绝理由:{{ reason }}</view>
|
||||
<view class="cancel-btn">
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
<view class="cancelstatus-box-line color-base-bg" :class="{ 'opacity-4': state == 0 }"></view>
|
||||
</view>
|
||||
<view class="cancelstatus-box cancelstatus-box-last">
|
||||
<view class="cancelstatus-box-sort color-base-bg" :class="[ state == 1 ? 'opacity': 'opacity-4' ]">
|
||||
3
|
||||
<view class="cancelstatus-box-sort color-base-bg" :class="[state == 1 ? 'opacity' : 'opacity-4']">
|
||||
</view>
|
||||
<view class="cancelstatus-box-con">
|
||||
<view class="cancelstatus-box-name">审核通过,注销完成</view>
|
||||
@@ -37,153 +36,153 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
state: 0
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
// 判断登录
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo('/pages_tool/login/login');
|
||||
} else {
|
||||
this.getStatus();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
state: 0
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
// 判断登录
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo('/pages_tool/login/login');
|
||||
} else {
|
||||
this.getStatus();
|
||||
},
|
||||
methods: {
|
||||
getStatus() {
|
||||
this.$api.sendRequest({
|
||||
url: '/membercancel/api/membercancel/info',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.state = res.data.status;
|
||||
if (this.state == -1) {
|
||||
this.$util.redirectTo('/pages_tool/member/cancelrefuse');
|
||||
}
|
||||
}
|
||||
|
||||
if (res.code == -1) {
|
||||
this.$store.commit('setToken', '');
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.dispatch('emptyCart');
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
back() {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
},
|
||||
revoke() {
|
||||
uni.showModal({
|
||||
title: '风险提示',
|
||||
content: '确定要撤销申请吗?',
|
||||
confirmColor: '#000000',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
url: '/membercancel/api/membercancel/cancelApply',
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.getStatus();
|
||||
},
|
||||
methods: {
|
||||
getStatus() {
|
||||
this.$api.sendRequest({
|
||||
url: '/membercancel/api/membercancel/info',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.state = res.data.status;
|
||||
if (this.state == -1) {
|
||||
this.$util.redirectTo('/pages_tool/member/cancelrefuse');
|
||||
}
|
||||
}
|
||||
|
||||
if (res.code == -1) {
|
||||
this.$store.commit('setToken', '');
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.dispatch('emptyCart');
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
back() {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
},
|
||||
revoke() {
|
||||
uni.showModal({
|
||||
title: '风险提示',
|
||||
content: '确定要撤销申请吗?',
|
||||
confirmColor: '#000000',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
url: '/membercancel/api/membercancel/cancelApply',
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cancelstatus-wrap {
|
||||
.cancelstatus-block {
|
||||
padding: 50rpx;
|
||||
.cancelstatus-wrap {
|
||||
.cancelstatus-block {
|
||||
padding: 50rpx;
|
||||
}
|
||||
|
||||
.cancelstatus-box {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: 200rpx;
|
||||
|
||||
.cancelstatus-box-sort {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
text-align: center;
|
||||
line-height: 36rpx;
|
||||
border-radius: 50%;
|
||||
color: #ffffff;
|
||||
margin-right: 17rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.cancelstatus-box {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: 200rpx;
|
||||
.opacity {
|
||||
opacity: 1;
|
||||
|
||||
.cancelstatus-box-sort {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
text-align: center;
|
||||
line-height: 36rpx;
|
||||
border-radius: 50%;
|
||||
color: #ffffff;
|
||||
margin-right: 17rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.opacity {
|
||||
opacity: 1;
|
||||
|
||||
&-4 {
|
||||
opacity: 0.4;
|
||||
}
|
||||
}
|
||||
|
||||
.cancelstatus-box-name {
|
||||
font-size: 32rpx;
|
||||
line-height: 32rpx;
|
||||
margin-top: 3rpx;
|
||||
}
|
||||
|
||||
.cancelstatus-box-info {
|
||||
margin-top: 15rpx;
|
||||
color: #666666;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.cancelstatus-box-line {
|
||||
position: absolute;
|
||||
width: 2rpx;
|
||||
height: 164rpx;
|
||||
top: 36rpx;
|
||||
left: 18rpx;
|
||||
}
|
||||
|
||||
&.cancelstatus-box-last {
|
||||
height: 80rpx;
|
||||
&-4 {
|
||||
opacity: 0.4;
|
||||
}
|
||||
}
|
||||
|
||||
.cancelstatus-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 150rpx;
|
||||
.cancelstatus-box-name {
|
||||
font-size: 32rpx;
|
||||
line-height: 32rpx;
|
||||
margin-top: 3rpx;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 300rpx;
|
||||
height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
margin: 0 15rpx;
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
.cancelstatus-box-info {
|
||||
margin-top: 15rpx;
|
||||
color: #666666;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
button[type='primary'] {
|
||||
background-color: unset !important;
|
||||
color: #333333;
|
||||
border: 2rpx solid #dddddd;
|
||||
}
|
||||
.cancelstatus-box-line {
|
||||
position: absolute;
|
||||
width: 2rpx;
|
||||
height: 164rpx;
|
||||
top: 36rpx;
|
||||
left: 18rpx;
|
||||
}
|
||||
|
||||
button:nth-child(2) {
|
||||
color: #ffffff;
|
||||
}
|
||||
&.cancelstatus-box-last {
|
||||
height: 80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cancelstatus-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 150rpx;
|
||||
|
||||
button {
|
||||
width: 300rpx;
|
||||
height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
margin: 0 15rpx;
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
|
||||
button[type='primary'] {
|
||||
background-color: unset !important;
|
||||
color: #333333;
|
||||
border: 2rpx solid #dddddd;
|
||||
}
|
||||
|
||||
button:nth-child(2) {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -12,88 +12,88 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
state: ''
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
state: ''
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
|
||||
if (option.back) this.back = option.back;
|
||||
if (option.back) this.back = option.back;
|
||||
|
||||
// 判断登录
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo('/pages_tool/login/login');
|
||||
} else {
|
||||
this.getStatus();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getStatus() {
|
||||
this.$api.sendRequest({
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.state = res.data.state;
|
||||
if (res.data.state == 1) {
|
||||
this.$store.commit('setToken', '');
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.dispatch('emptyCart');
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}
|
||||
// 判断登录
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo('/pages_tool/login/login');
|
||||
} else {
|
||||
this.getStatus();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getStatus() {
|
||||
this.$api.sendRequest({
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.state = res.data.state;
|
||||
if (res.data.state == 1) {
|
||||
this.$store.commit('setToken', '');
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.dispatch('emptyCart');
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cancel-wrap {
|
||||
padding-top: 84rpx;
|
||||
text-align: center;
|
||||
.cancel-wrap {
|
||||
padding-top: 84rpx;
|
||||
text-align: center;
|
||||
|
||||
.cancel-img {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
display: inline-block;
|
||||
.cancel-img {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
display: inline-block;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.cancel-title {
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
line-height: 24rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.cancel-reason {
|
||||
color: #838383;
|
||||
font-size: 20rpx;
|
||||
line-height: 40rpx;
|
||||
margin-top: 20rpx;
|
||||
padding: 0 175rpx;
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
image {
|
||||
width: 100%;
|
||||
margin-top: 173rpx;
|
||||
|
||||
button {
|
||||
display: inline-block;
|
||||
width: 300rpx;
|
||||
height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
margin: 0 15rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.cancel-title {
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
line-height: 24rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.cancel-reason {
|
||||
color: #838383;
|
||||
font-size: 20rpx;
|
||||
line-height: 40rpx;
|
||||
margin-top: 20rpx;
|
||||
padding: 0 175rpx;
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
width: 100%;
|
||||
margin-top: 173rpx;
|
||||
|
||||
button {
|
||||
display: inline-block;
|
||||
width: 300rpx;
|
||||
height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
margin: 0 15rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -5,8 +5,9 @@
|
||||
</view>
|
||||
<view class="banner-container">
|
||||
<view class="memberInfo">
|
||||
<image :src="$util.img(memberInfo.headimg)" v-if="memberInfo.headimg" @error="headimgError" mode="aspectFill"/>
|
||||
<image :src="$util.getDefaultImage().head" v-else mode="aspectFill"/>
|
||||
<image :src="$util.img(memberInfo.headimg)" v-if="memberInfo.headimg" @error="headimgError"
|
||||
mode="aspectFill" />
|
||||
<image :src="$util.getDefaultImage().head" v-else mode="aspectFill" />
|
||||
<view class="member-desc">
|
||||
<view class="font-size-toolbar">{{ memberInfo.nickname }}</view>
|
||||
<view class="font-size-tag expire-time" v-if="memberInfo.level_expire_time > 0">
|
||||
@@ -22,15 +23,18 @@
|
||||
<view class="level-detail">{{ levelInfo.level_name }}</view>
|
||||
<view class="growr-name">{{ levelInfo.level_name }}可享受消费折扣和</view>
|
||||
<view class="growr-value">会员大礼包等权益</view>
|
||||
<view class="growth-rules font-size-tag" @click="openExplainPopup" v-if="levelInfo.remark != ''">
|
||||
<view class="growth-rules font-size-tag" @click="openExplainPopup"
|
||||
v-if="levelInfo.remark != ''">
|
||||
<text class="iconfont icon-wenhao font-size-tag"></text>
|
||||
</view>
|
||||
<button type="default" class="renew-btn" @click="$util.redirectTo('/pages_tool/member/card_buy')">立即续费</button>
|
||||
<button type="default" class="renew-btn"
|
||||
@click="$util.redirectTo('/pages_tool/member/card_buy')">立即续费</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card-content" v-if="levelInfo.is_free_shipping || levelInfo.consume_discount < 100 || levelInfo.point_feedback > 0">
|
||||
<view class="card-content"
|
||||
v-if="levelInfo.is_free_shipping || levelInfo.consume_discount < 100 || levelInfo.point_feedback > 0">
|
||||
<view class="card-content-head">
|
||||
<view class="line-box">
|
||||
<view class="line right"></view>
|
||||
@@ -118,113 +122,111 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
|
||||
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniPopup,
|
||||
nsGoodsRecommend,
|
||||
nsLogin
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
isSub: false, // 是否已提交
|
||||
isIphoneX: false,
|
||||
levelId: 0,
|
||||
levelInfo: {
|
||||
bg_color: '#333'
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
//会员卡
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/card');
|
||||
});
|
||||
return;
|
||||
export default {
|
||||
components: {
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue')
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
isSub: false, // 是否已提交
|
||||
isIphoneX: false,
|
||||
levelId: 0,
|
||||
levelInfo: {
|
||||
bg_color: '#333'
|
||||
}
|
||||
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
|
||||
this.levelId = this.memberInfo.member_level;
|
||||
|
||||
let levelInfo = this.memberInfo.member_level_info;
|
||||
let charge_rule = levelInfo.charge_rule ? JSON.parse(levelInfo.charge_rule) : {};
|
||||
levelInfo.charge_rule_arr = [];
|
||||
Object.keys(charge_rule).forEach(key => {
|
||||
levelInfo.charge_rule_arr.push({
|
||||
key: key,
|
||||
value: charge_rule[key]
|
||||
});
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
//会员卡
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/card');
|
||||
});
|
||||
this.levelInfo = levelInfo;
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
headimgError() {
|
||||
this.memberInfo.headimg = this.$util.getDefaultImage().head;
|
||||
},
|
||||
/**
|
||||
* 打开说明弹出层
|
||||
*/
|
||||
openExplainPopup() {
|
||||
this.$refs.explainPopup.open();
|
||||
},
|
||||
/**
|
||||
* 打开说明弹出层
|
||||
*/
|
||||
closeExplainPopup() {
|
||||
this.$refs.explainPopup.close();
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
|
||||
this.levelId = this.memberInfo.member_level;
|
||||
|
||||
let levelInfo = this.memberInfo.member_level_info;
|
||||
let charge_rule = levelInfo.charge_rule ? JSON.parse(levelInfo.charge_rule) : {};
|
||||
levelInfo.charge_rule_arr = [];
|
||||
Object.keys(charge_rule).forEach(key => {
|
||||
levelInfo.charge_rule_arr.push({
|
||||
key: key,
|
||||
value: charge_rule[key]
|
||||
});
|
||||
});
|
||||
this.levelInfo = levelInfo;
|
||||
},
|
||||
onShow() { },
|
||||
methods: {
|
||||
headimgError() {
|
||||
this.memberInfo.headimg = this.$util.getDefaultImage().head;
|
||||
},
|
||||
/**
|
||||
* 打开说明弹出层
|
||||
*/
|
||||
openExplainPopup() {
|
||||
this.$refs.explainPopup.open();
|
||||
},
|
||||
/**
|
||||
* 打开说明弹出层
|
||||
*/
|
||||
closeExplainPopup() {
|
||||
this.$refs.explainPopup.close();
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
return true;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/card.scss';
|
||||
@import './public/css/card.scss';
|
||||
|
||||
.banner-container .image-container .slide-image {
|
||||
width: calc(100% - 60rpx);
|
||||
height: 360rpx;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.banner-container .image-container .slide-image {
|
||||
width: calc(100% - 60rpx);
|
||||
height: 360rpx;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.banner-container .image-container image {
|
||||
background-color: #e3b66b;
|
||||
}
|
||||
.banner-container .image-container image {
|
||||
background-color: #e3b66b;
|
||||
}
|
||||
|
||||
.banner-container .slide-image .renew-btn {
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: $border-radius;
|
||||
width: 160rpx;
|
||||
font-size: $font-size-tag;
|
||||
color: #e3b66b !important;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
bottom: 40rpx;
|
||||
border: none;
|
||||
z-index: 10;
|
||||
}
|
||||
.banner-container .slide-image .renew-btn {
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: $border-radius;
|
||||
width: 160rpx;
|
||||
font-size: $font-size-tag;
|
||||
color: #e3b66b !important;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
bottom: 40rpx;
|
||||
border: none;
|
||||
z-index: 10;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
</style>
|
||||
@@ -6,7 +6,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import htmlParser from '@/common/js/html-parser';
|
||||
import htmlParser from '@/common/js/html-parser.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -17,7 +17,7 @@ export default {
|
||||
onLoad() {
|
||||
this.getAgreement();
|
||||
},
|
||||
onShow() {},
|
||||
onShow() { },
|
||||
methods: {
|
||||
getAgreement() {
|
||||
this.$api.sendRequest({
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
</view>
|
||||
<view class="banner-container">
|
||||
<view class="memberInfo">
|
||||
<image :src="$util.img(memberInfo.headimg)" v-if="memberInfo.headimg" @error="headimgError" mode="aspectFill"/>
|
||||
<image :src="$util.img(memberInfo.headimg)" v-if="memberInfo.headimg" @error="headimgError"
|
||||
mode="aspectFill" />
|
||||
<image :src="$util.getDefaultImage().head" v-else mode="aspectFill"></image>
|
||||
<view class="member-desc">
|
||||
<view class="font-size-toolbar">{{ memberInfo.nickname }}</view>
|
||||
@@ -22,26 +23,27 @@
|
||||
:circular="swiperConfig.circular" :previous-margin="swiperConfig.previousMargin"
|
||||
:next-margin="swiperConfig.nextMargin" @change="swiperChange" @animationfinish="animationfinish"
|
||||
:current="curIndex">
|
||||
<swiper-item :class="levelList.length == 1 ? 'image-container-box' : ''" v-for="(item, i) in levelList" :key="i">
|
||||
<swiper-item :class="levelList.length == 1 ? 'image-container-box' : ''"
|
||||
v-for="(item, i) in levelList" :key="i">
|
||||
<view class="image-container" :class="[
|
||||
curIndex === 0
|
||||
? i === listLen - 1
|
||||
? 'item-left'
|
||||
: i === 1
|
||||
curIndex === 0
|
||||
? i === listLen - 1
|
||||
? 'item-left'
|
||||
: i === 1
|
||||
? 'item-right'
|
||||
: 'item-center'
|
||||
: curIndex === listLen - 1
|
||||
: curIndex === listLen - 1
|
||||
? i === 0
|
||||
? 'item-right'
|
||||
: i === listLen - 2
|
||||
? 'item-left'
|
||||
: 'item-center'
|
||||
? 'item-left'
|
||||
: 'item-center'
|
||||
: i === curIndex - 1
|
||||
? 'item-left'
|
||||
: i === curIndex + 1
|
||||
? 'item-right'
|
||||
: 'item-center'
|
||||
]">
|
||||
? 'item-left'
|
||||
: i === curIndex + 1
|
||||
? 'item-right'
|
||||
: 'item-center'
|
||||
]">
|
||||
<view class="slide-image" style="background-size: 100% 100%;background-repeat:no-repeat"
|
||||
:style="{
|
||||
transform: curIndex === i ? 'scale(' + scaleX + ',' + scaleY + ')' : 'scale(1,1)',
|
||||
@@ -50,14 +52,19 @@
|
||||
}">
|
||||
<view class="bg-border"></view>
|
||||
|
||||
<image v-if="levelList[curIndex] && levelList[curIndex]['level_picture']" :src="$util.img(levelList[curIndex]['level_picture'])"/>
|
||||
<image v-else :style="{backgroundColor:levelList[curIndex]['bg_color']}"/>
|
||||
<image v-if="levelList[curIndex] && levelList[curIndex]['level_picture']"
|
||||
:src="$util.img(levelList[curIndex]['level_picture'])" />
|
||||
<image v-else :style="{ backgroundColor: levelList[curIndex]['bg_color'] }" />
|
||||
|
||||
<view class="info">
|
||||
<view class="level-detail" :style="{color:levelList[curIndex]['level_text_color']}">{{ levelList[curIndex].level_name }}</view>
|
||||
<view class="growr-name" :style="{color:levelList[curIndex]['level_text_color']}">{{ levelList[curIndex].level_name }}可享受消费折扣和</view>
|
||||
<view class="growr-value" :style="{color:levelList[curIndex]['level_text_color']}">会员大礼包等权益</view>
|
||||
<view class="growth-rules font-size-tag" @click="openExplainPopup" v-if="levelList[curIndex].remark != ''">
|
||||
<view class="level-detail" :style="{ color: levelList[curIndex]['level_text_color'] }">
|
||||
{{ levelList[curIndex].level_name }}</view>
|
||||
<view class="growr-name" :style="{ color: levelList[curIndex]['level_text_color'] }">{{
|
||||
levelList[curIndex].level_name }}可享受消费折扣和</view>
|
||||
<view class="growr-value" :style="{ color: levelList[curIndex]['level_text_color'] }">
|
||||
会员大礼包等权益</view>
|
||||
<view class="growth-rules font-size-tag" @click="openExplainPopup"
|
||||
v-if="levelList[curIndex].remark != ''">
|
||||
<text class="iconfont icon-wenhao font-size-tag"></text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -78,8 +85,10 @@
|
||||
<view class="clear"></view>
|
||||
</view>
|
||||
<view class="card-time-list">
|
||||
<view class="card-item-box" :class="{ small: currCard.charge_rule_arr.length == 4 }" v-for="(item, index) in currCard.charge_rule_arr" :key="index">
|
||||
<view class="card-time-item" :class="{ active: choiceIndex == index }" @click="choice(index)">
|
||||
<view class="card-item-box" :class="{ small: currCard.charge_rule_arr.length == 4 }"
|
||||
v-for="(item, index) in currCard.charge_rule_arr" :key="index">
|
||||
<view class="card-time-item" :class="{ active: choiceIndex == index }"
|
||||
@click="choice(index)">
|
||||
<image :src="$util.img('public/uniapp/level/card-icon.png')" mode="widthFix"></image>
|
||||
<view class="time-name">{{ cardType[item.key].name }}</view>
|
||||
<view class="time-price">
|
||||
@@ -172,7 +181,8 @@
|
||||
</view>
|
||||
<view class="agreement" v-if="agreement">
|
||||
购买既视为同意
|
||||
<text @click="$util.redirectTo('/pages_tool/member/card_agreement')">《{{ agreement.title }}》</text>
|
||||
<text @click="$util.redirectTo('/pages_tool/member/card_agreement')">《{{ agreement.title
|
||||
}}》</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -198,7 +208,8 @@
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
||||
<ns-payment ref="choosePaymentPopup" :payMoney="currCard.charge_rule_arr[choiceIndex].value" @confirm="toPay" v-if="currCard.charge_rule_arr.length"></ns-payment>
|
||||
<ns-payment ref="choosePaymentPopup" :payMoney="currCard.charge_rule_arr[choiceIndex].value"
|
||||
@confirm="toPay" v-if="currCard.charge_rule_arr.length"></ns-payment>
|
||||
</block>
|
||||
<block v-else><ns-empty text="暂无可开会员卡" :isIndex="false"></ns-empty></block>
|
||||
|
||||
@@ -209,221 +220,216 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import nsPayment from '@/components/ns-payment/ns-payment.vue';
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniPopup,
|
||||
nsEmpty,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
nsPayment
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
isSub: false, // 是否已提交
|
||||
isIphoneX: false,
|
||||
couponPopList: [],
|
||||
curIndex: 0,
|
||||
isDescAnimating: false,
|
||||
scaleX: (634 / 540).toFixed(4),
|
||||
scaleY: (378 / 330).toFixed(4),
|
||||
swiperConfig: {
|
||||
indicatorDots: false,
|
||||
indicatorColor: 'rgba(255, 255, 255, .4)',
|
||||
indicatorActiveColor: 'rgba(255, 255, 255, 1)',
|
||||
interval: 3000,
|
||||
duration: 300,
|
||||
circular: false,
|
||||
previousMargin: '58rpx',
|
||||
nextMargin: '58rpx'
|
||||
export default {
|
||||
components: {
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsPayment: () => import('@/components/ns-payment/ns-payment.vue')
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
isSub: false, // 是否已提交
|
||||
isIphoneX: false,
|
||||
couponPopList: [],
|
||||
curIndex: 0,
|
||||
isDescAnimating: false,
|
||||
scaleX: (634 / 540).toFixed(4),
|
||||
scaleY: (378 / 330).toFixed(4),
|
||||
swiperConfig: {
|
||||
indicatorDots: false,
|
||||
indicatorColor: 'rgba(255, 255, 255, .4)',
|
||||
indicatorActiveColor: 'rgba(255, 255, 255, 1)',
|
||||
interval: 3000,
|
||||
duration: 300,
|
||||
circular: false,
|
||||
previousMargin: '58rpx',
|
||||
nextMargin: '58rpx'
|
||||
},
|
||||
levelList: [],
|
||||
levelId: 0,
|
||||
cardType: {
|
||||
week: {
|
||||
name: '周卡',
|
||||
unit: '周'
|
||||
},
|
||||
levelList: [],
|
||||
levelId: 0,
|
||||
cardType: {
|
||||
week: {
|
||||
name: '周卡',
|
||||
unit: '周'
|
||||
},
|
||||
month: {
|
||||
name: '月卡',
|
||||
unit: '月'
|
||||
},
|
||||
quarter: {
|
||||
name: '季卡',
|
||||
unit: '季'
|
||||
},
|
||||
year: {
|
||||
name: '年卡',
|
||||
unit: '年'
|
||||
}
|
||||
month: {
|
||||
name: '月卡',
|
||||
unit: '月'
|
||||
},
|
||||
choiceIndex: 0,
|
||||
outTradeNo: '',
|
||||
agreement: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
listLen() {
|
||||
return this.levelList.length;
|
||||
quarter: {
|
||||
name: '季卡',
|
||||
unit: '季'
|
||||
},
|
||||
year: {
|
||||
name: '年卡',
|
||||
unit: '年'
|
||||
}
|
||||
},
|
||||
currCard() {
|
||||
if (this.levelList[this.curIndex]) {
|
||||
let card = this.levelList[this.curIndex];
|
||||
let charge_rule = card.charge_rule ? JSON.parse(card.charge_rule) : {};
|
||||
card.charge_rule_arr = [];
|
||||
Object.keys(charge_rule).forEach(key => {
|
||||
card.charge_rule_arr.push({
|
||||
key: key,
|
||||
value: charge_rule[key]
|
||||
});
|
||||
choiceIndex: 0,
|
||||
outTradeNo: '',
|
||||
agreement: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
listLen() {
|
||||
return this.levelList.length;
|
||||
},
|
||||
currCard() {
|
||||
if (this.levelList[this.curIndex]) {
|
||||
let card = this.levelList[this.curIndex];
|
||||
let charge_rule = card.charge_rule ? JSON.parse(card.charge_rule) : {};
|
||||
card.charge_rule_arr = [];
|
||||
Object.keys(charge_rule).forEach(key => {
|
||||
card.charge_rule_arr.push({
|
||||
key: key,
|
||||
value: charge_rule[key]
|
||||
});
|
||||
return card;
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
//会员卡
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
|
||||
if (this.storeToken) {
|
||||
this.getCardList();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/card_buy');
|
||||
});
|
||||
return card;
|
||||
}
|
||||
this.getAgreement();
|
||||
},
|
||||
onShow() {},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getCardList();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
swiperChange(e) {
|
||||
this.curIndex = e.detail.current;
|
||||
this.choiceIndex = 0;
|
||||
this.isDescAnimating = true;
|
||||
},
|
||||
animationfinish(e) {
|
||||
this.isDescAnimating = false;
|
||||
},
|
||||
getCardList() {
|
||||
this.$api.sendRequest({
|
||||
url: '/supermember/api/membercard/lists',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data) {
|
||||
this.levelList = res.data;
|
||||
this.levelId = this.memberInfo.member_level;
|
||||
for (let i = 0; i < this.levelList.length; i++) {
|
||||
if (this.levelList[i].level_id == this.levelId) {
|
||||
this.curIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
choice(index) {
|
||||
this.choiceIndex = index;
|
||||
},
|
||||
/**
|
||||
* 创建
|
||||
*/
|
||||
create() {
|
||||
if (this.memberInfo.member_level_type && this.memberInfo.member_level != this.currCard.level_id) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您有尚未过期的会员卡,再次购卡会覆盖掉之前的卡,是否继续?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$refs.choosePaymentPopup.open();
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$refs.choosePaymentPopup.open();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
toPay() {
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
|
||||
this.$api.sendRequest({
|
||||
url: '/supermember/api/ordercreate/create',
|
||||
data: {
|
||||
level_id: this.currCard.level_id,
|
||||
period_unit: this.currCard.charge_rule_arr[this.choiceIndex].key
|
||||
},
|
||||
success: res => {
|
||||
if (res.data && res.code == 0) {
|
||||
this.outTradeNo = res.data.out_trade_no;
|
||||
uni.setStorageSync('paySource', 'membercard');
|
||||
this.$refs.choosePaymentPopup.getPayInfo(this.outTradeNo);
|
||||
} else {
|
||||
this.isSub = false;
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
headimgError() {
|
||||
this.memberInfo.headimg = this.$util.getDefaultImage().head;
|
||||
},
|
||||
/**
|
||||
* 打开说明弹出层
|
||||
*/
|
||||
openExplainPopup() {
|
||||
this.$refs.explainPopup.open();
|
||||
},
|
||||
/**
|
||||
* 打开说明弹出层
|
||||
*/
|
||||
closeExplainPopup() {
|
||||
this.$refs.explainPopup.close();
|
||||
},
|
||||
getAgreement() {
|
||||
this.$api.sendRequest({
|
||||
url: '/supermember/api/membercard/agreement',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data && res.data.title != '' && res.data.content != '') {
|
||||
this.agreement = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
return true;
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
//会员卡
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
|
||||
if (this.storeToken) {
|
||||
this.getCardList();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/card_buy');
|
||||
});
|
||||
}
|
||||
this.getAgreement();
|
||||
},
|
||||
onShow() { },
|
||||
watch: {
|
||||
storeToken: function (nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getCardList();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
swiperChange(e) {
|
||||
this.curIndex = e.detail.current;
|
||||
this.choiceIndex = 0;
|
||||
this.isDescAnimating = true;
|
||||
},
|
||||
animationfinish(e) {
|
||||
this.isDescAnimating = false;
|
||||
},
|
||||
getCardList() {
|
||||
this.$api.sendRequest({
|
||||
url: '/supermember/api/membercard/lists',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data) {
|
||||
this.levelList = res.data;
|
||||
this.levelId = this.memberInfo.member_level;
|
||||
for (let i = 0; i < this.levelList.length; i++) {
|
||||
if (this.levelList[i].level_id == this.levelId) {
|
||||
this.curIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
choice(index) {
|
||||
this.choiceIndex = index;
|
||||
},
|
||||
/**
|
||||
* 创建
|
||||
*/
|
||||
create() {
|
||||
if (this.memberInfo.member_level_type && this.memberInfo.member_level != this.currCard.level_id) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您有尚未过期的会员卡,再次购卡会覆盖掉之前的卡,是否继续?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$refs.choosePaymentPopup.open();
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$refs.choosePaymentPopup.open();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
toPay() {
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
|
||||
this.$api.sendRequest({
|
||||
url: '/supermember/api/ordercreate/create',
|
||||
data: {
|
||||
level_id: this.currCard.level_id,
|
||||
period_unit: this.currCard.charge_rule_arr[this.choiceIndex].key
|
||||
},
|
||||
success: res => {
|
||||
if (res.data && res.code == 0) {
|
||||
this.outTradeNo = res.data.out_trade_no;
|
||||
uni.setStorageSync('paySource', 'membercard');
|
||||
this.$refs.choosePaymentPopup.getPayInfo(this.outTradeNo);
|
||||
} else {
|
||||
this.isSub = false;
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
headimgError() {
|
||||
this.memberInfo.headimg = this.$util.getDefaultImage().head;
|
||||
},
|
||||
/**
|
||||
* 打开说明弹出层
|
||||
*/
|
||||
openExplainPopup() {
|
||||
this.$refs.explainPopup.open();
|
||||
},
|
||||
/**
|
||||
* 打开说明弹出层
|
||||
*/
|
||||
closeExplainPopup() {
|
||||
this.$refs.explainPopup.close();
|
||||
},
|
||||
getAgreement() {
|
||||
this.$api.sendRequest({
|
||||
url: '/supermember/api/membercard/agreement',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data && res.data.title != '' && res.data.content != '') {
|
||||
this.agreement = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
return true;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/card.scss';
|
||||
@import './public/css/card.scss';
|
||||
</style>
|
||||
@@ -1,19 +1,24 @@
|
||||
<template>
|
||||
<view :style="themeColor">
|
||||
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh" v-if="storeToken">
|
||||
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh"
|
||||
v-if="storeToken">
|
||||
<view class="goods_list" slot="list">
|
||||
<block v-if="collectionList.length > 0">
|
||||
<view class="goods_li margin-top" v-for="(item, index) in collectionList" :key="index" @click.stop="toDetail(item)">
|
||||
<view class="goods_li margin-top" v-for="(item, index) in collectionList" :key="index"
|
||||
@click.stop="toDetail(item)">
|
||||
<view class="pic">
|
||||
<image :src="$util.img(item.goods_image.split(',')[0], { size: 'mid' })" mode="aspectFill" @error="goodsImageError(index)"></image>
|
||||
<image :src="$util.img(item.goods_image.split(',')[0], { size: 'mid' })" mode="aspectFill"
|
||||
@error="goodsImageError(index)"></image>
|
||||
</view>
|
||||
<view class="goods_info">
|
||||
<view class="goods_name font-size-base">{{ item.sku_name }}</view>
|
||||
<view class="goods_opection">
|
||||
<view class="left lineheight-clear ">
|
||||
<text class="symbol price-style small">¥</text>
|
||||
<text class="price price-style large">{{ parseFloat(item.discount_price).toFixed(2).split('.')[0] }}</text>
|
||||
<text class="symbol price-style small">.{{ parseFloat(item.discount_price).toFixed(2).split('.')[1] }}</text>
|
||||
<text class="price price-style large">{{
|
||||
parseFloat(item.discount_price).toFixed(2).split('.')[0] }}</text>
|
||||
<text class="symbol price-style small">.{{
|
||||
parseFloat(item.discount_price).toFixed(2).split('.')[1] }}</text>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="cars" @click.stop="deleteItem(item.goods_id)">
|
||||
@@ -35,65 +40,57 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
import collection from './public/js/collection.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsGoodsRecommend,
|
||||
nsEmpty,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
MescrollUni,
|
||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue')
|
||||
// #endif
|
||||
},
|
||||
mixins: [collection],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/collection');
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
mixins: [collection],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/collection');
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function (nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .fixed {
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
/deep/ .fixed {
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/deep/ .empty {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
/deep/ .empty {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
@import './public/css/collection.scss';
|
||||
@import './public/css/collection.scss';
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
</style>
|
||||
@@ -10,8 +10,8 @@ export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onLoad(options) {},
|
||||
onShow() {},
|
||||
onLoad(options) { },
|
||||
onShow() { },
|
||||
methods: {}
|
||||
};
|
||||
</script>
|
||||
@@ -21,6 +21,7 @@ export default {
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
|
||||
image {
|
||||
width: 500rpx;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,12 @@
|
||||
<view :style="themeColor" :class="isIphoneX ? 'iphone-x' : ''">
|
||||
<view class="cf-container color-line-border" v-if="storeToken">
|
||||
<view class="tab">
|
||||
<view @click="changeState(1)"><text :class="state == 1 ? 'color-base-text active color-base-border-bottom' : ''">未使用</text></view>
|
||||
<view @click="changeState(2)"><text :class="state == 2 ? 'color-base-text active color-base-border-bottom' : ''">已使用</text></view>
|
||||
<view @click="changeState(3)"><text :class="state == 3 ? 'color-base-text active color-base-border-bottom' : ''">已过期</text></view>
|
||||
<view @click="changeState(1)"><text
|
||||
:class="state == 1 ? 'color-base-text active color-base-border-bottom' : ''">未使用</text></view>
|
||||
<view @click="changeState(2)"><text
|
||||
:class="state == 2 ? 'color-base-text active color-base-border-bottom' : ''">已使用</text></view>
|
||||
<view @click="changeState(3)"><text
|
||||
:class="state == 3 ? 'color-base-text active color-base-border-bottom' : ''">已过期</text></view>
|
||||
</view>
|
||||
<!-- <view class="coupon-head">
|
||||
<view class="sort" :class="sort == 1 ? 'color-base-border color-base-text' : ''" @click="changeSort(1, '')">全部</view>
|
||||
@@ -17,9 +20,12 @@
|
||||
<mescroll-uni ref="mescroll" top="100" @getData="getMemberCounponList" v-if="storeToken">
|
||||
<block slot="list">
|
||||
<view class="coupon-listone">
|
||||
<view class="item" :class="['item',item.state != 1&&'item-disabled']" v-for="(item, index) in list" :key="index" @click="toGoodsList(item)" :style="{ backgroundColor: item.state != 1 ? '#FFF' : 'var(--main-color-shallow)' }">
|
||||
<view class="item" :class="['item', item.state != 1 && 'item-disabled']" v-for="(item, index) in list"
|
||||
:key="index" @click="toGoodsList(item)"
|
||||
:style="{ backgroundColor: item.state != 1 ? '#FFF' : 'var(--main-color-shallow)' }">
|
||||
<view class="item-base">
|
||||
<image class="coupon-line" mode="heightFix" :src="$util.img('public/uniapp/coupon/coupon_line.png')"/>
|
||||
<image class="coupon-line" mode="heightFix"
|
||||
:src="$util.img('public/uniapp/coupon/coupon_line.png')" />
|
||||
<view>
|
||||
<view class="use_price " v-if="item.type == 'divideticket'">
|
||||
<text>¥</text>
|
||||
@@ -41,10 +47,13 @@
|
||||
<view class="item-info">
|
||||
<view class="use_title">
|
||||
<view class="title">{{ item.coupon_name }}</view>
|
||||
<view class="max_price" v-if="item.goods_type == 2 || item.goods_type == 3" :class="{ disabled: item.state == 3 }">指定商品</view>
|
||||
<view class="max_price" v-if="item.discount_limit != '0.00'">(最大优惠{{ item.discount_limit }}元)</view>
|
||||
<view class="max_price" :class="{ disabled: item.useState == 2 }">{{ item.use_channel_name }}</view>
|
||||
<!-- <view class="max_price truncate" v-if="item.use_channel!='online'" :class="{ disabled: item.useState == 2 }">
|
||||
<view class="max_price" v-if="item.goods_type == 2 || item.goods_type == 3"
|
||||
:class="{ disabled: item.state == 3 }">指定商品</view>
|
||||
<view class="max_price" v-if="item.discount_limit != '0.00'">(最大优惠{{ item.discount_limit
|
||||
}}元)</view>
|
||||
<view class="max_price" :class="{ disabled: item.useState == 2 }">{{
|
||||
item.use_channel_name }}</view>
|
||||
<!-- <view class="max_price truncate" v-if="item.use_channel!='online'" :class="{ disabled: item.useState == 2 }">
|
||||
{{ item.use_store==='all'?'适用门店:全部门店': '适用门店:'+item.use_store_name}}
|
||||
</view> -->
|
||||
</view>
|
||||
@@ -60,7 +69,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="!list.length && showEmpty" class="margin-top cart-empty" :fixed="false">
|
||||
<ns-empty :isIndex="true" :emptyBtn="{url: '/pages/index/index',text: '去逛逛'}" text="暂无优惠券"></ns-empty>
|
||||
<ns-empty :isIndex="true" :emptyBtn="{ url: '/pages/index/index', text: '去逛逛' }"
|
||||
text="暂无优惠券"></ns-empty>
|
||||
</view>
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
@@ -70,347 +80,342 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsEmpty,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
MescrollUni,
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue')
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: '',
|
||||
types: '',
|
||||
state: 1,
|
||||
sort: 1,
|
||||
list: [],
|
||||
isIphoneX: false, //判断手机是否是iphoneX以上
|
||||
showEmpty: false,
|
||||
related_id: 0
|
||||
};
|
||||
},
|
||||
onLoad(data) {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.coupon) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启优惠券',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
return {
|
||||
type: '',
|
||||
types: '',
|
||||
state: 1,
|
||||
sort: 1,
|
||||
list: [],
|
||||
isIphoneX: false, //判断手机是否是iphoneX以上
|
||||
showEmpty: false,
|
||||
related_id: 0
|
||||
};
|
||||
},
|
||||
onLoad(data) {
|
||||
setTimeout(() => {
|
||||
if (!this.addonIsExist.coupon) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启优惠券',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
if (data.related_id) this.related_id = data.related_id ? data.related_id : 0;
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
if (data.related_id) this.related_id = data.related_id ? data.related_id : 0;
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/coupon');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//切换状态
|
||||
changeState(state) {
|
||||
this.list = [];
|
||||
this.state = state;
|
||||
this.$refs.mescroll.refresh(false);
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/coupon');
|
||||
});
|
||||
}
|
||||
changeSort(sort, types) {
|
||||
this.list = [];
|
||||
this.sort = sort;
|
||||
this.types = types;
|
||||
this.$refs.mescroll.refresh(false);
|
||||
},
|
||||
methods: {
|
||||
//切换状态
|
||||
changeState(state) {
|
||||
this.list = [];
|
||||
this.state = state;
|
||||
this.$refs.mescroll.refresh(false);
|
||||
},
|
||||
changeSort(sort, types) {
|
||||
this.list = [];
|
||||
this.sort = sort;
|
||||
this.types = types;
|
||||
this.$refs.mescroll.refresh(false);
|
||||
},
|
||||
getMemberCounponList(mescroll) {
|
||||
this.showEmpty = false;
|
||||
this.$api.sendRequest({
|
||||
url: '/coupon/api/coupon/memberpage',
|
||||
data: {
|
||||
page: mescroll.num,
|
||||
page_size: mescroll.size,
|
||||
state: this.state,
|
||||
is_own: this.type,
|
||||
type: this.types,
|
||||
related_id: this.related_id
|
||||
},
|
||||
success: res => {
|
||||
this.showEmpty = true;
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) {
|
||||
this.list = []; //如果是第一页需手动制空列表
|
||||
this.related_id = 0;
|
||||
}
|
||||
this.list = this.list.concat(newArr); //追加新数据
|
||||
let data = res.data;
|
||||
if (data) this.couponList = data;
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
getMemberCounponList(mescroll) {
|
||||
this.showEmpty = false;
|
||||
this.$api.sendRequest({
|
||||
url: '/coupon/api/coupon/memberpage',
|
||||
data: {
|
||||
page: mescroll.num,
|
||||
page_size: mescroll.size,
|
||||
state: this.state,
|
||||
is_own: this.type,
|
||||
type: this.types,
|
||||
related_id: this.related_id
|
||||
},
|
||||
success: res => {
|
||||
this.showEmpty = true;
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
imageError(index) {
|
||||
this.list[index].logo = this.$util.getDefaultImage().goods;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
toGoodsList(item) {
|
||||
if (item.state == 1) {
|
||||
this.$util.redirectTo('/pages_goods/list', {
|
||||
coupon: item.coupon_type_id
|
||||
});
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) {
|
||||
this.list = []; //如果是第一页需手动制空列表
|
||||
this.related_id = 0;
|
||||
}
|
||||
this.list = this.list.concat(newArr); //追加新数据
|
||||
let data = res.data;
|
||||
if (data) this.couponList = data;
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
imageError(index) {
|
||||
this.list[index].logo = this.$util.getDefaultImage().goods;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
toGoodsList(item) {
|
||||
if (item.state == 1) {
|
||||
this.$util.redirectTo('/pages_goods/list', {
|
||||
coupon: item.coupon_type_id
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
storeToken: function (nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cart-empty {
|
||||
margin-top: 208rpx !important;
|
||||
.cart-empty {
|
||||
margin-top: 208rpx !important;
|
||||
}
|
||||
|
||||
.active {
|
||||
border-bottom: 4rpx solid;
|
||||
}
|
||||
|
||||
.coupon-head {
|
||||
display: flex;
|
||||
background: #fff;
|
||||
padding: 20rpx 50rpx;
|
||||
|
||||
.sort {
|
||||
border: 2rpx solid #c5c5c5;
|
||||
padding: 1rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
cursor: pointer;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
border-bottom: 4rpx solid;
|
||||
}
|
||||
.cf-container {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.coupon-head {
|
||||
display: flex;
|
||||
background: #fff;
|
||||
padding: 20rpx 50rpx;
|
||||
.tab {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 86rpx;
|
||||
|
||||
.sort {
|
||||
border: 2rpx solid #c5c5c5;
|
||||
padding: 1rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
cursor: pointer;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cf-container {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tab {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
>view {
|
||||
text-align: center;
|
||||
width: 33%;
|
||||
height: 86rpx;
|
||||
|
||||
>view {
|
||||
text-align: center;
|
||||
width: 33%;
|
||||
height: 86rpx;
|
||||
|
||||
text {
|
||||
display: inline-block;
|
||||
line-height: 86rpx;
|
||||
height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
text {
|
||||
display: inline-block;
|
||||
line-height: 86rpx;
|
||||
height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.coupon-listone {
|
||||
margin: 0 30rpx;
|
||||
.coupon-listone {
|
||||
margin: 0 30rpx;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
background-color: #fff2f0;
|
||||
.item {
|
||||
display: flex;
|
||||
background-color: #fff2f0;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 20rpx;
|
||||
align-items: stretch;
|
||||
margin-top: $padding;
|
||||
overflow: hidden;
|
||||
|
||||
&.item-disabled {
|
||||
.item-base {
|
||||
background: #e7e7e7 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.item-base {
|
||||
position: relative;
|
||||
width: 197rpx;
|
||||
min-width: 197rpx;
|
||||
text-align: center;
|
||||
background: linear-gradient(to left, var(--bg-color), var(--bg-color-shallow));
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 20rpx;
|
||||
align-items: stretch;
|
||||
margin-top: $padding;
|
||||
overflow: hidden;
|
||||
padding: 38rpx 10rpx 38rpx 18rpx;
|
||||
|
||||
&.item-disabled {
|
||||
.item-base {
|
||||
background: #e7e7e7 !important;
|
||||
}
|
||||
&.disabled {
|
||||
background: #dedede;
|
||||
}
|
||||
|
||||
.item-base {
|
||||
.coupon-line {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
>view {
|
||||
width: calc(100%);
|
||||
height: auto;
|
||||
position: relative;
|
||||
width: 197rpx;
|
||||
min-width: 197rpx;
|
||||
text-align: center;
|
||||
background: linear-gradient(to left, var(--bg-color), var(--bg-color-shallow));
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
padding: 38rpx 10rpx 38rpx 18rpx;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
}
|
||||
|
||||
.use_price {
|
||||
font-size: 60rpx;
|
||||
line-height: 1;
|
||||
color: #fff;
|
||||
|
||||
text {
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
background: #dedede;
|
||||
}
|
||||
|
||||
.coupon-line {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
>view {
|
||||
width: calc(100%);
|
||||
height: auto;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
}
|
||||
|
||||
.use_price {
|
||||
font-size: 60rpx;
|
||||
line-height: 1;
|
||||
color: #fff;
|
||||
|
||||
text {
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
.use_condition {
|
||||
color: #fff;
|
||||
margin-top: $padding;
|
||||
|
||||
&.margin_top_none {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: #f8f8f8;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
height: 30rpx;
|
||||
width: 15rpx;
|
||||
border-radius: 0 30rpx 30rpx 0;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
.item-btn {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
min-width: 160rpx;
|
||||
align-self: center;
|
||||
.use_condition {
|
||||
color: #fff;
|
||||
margin-top: $padding;
|
||||
|
||||
view {
|
||||
width: 100rpx;
|
||||
height: 50rpx;
|
||||
border-radius: $border-radius;
|
||||
line-height: 50rpx;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
background-image: linear-gradient(to right, var(--bg-color), var(--bg-color-shallow));
|
||||
color: var(--btn-text-color);
|
||||
;
|
||||
&.margin_top_none {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: #f8f8f8;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
height: 30rpx;
|
||||
width: 15rpx;
|
||||
border-radius: 0 30rpx 30rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
.item-btn {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
min-width: 160rpx;
|
||||
align-self: center;
|
||||
|
||||
view {
|
||||
width: 100rpx;
|
||||
height: 50rpx;
|
||||
border-radius: $border-radius;
|
||||
line-height: 50rpx;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
background-image: linear-gradient(to right, var(--bg-color), var(--bg-color-shallow));
|
||||
color: var(--btn-text-color);
|
||||
;
|
||||
font-size: $font-size-tag;
|
||||
|
||||
&.disabled {
|
||||
background: $color-line !important;
|
||||
color: $color-tip !important;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: #f8f8f8;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
height: 30rpx;
|
||||
width: 15rpx;
|
||||
border-radius: 30rpx 0 0 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-left: $padding;
|
||||
overflow: hidden;
|
||||
background-repeat-x: no-repeat;
|
||||
background-repeat-y: repeat;
|
||||
|
||||
.use_time {
|
||||
padding: $padding 0;
|
||||
border-top: 2rpx dashed #cccccc;
|
||||
font-size: $font-size-activity-tag;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.use_title {
|
||||
font-size: $font-size-base;
|
||||
font-weight: 500;
|
||||
padding: $padding 0;
|
||||
|
||||
.title {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.max_price {
|
||||
font-weight: 400;
|
||||
font-size: $font-size-tag;
|
||||
|
||||
&.disabled {
|
||||
background: $color-line !important;
|
||||
color: $color-tip !important;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: #f8f8f8;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
height: 30rpx;
|
||||
width: 15rpx;
|
||||
border-radius: 30rpx 0 0 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-left: $padding;
|
||||
overflow: hidden;
|
||||
background-repeat-x: no-repeat;
|
||||
background-repeat-y: repeat;
|
||||
|
||||
.use_time {
|
||||
padding: $padding 0;
|
||||
border-top: 2rpx dashed #cccccc;
|
||||
font-size: $font-size-activity-tag;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.use_title {
|
||||
font-size: $font-size-base;
|
||||
font-weight: 500;
|
||||
padding: $padding 0;
|
||||
|
||||
.title {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.max_price {
|
||||
font-weight: 400;
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.truncate {
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.truncate {
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
@@ -10,11 +10,14 @@
|
||||
<view class="datetime">{{ datetime(item) }}</view>
|
||||
<view class="goods-item" :class="{ manage: manage }">
|
||||
<view class="checkbox-wrap" v-if="manage" @click="singleElection(item)">
|
||||
<text class="iconfont" :class="$util.inArray(item.id, idArr) != -1 ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></text>
|
||||
<text class="iconfont"
|
||||
:class="$util.inArray(item.id, idArr) != -1 ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></text>
|
||||
</view>
|
||||
<view class="goods-img" @click="toDetail(item)">
|
||||
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)"></image>
|
||||
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}</view>
|
||||
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)">
|
||||
</image>
|
||||
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-wrap" @click="toDetail(item)">
|
||||
<view class="name-wrap">
|
||||
@@ -24,22 +27,28 @@
|
||||
<view class="lineheight-clear">
|
||||
<view class="discount-price">
|
||||
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="price price-style large">{{ parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}</text>
|
||||
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||
<text class="price price-style large">{{
|
||||
parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}</text>
|
||||
<text class="unit price-style small">.{{
|
||||
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||
</view>
|
||||
<view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)">
|
||||
<view class="member-price-tag"
|
||||
v-if="item.member_price && item.member_price == showPrice(item)">
|
||||
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="member-price-tag" v-else-if="item.promotion_type == 1">
|
||||
<image :src="$util.img('public/uniapp/index/discount.png')" mode="widthFix"></image>
|
||||
<image :src="$util.img('public/uniapp/index/discount.png')" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pro-info">
|
||||
<view class="delete-price font-size-activity-tag color-tip price-font" v-if="showMarketPrice(item)">
|
||||
<view class="delete-price font-size-activity-tag color-tip price-font"
|
||||
v-if="showMarketPrice(item)">
|
||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text>{{ showMarketPrice(item) }}</text>
|
||||
</view>
|
||||
<view class="sale font-size-activity-tag color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit ? item.unit : '件' }}</view>
|
||||
<view class="sale font-size-activity-tag color-tip" v-if="item.sale_show">已售{{
|
||||
item.sale_num }}{{ item.unit ? item.unit : '件' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -49,10 +58,12 @@
|
||||
|
||||
<view class="bottom-wrap" v-if="goodsList.length && manage">
|
||||
<view class="all-election" @click="allElection">
|
||||
<view class="iconfont" :class="isAll ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
|
||||
<view class="iconfont"
|
||||
:class="isAll ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
|
||||
<text>全选</text>
|
||||
</view>
|
||||
<view class="action-btn"><button type="primary" @click="deleteFootprint()" class="delete" :class="{ disabled: selected }">删除</button></view>
|
||||
<view class="action-btn"><button type="primary" @click="deleteFootprint()" class="delete"
|
||||
:class="{ disabled: selected }">删除</button></view>
|
||||
</view>
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
@@ -64,22 +75,15 @@
|
||||
|
||||
<script>
|
||||
var dateList = [];
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsEmpty,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
MescrollUni,
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue')
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
@@ -179,8 +183,8 @@ export default {
|
||||
let imgs = imgStr.split(',');
|
||||
return imgs[0]
|
||||
? this.$util.img(imgs[0], {
|
||||
size: 'mid'
|
||||
})
|
||||
size: 'mid'
|
||||
})
|
||||
: this.$util.getDefaultImage().goods;
|
||||
},
|
||||
imgError(index) {
|
||||
@@ -250,7 +254,7 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
storeToken: function (nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<!-- 退出登录和账号注销按钮 -->
|
||||
<view class="action-buttons" v-if="storeToken">
|
||||
<view class="action-btn cancel-btn" @click="cancellation">{{ $lang('cancellation') }}</view>
|
||||
<view class="action-btn logout-btn" @click="logout">{{ $lang('logout') }}</view>
|
||||
<view class="action-btn logout-btn" @click="logout">{{ $lang('logout') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -74,15 +74,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import nsNavbar from '@/components/ns-navbar/ns-navbar.vue';
|
||||
|
||||
import diyJs from '@/common/js/diy.js';
|
||||
import indexJs from './public/js/index.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniPopup,
|
||||
nsNavbar
|
||||
diyGroup: () => import('@/components-diy/diy-group.vue'),
|
||||
diyBottomNav: () => import('@/components-diy/diy-bottom-nav.vue'),
|
||||
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
nsNavbar: () => import('@/components/ns-navbar/ns-navbar.vue'),
|
||||
nsCopyright: () => import('@/components/ns-copyright/ns-copyright.vue'),
|
||||
nsBirthdayGift: () => import('@/components/ns-birthday-gift/ns-birthday-gift.vue'),
|
||||
nsNewGift: () => import('@/components/ns-new-gift/ns-new-gift.vue'),
|
||||
hoverNav: () => import('@/components/hover-nav/hover-nav.vue'),
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
mixins: [diyJs, indexJs],
|
||||
methods: {
|
||||
@@ -156,7 +166,6 @@ export default {
|
||||
color: #F4391c
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
@@ -164,33 +173,14 @@ export default {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.choose-store>>>.goodslist-uni-popup-box {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
/deep/ .placeholder {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/deep/::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
background-color: transparent;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -216,7 +206,28 @@ export default {
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
background-color:var(--main-color);
|
||||
background-color: var(--main-color);
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .diy-index-page .uni-popup .uni-popup__wrapper-box {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/deep/ .placeholder {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/deep/::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
background-color: transparent;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,21 +2,22 @@
|
||||
<view :style="themeColor">
|
||||
<view v-if="indent == 'all' && memberInfo" class="info-wrap">
|
||||
<!-- 头像@click="headImage" -->
|
||||
<view class="info-list-cell info-item info-list-con" hover-class="cell-hover">
|
||||
<view class="info-list-cell info-item info-list-con" hover-class="cell-hover">
|
||||
<text class="cell-tit">头像</text>
|
||||
<view class="info-list-head cell-tip">
|
||||
<image :src="memberInfo.headimg ? $util.img(memberInfo.headimg) : $util.getDefaultImage().head" @error="memberInfo.headimg = $util.getDefaultImage().head" mode="aspectFill" />
|
||||
<image :src="memberInfo.headimg ? $util.img(memberInfo.headimg) : $util.getDefaultImage().head"
|
||||
@error="memberInfo.headimg = $util.getDefaultImage().head" mode="aspectFill" />
|
||||
</view>
|
||||
<text style="margin-right: 20rpx;"></text>
|
||||
</view>
|
||||
<!-- 账号 -->
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" v-if="memberInfo.is_edit_username == 1" @click="modifyInfo('username')">
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" v-if="memberInfo.is_edit_username == 1" @click="modifyInfo('username')">
|
||||
<text class="cell-tit">账号</text>
|
||||
<text class="cell-tip">{{ memberInfoformData.number }}</text>
|
||||
<text class="cell-more"></text>
|
||||
</view> -->
|
||||
<!-- 账号 -->
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" v-else>
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" v-else>
|
||||
<text class="cell-tit">{{ $lang('account') }}</text>
|
||||
<text class="cell-tip cell-tip1">{{ memberInfoformData.number }}</text>
|
||||
</view> -->
|
||||
@@ -52,7 +53,7 @@
|
||||
<text class="cell-more"></text>
|
||||
</view>
|
||||
<!-- 密码 -->
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('password')">
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('password')">
|
||||
<text class="cell-tit">密码</text>
|
||||
<text class="cell-more"></text>
|
||||
</view> -->
|
||||
@@ -62,7 +63,7 @@
|
||||
<text class="cell-more"></text>
|
||||
</view> -->
|
||||
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('address')">
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('address')">
|
||||
<text class="cell-tit">所在地址</text>
|
||||
<text class="cell-tip" v-if="memberInfo.full_address">{{ memberInfo.full_address }}
|
||||
{{ memberInfo.address }}</text>
|
||||
@@ -75,11 +76,11 @@
|
||||
<text class="cell-tit">注销账号</text>
|
||||
<text class="cell-more"></text>
|
||||
</view>
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" @click="cancellation()" v-if="addonIsExist.membercancel && memberConfig.is_enable == 1">
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" @click="cancellation()" v-if="addonIsExist.membercancel && memberConfig.is_enable == 1">
|
||||
<text class="cell-tit">注销账号</text>
|
||||
<text class="cell-more"></text>
|
||||
</view> -->
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover">
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover">
|
||||
<text class="cell-tit">版本号</text>
|
||||
<text class="cell-tip cell-tip1">{{ version }}</text>
|
||||
</view> -->
|
||||
@@ -107,227 +108,227 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniNavBar from '@/pages_tool/components/uni-nav-bar/uni-nav-bar.vue';
|
||||
import info from './public/js/info.js';
|
||||
import info from './public/js/info.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniNavBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
version: ''
|
||||
};
|
||||
},
|
||||
mixins: [info],
|
||||
onLoad(data) {
|
||||
this.version = this.$config.version;
|
||||
},
|
||||
};
|
||||
export default {
|
||||
components: {
|
||||
uniNavBar: () => import('@/pages_tool/components/uni-nav-bar/uni-nav-bar.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
version: ''
|
||||
};
|
||||
},
|
||||
mixins: [info],
|
||||
onLoad(data) {
|
||||
this.version = this.$config.version;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.info-head {
|
||||
.head-nav {
|
||||
width: 100%;
|
||||
height: var(--status-bar-height);
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.head-nav.active {
|
||||
padding-top: 40rpx;
|
||||
}
|
||||
.info-head {
|
||||
.head-nav {
|
||||
width: 100%;
|
||||
height: var(--status-bar-height);
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.captcha {
|
||||
width: 170rpx;
|
||||
height: 50rpx;
|
||||
.head-nav.active {
|
||||
padding-top: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.captcha {
|
||||
width: 170rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.info-list-cell {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 24rpx 30rpx;
|
||||
position: relative;
|
||||
line-height: 50rpx;
|
||||
background-color: #fff;
|
||||
|
||||
&:first-child {
|
||||
padding: 28rpx 30rpx;
|
||||
}
|
||||
|
||||
.info-list-cell {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 24rpx 30rpx;
|
||||
position: relative;
|
||||
line-height: 50rpx;
|
||||
background-color: #fff;
|
||||
.cell-tit {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
padding: 28rpx 30rpx;
|
||||
}
|
||||
.cell-tip1 {
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
&.log-out-btn {
|
||||
margin-top: 40rpx;
|
||||
|
||||
.cell-tit {
|
||||
white-space: nowrap;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.info-list-head {
|
||||
border: 1rpx solid $color-line;
|
||||
width: 82rpx;
|
||||
height: 82rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.info-list-head image {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
// #ifdef MP
|
||||
&.info-item {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
// #endif
|
||||
|
||||
&.info-list-con~&.info-list-con:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
right: 30rpx;
|
||||
top: 0;
|
||||
border-bottom: 1rpx solid $color-line;
|
||||
}
|
||||
|
||||
.cell-tip {
|
||||
margin-left: auto;
|
||||
color: $color-tip;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 470rpx;
|
||||
}
|
||||
|
||||
.cell-more {
|
||||
margin-left: 10rpx;
|
||||
width: 32rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-more:after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
|
||||
border: 2rpx solid darken($color-line, 20%) {
|
||||
right-color: transparent;
|
||||
bottom-color: transparent;
|
||||
}
|
||||
|
||||
.cell-tip1 {
|
||||
margin-right: 40rpx;
|
||||
transform: rotate(135deg);
|
||||
}
|
||||
}
|
||||
|
||||
.edit-info-box {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 40rpx;
|
||||
min-height: 50rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.info-name {
|
||||
width: 150rpx;
|
||||
font-size: $font-size-base;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
width: 0;
|
||||
font-size: $font-size-base;
|
||||
padding: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.dynacode {
|
||||
margin: 0;
|
||||
padding: 0 10rpx;
|
||||
width: 250rpx;
|
||||
height: 60rpx;
|
||||
font-size: $font-size-base;
|
||||
line-height: 60rpx;
|
||||
color: #fff;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.edit-sex-list {
|
||||
display: flex;
|
||||
|
||||
label {
|
||||
display: flex;
|
||||
margin-left: 30rpx;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
&.log-out-btn {
|
||||
margin-top: 40rpx;
|
||||
uni-radio .uni-radio-input {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cell-tit {
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
.set-pass-tips {
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.info-list-head {
|
||||
border: 1rpx solid $color-line;
|
||||
width: 82rpx;
|
||||
height: 82rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.input-len {
|
||||
width: 500rpx !important;
|
||||
}
|
||||
|
||||
.info-list-head image {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
.save-item {
|
||||
margin: 50rpx auto;
|
||||
|
||||
// #ifdef MP
|
||||
&.info-item {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
button {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// #endif
|
||||
.empty {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
justify-content: center;
|
||||
padding-top: 80rpx;
|
||||
|
||||
&.info-list-con~&.info-list-con:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
right: 30rpx;
|
||||
top: 0;
|
||||
border-bottom: 1rpx solid $color-line;
|
||||
}
|
||||
.empty_img {
|
||||
width: 63%;
|
||||
height: 450rpx;
|
||||
|
||||
.cell-tip {
|
||||
margin-left: auto;
|
||||
color: $color-tip;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 470rpx;
|
||||
}
|
||||
|
||||
.cell-more {
|
||||
margin-left: 10rpx;
|
||||
width: 32rpx;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-more:after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
|
||||
border: 2rpx solid darken($color-line, 20%) {
|
||||
right-color: transparent;
|
||||
bottom-color: transparent;
|
||||
}
|
||||
|
||||
transform: rotate(135deg);
|
||||
}
|
||||
}
|
||||
|
||||
.edit-info-box {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 40rpx;
|
||||
min-height: 50rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.info-name {
|
||||
width: 150rpx;
|
||||
font-size: $font-size-base;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
width: 0;
|
||||
font-size: $font-size-base;
|
||||
padding: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.dynacode {
|
||||
margin: 0;
|
||||
padding: 0 10rpx;
|
||||
width: 250rpx;
|
||||
height: 60rpx;
|
||||
font-size: $font-size-base;
|
||||
line-height: 60rpx;
|
||||
color: #fff;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.edit-sex-list {
|
||||
display: flex;
|
||||
|
||||
label {
|
||||
display: flex;
|
||||
margin-left: 30rpx;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
uni-radio .uni-radio-input {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 190rpx;
|
||||
color: $color-tip;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.set-pass-tips {
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.input-len {
|
||||
width: 500rpx !important;
|
||||
}
|
||||
|
||||
.save-item {
|
||||
margin: 50rpx auto;
|
||||
|
||||
button {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
justify-content: center;
|
||||
padding-top: 80rpx;
|
||||
|
||||
.empty_img {
|
||||
width: 63%;
|
||||
height: 450rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 190rpx;
|
||||
color: $color-tip;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
button {
|
||||
min-width: 300rpx;
|
||||
margin-top: 100rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
button {
|
||||
min-width: 300rpx;
|
||||
margin-top: 100rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -5,7 +5,8 @@
|
||||
<view v-if="indent == 'username'" class="edit-info">
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">用户名</text>
|
||||
<input class="uni-input info-content input-len" type="text" maxlength="30" placeholder="请输入" v-model="formData.username" />
|
||||
<input class="uni-input info-content input-len" type="text" maxlength="30" placeholder="请输入"
|
||||
v-model="formData.username" />
|
||||
</view>
|
||||
<view class="color-tip font-size-goods-tag set-pass-tips">用户名仅可修改一次,请谨慎设置</view>
|
||||
<view class="save-item" @click="save('username')">
|
||||
@@ -16,7 +17,8 @@
|
||||
<view v-if="indent == 'name'" class="edit-info">
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">昵称</text>
|
||||
<input class="uni-input info-content input-len" type="text" maxlength="30" placeholder="请输入" v-model="formData.nickName" />
|
||||
<input class="uni-input info-content input-len" type="text" maxlength="30" placeholder="请输入"
|
||||
v-model="formData.nickName" />
|
||||
</view>
|
||||
<view class="save-item" @click="save('name')">
|
||||
<button type="primary">保存</button>
|
||||
@@ -26,7 +28,8 @@
|
||||
<view v-if="indent == 'realName'" class="edit-info">
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">姓名</text>
|
||||
<input class="uni-input info-content input-len" type="text" maxlength="30" placeholder="请输入" v-model="formData.realName" />
|
||||
<input class="uni-input info-content input-len" type="text" maxlength="30" placeholder="请输入"
|
||||
v-model="formData.realName" />
|
||||
</view>
|
||||
<view class="save-item" @click="save('realName')">
|
||||
<button type="primary">保存</button>
|
||||
@@ -39,7 +42,8 @@
|
||||
<radio-group @change="radioChange" class="edit-sex-list">
|
||||
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
|
||||
<view>
|
||||
<radio :color="themeStyle.main_color" :value="item.value" :checked="index === formData.sex" />
|
||||
<radio :color="themeStyle.main_color" :value="item.value"
|
||||
:checked="index === formData.sex" />
|
||||
</view>
|
||||
<view>{{ item.name }}</view>
|
||||
</label>
|
||||
@@ -53,7 +57,8 @@
|
||||
<view v-if="indent == 'birthday'" class="edit-info edit-birthday-list">
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">生日</text>
|
||||
<picker mode="date" :value="formData.birthday" :start="startDate" :end="endDate" @change="bindDateChange">
|
||||
<picker mode="date" :value="formData.birthday" :start="startDate" :end="endDate"
|
||||
@change="bindDateChange">
|
||||
<view class="uni-input">{{ formData.birthday ? formData.birthday : '请选择生日' }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
@@ -69,35 +74,42 @@
|
||||
<image :src="$util.img('public/uniapp/common/common-empty.png')" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="color-tip margin-top margin-bottom">请先绑定手机再执行该操作</view>
|
||||
<button type="primary" size="mini" class="mini button color-base-bg" @click="modifyInfo('mobile')">立即绑定</button>
|
||||
<button type="primary" size="mini" class="mini button color-base-bg"
|
||||
@click="modifyInfo('mobile')">立即绑定</button>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="edit-info-box" v-if="memberInfo.password">
|
||||
<text class="info-name">原密码</text>
|
||||
<input class="uni-input info-content input-len" type="password" maxlength="30" placeholder="请输入" v-model="formData.currentPassword" />
|
||||
<input class="uni-input info-content input-len" type="password" maxlength="30" placeholder="请输入"
|
||||
v-model="formData.currentPassword" />
|
||||
</view>
|
||||
<block v-else>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">新密码</text>
|
||||
<input class="uni-input info-content" type="number" maxlength="4" placeholder="请输入" v-model="formData.mobileVercode" />
|
||||
<input class="uni-input info-content" type="number" maxlength="4" placeholder="请输入"
|
||||
v-model="formData.mobileVercode" />
|
||||
<image :src="captcha.img" class="captcha" @click="getCaptcha"></image>
|
||||
</view>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">再次输入</text>
|
||||
<input class="uni-input info-content" type="number" maxlength="6" placeholder="请输入" v-model="formData.mobileDynacode" />
|
||||
<button type="primary" class="dynacode" @click="passwordMoblieCode()">{{ formData.mobileCodeText }}</button>
|
||||
<input class="uni-input info-content" type="number" maxlength="6" placeholder="请输入"
|
||||
v-model="formData.mobileDynacode" />
|
||||
<button type="primary" class="dynacode" @click="passwordMoblieCode()">{{
|
||||
formData.mobileCodeText }}</button>
|
||||
</view>
|
||||
<view class="color-tip font-size-goods-tag set-pass-tips">
|
||||
点击“获取动态码”,将会向您已绑定的手机号{{ memberInfoformData.mobile | mobile }}发送验证码</view>
|
||||
</block>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">新密码</text>
|
||||
<input class="uni-input info-content input-len" type="password" maxlength="30" placeholder="请输入" v-model="formData.newPassword" />
|
||||
<input class="uni-input info-content input-len" type="password" maxlength="30" placeholder="请输入"
|
||||
v-model="formData.newPassword" />
|
||||
</view>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">再次输入</text>
|
||||
<input class="uni-input info-content input-len" type="password" maxlength="30" placeholder="请输入" v-model="formData.confirmPassword" />
|
||||
<input class="uni-input info-content input-len" type="password" maxlength="30" placeholder="请输入"
|
||||
v-model="formData.confirmPassword" />
|
||||
</view>
|
||||
|
||||
<view class="save-item" @click="save('password')">
|
||||
@@ -109,17 +121,21 @@
|
||||
<view v-if="indent == 'mobile'" class="edit-info">
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">手机号</text>
|
||||
<input class="uni-input info-content" type="number" maxlength="11" placeholder="请输入" v-model="formData.mobile" />
|
||||
<input class="uni-input info-content" type="number" maxlength="11" placeholder="请输入"
|
||||
v-model="formData.mobile" />
|
||||
</view>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">验证码</text>
|
||||
<input class="uni-input info-content" type="number" maxlength="4" placeholder="请输入" v-model="formData.mobileVercode" />
|
||||
<input class="uni-input info-content" type="number" maxlength="4" placeholder="请输入"
|
||||
v-model="formData.mobileVercode" />
|
||||
<image :src="captcha.img" class="captcha" @click="getCaptcha"></image>
|
||||
</view>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">短信验证码</text>
|
||||
<input class="uni-input info-content" type="number" maxlength="6" placeholder="请输入" v-model="formData.mobileDynacode" />
|
||||
<button type="primary" class="dynacode" @click="bindMoblieCode()">{{ formData.mobileCodeText }}</button>
|
||||
<input class="uni-input info-content" type="number" maxlength="6" placeholder="请输入"
|
||||
v-model="formData.mobileDynacode" />
|
||||
<button type="primary" class="dynacode" @click="bindMoblieCode()">{{ formData.mobileCodeText
|
||||
}}</button>
|
||||
</view>
|
||||
<view class="save-item" @click="save('mobile')">
|
||||
<button type="primary">保存</button>
|
||||
@@ -138,7 +154,7 @@
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">所在地区</text>
|
||||
<pick-regions :default-regions="defaultRegions" select-arr="3" @getRegions="handleGetRegions">
|
||||
<text class="select-address " :class="{'color-tip': !formData.fullAddress }">
|
||||
<text class="select-address " :class="{ 'color-tip': !formData.fullAddress }">
|
||||
{{ formData.fullAddress ? formData.fullAddress : '请选择省市区县' }}
|
||||
</text>
|
||||
</pick-regions>
|
||||
@@ -157,237 +173,238 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniNavBar from '@/pages_tool/components/uni-nav-bar/uni-nav-bar.vue';
|
||||
import pickRegions from '@/components/pick-regions/pick-regions.vue';
|
||||
import info from './public/js/info.js';
|
||||
import auth from '@/common/js/auth.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniNavBar,
|
||||
pickRegions
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onLoad(data) {
|
||||
if (data.type) this.indent = data.type;
|
||||
},
|
||||
mixins: [info, auth],
|
||||
filters: {
|
||||
mobile(mobile) {
|
||||
return mobile.substring(0, 4 - 1) + '****' + mobile.substring(6 + 1);
|
||||
}
|
||||
import info from './public/js/info.js';
|
||||
import auth from '@/common/js/auth.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniNavBar: () => import('@/pages_tool/components/uni-nav-bar/uni-nav-bar.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
pickRegions: () => import('@/components/pick-regions/pick-regions.vue'),
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onLoad(data) {
|
||||
if (data.type) this.indent = data.type;
|
||||
},
|
||||
mixins: [info, auth],
|
||||
filters: {
|
||||
mobile(mobile) {
|
||||
return mobile.substring(0, 4 - 1) + '****' + mobile.substring(6 + 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.info-head {
|
||||
.head-nav {
|
||||
width: 100%;
|
||||
height: var(--status-bar-height);
|
||||
background: #ffffff;
|
||||
}
|
||||
.info-head {
|
||||
.head-nav {
|
||||
width: 100%;
|
||||
height: var(--status-bar-height);
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.head-nav.active {
|
||||
padding-top: 40rpx;
|
||||
.head-nav.active {
|
||||
padding-top: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.captcha {
|
||||
width: 170rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.info-list-cell {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 24rpx 30rpx;
|
||||
position: relative;
|
||||
line-height: 50rpx;
|
||||
background-color: #fff;
|
||||
|
||||
&:first-child {
|
||||
padding: 28rpx 30rpx;
|
||||
}
|
||||
|
||||
.cell-tip1 {
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
&.log-out-btn {
|
||||
margin-top: 40rpx;
|
||||
|
||||
.cell-tit {
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.captcha {
|
||||
width: 170rpx;
|
||||
height: 50rpx;
|
||||
.info-list-head {
|
||||
border: 1rpx solid $color-line;
|
||||
width: 82rpx;
|
||||
height: 82rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.info-list-cell {
|
||||
.info-list-head image {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
// #ifdef MP
|
||||
&.info-item {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
// #endif
|
||||
|
||||
&.info-list-con~&.info-list-con:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
right: 30rpx;
|
||||
top: 0;
|
||||
border-bottom: 1rpx solid $color-line;
|
||||
}
|
||||
|
||||
.cell-tip {
|
||||
margin-left: auto;
|
||||
color: $color-tip;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 470rpx;
|
||||
}
|
||||
|
||||
.cell-more {
|
||||
margin-left: 10rpx;
|
||||
width: 32rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-more:after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
|
||||
border: 2rpx solid darken($color-line, 20%) {
|
||||
right-color: transparent;
|
||||
bottom-color: transparent;
|
||||
}
|
||||
|
||||
transform: rotate(135deg);
|
||||
}
|
||||
}
|
||||
|
||||
.edit-info-box {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 40rpx;
|
||||
min-height: 50rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.info-name {
|
||||
width: 150rpx;
|
||||
font-size: $font-size-base;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
font-size: $font-size-base;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.dynacode {
|
||||
margin: 0;
|
||||
padding: 0 10rpx;
|
||||
width: 250rpx;
|
||||
height: 60rpx;
|
||||
font-size: $font-size-base;
|
||||
line-height: 60rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.edit-sex-list {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 24rpx 30rpx;
|
||||
position: relative;
|
||||
line-height: 50rpx;
|
||||
background-color: #fff;
|
||||
|
||||
&:first-child {
|
||||
padding: 28rpx 30rpx;
|
||||
label {
|
||||
display: flex;
|
||||
margin-left: 30rpx;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.cell-tip1 {
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
uni-radio .uni-radio-input {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
&.log-out-btn {
|
||||
margin-top: 40rpx;
|
||||
.pick-regions {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.cell-tit {
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
.set-pass-tips {
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.info-list-head {
|
||||
border: 1rpx solid $color-line;
|
||||
width: 82rpx;
|
||||
height: 82rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.input-len {
|
||||
width: 500rpx !important;
|
||||
}
|
||||
|
||||
.info-list-head image {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
.save-item {
|
||||
margin-top: 50rpx;
|
||||
|
||||
// #ifdef MP
|
||||
&.info-item {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
// #endif
|
||||
button {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&.info-list-con~&.info-list-con:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
right: 30rpx;
|
||||
top: 0;
|
||||
border-bottom: 1rpx solid $color-line;
|
||||
}
|
||||
.bind-mobile {
|
||||
button {
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cell-tip {
|
||||
margin-left: auto;
|
||||
color: $color-tip;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 470rpx;
|
||||
}
|
||||
.empty {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
justify-content: center;
|
||||
padding-top: 80rpx;
|
||||
|
||||
.cell-more {
|
||||
margin-left: 10rpx;
|
||||
width: 32rpx;
|
||||
.empty_img {
|
||||
width: 63%;
|
||||
height: 450rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-more:after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
|
||||
border: 2rpx solid darken($color-line, 20%) {
|
||||
right-color: transparent;
|
||||
bottom-color: transparent;
|
||||
}
|
||||
|
||||
transform: rotate(135deg);
|
||||
}
|
||||
}
|
||||
|
||||
.edit-info-box {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 40rpx;
|
||||
min-height: 50rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.info-name {
|
||||
width: 150rpx;
|
||||
font-size: $font-size-base;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
font-size: $font-size-base;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.dynacode {
|
||||
margin: 0;
|
||||
padding: 0 10rpx;
|
||||
width: 250rpx;
|
||||
height: 60rpx;
|
||||
font-size: $font-size-base;
|
||||
line-height: 60rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.edit-sex-list {
|
||||
display: flex;
|
||||
|
||||
label {
|
||||
display: flex;
|
||||
margin-left: 30rpx;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
uni-radio .uni-radio-input {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.pick-regions {
|
||||
flex: 1;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 190rpx;
|
||||
color: $color-tip;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.set-pass-tips {
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.input-len {
|
||||
width: 500rpx !important;
|
||||
}
|
||||
|
||||
.save-item {
|
||||
margin-top: 50rpx;
|
||||
|
||||
button {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bind-mobile {
|
||||
button {
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
justify-content: center;
|
||||
padding-top: 80rpx;
|
||||
|
||||
.empty_img {
|
||||
width: 63%;
|
||||
height: 450rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 190rpx;
|
||||
color: $color-tip;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
button {
|
||||
min-width: 300rpx;
|
||||
margin-top: 100rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
button {
|
||||
min-width: 300rpx;
|
||||
margin-top: 100rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -9,12 +9,15 @@
|
||||
<text class="iconfont icon-bangzhu"></text>
|
||||
活动说明
|
||||
</view>
|
||||
<image class="font" :src="$util.img('public/uniapp/member/invite/top_font.png')" mode="widthFix"/>
|
||||
<image class="font" :src="$util.img('public/uniapp/member/invite/top_font.png')" mode="widthFix" />
|
||||
<view class="time">
|
||||
活动时间:{{ $util.timeStampTurnTime(info.start_time, 1) }}至{{ $util.timeStampTurnTime(info.end_time, 1) }}
|
||||
活动时间:{{ $util.timeStampTurnTime(info.start_time, 1) }}至{{ $util.timeStampTurnTime(info.end_time, 1)
|
||||
}}
|
||||
</view>
|
||||
|
||||
<view class="btn" :style="{ 'background-image': 'url(' + $util.img('public/uniapp/member/invite/top_btn.png') + ')' }" @click="openSharePopup">立即邀请</view>
|
||||
<view class="btn"
|
||||
:style="{ 'background-image': 'url(' + $util.img('public/uniapp/member/invite/top_btn.png') + ')' }"
|
||||
@click="openSharePopup">立即邀请</view>
|
||||
</view>
|
||||
<view class="content invite-list">
|
||||
<view class="title">我的好友</view>
|
||||
@@ -23,7 +26,8 @@
|
||||
<view class="invitelist">
|
||||
<view class="list-item" v-for="(item, index) in inviteList" :key="index">
|
||||
<view class="img color-base-border">
|
||||
<image mode="aspectFit" :src="item.headimg == '' ? $util.img($util.getDefaultImage().head) : $util.img(item.headimg)"/>
|
||||
<image mode="aspectFit"
|
||||
:src="item.headimg == '' ? $util.img($util.getDefaultImage().head) : $util.img(item.headimg)" />
|
||||
</view>
|
||||
<view class="list-left">
|
||||
<view class="info">
|
||||
@@ -43,11 +47,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="more_invite color-tip font-size-tag " @click="moreList" v-if="isClick && total_num > page">
|
||||
<view class="more_invite color-tip font-size-tag " @click="moreList"
|
||||
v-if="isClick && total_num > page">
|
||||
查看更多
|
||||
<text class="iconfont icon-iconangledown"></text>
|
||||
</view>
|
||||
<view class="more_invite color-tip font-size-tag " @click="moreList" v-if="!isClick && inviteList.length > 5 && total_num <= page">没有更多数据了</view>
|
||||
<view class="more_invite color-tip font-size-tag " @click="moreList"
|
||||
v-if="!isClick && inviteList.length > 5 && total_num <= page">没有更多数据了</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
@@ -62,7 +68,7 @@
|
||||
<view class="invite_active">
|
||||
<view class="list">
|
||||
<view class="item" v-if="$util.inArray('balance', info.type) != -1">
|
||||
<image :src="$util.img('public/uniapp/member/invite/coupon_bg.png')" mode="aspectFill"/>
|
||||
<image :src="$util.img('public/uniapp/member/invite/coupon_bg.png')" mode="aspectFill" />
|
||||
<view class="desc">
|
||||
<view class="price">
|
||||
<text class="font-size-base">{{ $lang('common.currencySymbol') }}</text>
|
||||
@@ -73,7 +79,7 @@
|
||||
</view>
|
||||
|
||||
<view class="item" v-if="$util.inArray('point', info.type) != -1">
|
||||
<image :src="$util.img('public/uniapp/member/invite/coupon_bg.png')" mode="aspectFill"/>
|
||||
<image :src="$util.img('public/uniapp/member/invite/coupon_bg.png')" mode="aspectFill" />
|
||||
<view class="desc">
|
||||
<view class="price">
|
||||
<text>{{ parseInt(info.point) }}</text>
|
||||
@@ -128,7 +134,7 @@
|
||||
<view class="step">
|
||||
<view>
|
||||
<view class="img">
|
||||
<image :src="$util.img('public/uniapp/member/invite/fenxiang.png')" mode="aspectFit"/>
|
||||
<image :src="$util.img('public/uniapp/member/invite/fenxiang.png')" mode="aspectFit" />
|
||||
</view>
|
||||
<view class="text">分享链接给好友</view>
|
||||
</view>
|
||||
@@ -137,7 +143,7 @@
|
||||
</view>
|
||||
<view>
|
||||
<view class="img">
|
||||
<image :src="$util.img('public/uniapp/member/invite/shouji.png')" mode="aspectFit"/>
|
||||
<image :src="$util.img('public/uniapp/member/invite/shouji.png')" mode="aspectFit" />
|
||||
</view>
|
||||
<view class="text">好友进入</view>
|
||||
</view>
|
||||
@@ -146,7 +152,7 @@
|
||||
</view>
|
||||
<view>
|
||||
<view class="img">
|
||||
<image :src="$util.img('public/uniapp/member/invite/hongbao.png')" mode="aspectFit"/>
|
||||
<image :src="$util.img('public/uniapp/member/invite/hongbao.png')" mode="aspectFit" />
|
||||
</view>
|
||||
<view class="text">好友注册成功获得奖励</view>
|
||||
</view>
|
||||
@@ -231,56 +237,55 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import inviteFriends from './public/js/invite_friends.js';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
export default {
|
||||
components: {
|
||||
nsEmpty,
|
||||
nsLogin,
|
||||
loadingCover
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
inviteList: [],
|
||||
info: null,
|
||||
page: 1,
|
||||
page_size: 5,
|
||||
total_num: 0,
|
||||
isClick: true,
|
||||
poster: '-1', //海报
|
||||
posterMsg: '' //海报错误信息
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.getBaseInfo();
|
||||
if (this.storeToken) {
|
||||
this.getList();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/invite_friends');
|
||||
});
|
||||
}
|
||||
},
|
||||
onShow() {},
|
||||
mixins: [inviteFriends],
|
||||
onReady() {}
|
||||
};
|
||||
import inviteFriends from './public/js/invite_friends.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
inviteList: [],
|
||||
info: null,
|
||||
page: 1,
|
||||
page_size: 5,
|
||||
total_num: 0,
|
||||
isClick: true,
|
||||
poster: '-1', //海报
|
||||
posterMsg: '' //海报错误信息
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.getBaseInfo();
|
||||
if (this.storeToken) {
|
||||
this.getList();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/invite_friends');
|
||||
});
|
||||
}
|
||||
},
|
||||
onShow() { },
|
||||
mixins: [inviteFriends],
|
||||
onReady() { }
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/invite_friends.scss';
|
||||
@import './public/css/invite_friends.scss';
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .uni-popup__wrapper.bottom {
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
}
|
||||
/deep/ .uni-popup__wrapper.bottom {
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
.poster-layer>>>.uni-popup__wrapper-box {
|
||||
max-height: initial !important;
|
||||
}
|
||||
.poster-layer>>>.uni-popup__wrapper-box {
|
||||
max-height: initial !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
</view>
|
||||
<view class="banner-container">
|
||||
<view class="memberInfo" v-if="memberInfo">
|
||||
<image :src="$util.img(memberInfo.headimg)" v-if="memberInfo.headimg" @error="memberInfo.headimg = $util.getDefaultImage().head" mode="aspectFill"></image>
|
||||
<image :src="$util.img(memberInfo.headimg)" v-if="memberInfo.headimg"
|
||||
@error="memberInfo.headimg = $util.getDefaultImage().head" mode="aspectFill"></image>
|
||||
<image :src="$util.getDefaultImage().head" v-else mode="aspectFill"></image>
|
||||
<view class="member-desc">
|
||||
<view class="font-size-base">{{ memberInfo.nickname }}</view>
|
||||
@@ -25,56 +26,64 @@
|
||||
<swiper-item :class="levelList.length == 1 ? 'image-container-box' : ''" v-for="(item, i) in levelList"
|
||||
:key="i">
|
||||
<view class="image-container" :class="[
|
||||
curIndex === 0
|
||||
? i === listLen - 1
|
||||
? 'item-left'
|
||||
: i === 1
|
||||
curIndex === 0
|
||||
? i === listLen - 1
|
||||
? 'item-left'
|
||||
: i === 1
|
||||
? 'item-right'
|
||||
: 'item-center'
|
||||
: curIndex === listLen - 1
|
||||
: curIndex === listLen - 1
|
||||
? i === 0
|
||||
? 'item-right'
|
||||
: i === listLen - 2
|
||||
? 'item-left'
|
||||
: 'item-center'
|
||||
? 'item-left'
|
||||
: 'item-center'
|
||||
: i === curIndex - 1
|
||||
? 'item-left'
|
||||
: i === curIndex + 1
|
||||
? 'item-right'
|
||||
: 'item-center'
|
||||
]">
|
||||
? 'item-left'
|
||||
: i === curIndex + 1
|
||||
? 'item-right'
|
||||
: 'item-center'
|
||||
]">
|
||||
<view class="slide-image" style="background-size: 100% 100%;background-repeat:no-repeat" :style="{
|
||||
transform: curIndex === i ? 'scale(' + scaleX + ',' + scaleY + ')' : 'scale(1,1)',
|
||||
transitionDuration: '.3s',
|
||||
transitionTimingFunction: 'ease'
|
||||
}">
|
||||
<image v-if="levelList[curIndex]['level_picture']" :src="$util.img(levelList[curIndex]['level_picture'])"/>
|
||||
<image v-else :style="{backgroundColor:levelList[curIndex]['bg_color']}"/>
|
||||
transform: curIndex === i ? 'scale(' + scaleX + ',' + scaleY + ')' : 'scale(1,1)',
|
||||
transitionDuration: '.3s',
|
||||
transitionTimingFunction: 'ease'
|
||||
}">
|
||||
<image v-if="levelList[curIndex]['level_picture']"
|
||||
:src="$util.img(levelList[curIndex]['level_picture'])" />
|
||||
<image v-else :style="{ backgroundColor: levelList[curIndex]['bg_color'] }" />
|
||||
|
||||
<view class="info">
|
||||
<view class="level-detail" :style="{color:levelList[curIndex]['level_text_color']}">
|
||||
<view class="level-detail" :style="{ color: levelList[curIndex]['level_text_color'] }">
|
||||
{{ levelList[curIndex].level_name }}
|
||||
<text class="isnow " :style="{color:levelList[curIndex]['level_text_color']}" v-if="levelId == item.level_id">当前等级</text>
|
||||
<text class="isnow " :style="{ color: levelList[curIndex]['level_text_color'] }"
|
||||
v-if="levelId == item.level_id">当前等级</text>
|
||||
</view>
|
||||
<view class="growr-name" :style="{color:levelList[curIndex]['level_text_color']}">当前成长值</view>
|
||||
<view class="growr-value" :style="{color:levelList[curIndex]['level_text_color']}">{{ growth }}</view>
|
||||
<view class="growr-name" :style="{ color: levelList[curIndex]['level_text_color'] }">当前成长值
|
||||
</view>
|
||||
<view class="growr-value" :style="{ color: levelList[curIndex]['level_text_color'] }">{{
|
||||
growth }}</view>
|
||||
<block v-if="levelId == item.level_id">
|
||||
<block v-if="levelList[curIndex + 1] != undefined">
|
||||
<ns-progress :progress="levelList[curIndex + 1].rate"></ns-progress>
|
||||
<view class="residue-growr-value"
|
||||
:style="{color:levelList[curIndex]['level_text_color']}">
|
||||
再获得{{ levelList[curIndex + 1].needGrowth > 0 ? levelList[curIndex + 1].needGrowth : 0 }}成长值成为{{
|
||||
:style="{ color: levelList[curIndex]['level_text_color'] }">
|
||||
再获得{{ levelList[curIndex + 1].needGrowth > 0 ? levelList[curIndex +
|
||||
1].needGrowth : 0 }}成长值成为{{
|
||||
levelList[curIndex + 1].level_name
|
||||
}}
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="residue-growr-value" :style="{color:levelList[curIndex]['level_text_color']}">您现在已经是最高等级</view>
|
||||
<view class="residue-growr-value"
|
||||
:style="{ color: levelList[curIndex]['level_text_color'] }">您现在已经是最高等级</view>
|
||||
</block>
|
||||
</block>
|
||||
<block v-else>
|
||||
<ns-progress :progress="levelList[curIndex].rate" v-if="levelList[curIndex].needGrowth > 0"></ns-progress>
|
||||
<view class="residue-growr-value" v-if="levelList[curIndex].needGrowth > 0" :style="{color:levelList[curIndex]['level_text_color']}">
|
||||
<ns-progress :progress="levelList[curIndex].rate"
|
||||
v-if="levelList[curIndex].needGrowth > 0"></ns-progress>
|
||||
<view class="residue-growr-value" v-if="levelList[curIndex].needGrowth > 0"
|
||||
:style="{ color: levelList[curIndex]['level_text_color'] }">
|
||||
再获得{{ levelList[curIndex].needGrowth }}成长值成为{{ levelList[curIndex].level_name }}
|
||||
</view>
|
||||
</block>
|
||||
@@ -83,7 +92,8 @@
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="member-equity" v-if="levelList[curIndex].is_free_shipping > 0 || levelList[curIndex].consume_discount > 0 || levelList[curIndex].point_feedback > 0">
|
||||
<view class="member-equity"
|
||||
v-if="levelList[curIndex].is_free_shipping > 0 || levelList[curIndex].consume_discount > 0 || levelList[curIndex].point_feedback > 0">
|
||||
<view class="equity-title">会员权益</view>
|
||||
<view class="equity-itme" v-if="levelList[curIndex].is_free_shipping > 0">
|
||||
<image :src="$util.img('public/uniapp/level/exemption_postage.png')" mode="aspectFit"></image>
|
||||
@@ -109,7 +119,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="member-gift" v-if="levelList[curIndex].send_balance > 0 || levelList[curIndex].send_balance > 0 || levelList[curIndex].send_coupon">
|
||||
<view class="member-gift"
|
||||
v-if="levelList[curIndex].send_balance > 0 || levelList[curIndex].send_balance > 0 || levelList[curIndex].send_coupon">
|
||||
<view class="gift-title">会员礼包</view>
|
||||
<view class="gift-itme" v-if="levelList[curIndex].send_point > 0">
|
||||
<image :src="$util.img('public/uniapp/level/integral.png')" mode="aspectFit"></image>
|
||||
@@ -125,7 +136,8 @@
|
||||
<text class="gift-desc">赠送{{ levelList[curIndex].send_balance }}元红包</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="gift-itme" v-if="levelList[curIndex].send_coupon" @click="openCoupon(levelList[curIndex].send_coupon)">
|
||||
<view class="gift-itme" v-if="levelList[curIndex].send_coupon"
|
||||
@click="openCoupon(levelList[curIndex].send_coupon)">
|
||||
<image :src="$util.img('public/uniapp/level/coupon.png')" mode="aspectFit"></image>
|
||||
<view class="gift-content">
|
||||
<text>优惠券礼包</text>
|
||||
@@ -168,215 +180,212 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsProgress from '@/pages_tool/components/ns-progress/ns-progress.vue';
|
||||
import toTop from '@/components/toTop/toTop.vue';
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsProgress,
|
||||
toTop,
|
||||
uniPopup
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
couponPopList: [],
|
||||
curIndex: 0,
|
||||
descIndex: 0,
|
||||
isDescAnimating: false,
|
||||
scaleX: (634 / 540).toFixed(4),
|
||||
scaleY: (378 / 330).toFixed(4),
|
||||
swiperConfig: {
|
||||
indicatorDots: false,
|
||||
indicatorColor: 'rgba(255, 255, 255, .4)',
|
||||
indicatorActiveColor: 'rgba(255, 255, 255, 1)',
|
||||
interval: 3000,
|
||||
duration: 300,
|
||||
circular: false,
|
||||
previousMargin: '58rpx',
|
||||
nextMargin: '58rpx'
|
||||
},
|
||||
levelList: [{
|
||||
needGrowth: 0,
|
||||
growth: 0
|
||||
}],
|
||||
levelId: 0,
|
||||
growth: 0,
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
export default {
|
||||
components: {
|
||||
nsProgress: () => import('@/pages_tool/components/ns-progress/ns-progress.vue'),
|
||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
couponPopList: [],
|
||||
curIndex: 0,
|
||||
descIndex: 0,
|
||||
isDescAnimating: false,
|
||||
scaleX: (634 / 540).toFixed(4),
|
||||
scaleY: (378 / 330).toFixed(4),
|
||||
swiperConfig: {
|
||||
indicatorDots: false,
|
||||
indicatorColor: 'rgba(255, 255, 255, .4)',
|
||||
indicatorActiveColor: 'rgba(255, 255, 255, 1)',
|
||||
interval: 3000,
|
||||
duration: 300,
|
||||
circular: false,
|
||||
previousMargin: '58rpx',
|
||||
nextMargin: '58rpx'
|
||||
},
|
||||
levelList: [{
|
||||
needGrowth: 0,
|
||||
growth: 0
|
||||
}],
|
||||
levelId: 0,
|
||||
growth: 0,
|
||||
|
||||
nowIndex: 0, //我当前所在等级的index
|
||||
rule: [] //成长值规则
|
||||
};
|
||||
nowIndex: 0, //我当前所在等级的index
|
||||
rule: [] //成长值规则
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
listLen() {
|
||||
return this.levelList.length;
|
||||
},
|
||||
computed: {
|
||||
listLen() {
|
||||
return this.levelList.length;
|
||||
},
|
||||
remark() {
|
||||
if (this.levelList[this.curIndex]) {
|
||||
return this.levelList[this.curIndex].remark;
|
||||
}
|
||||
},
|
||||
nextIndex() {
|
||||
let num = 0;
|
||||
if (this.curIndex == this.levelList.length - 1) {
|
||||
return this.curIndex;
|
||||
} else {
|
||||
return this.curIndex + 1;
|
||||
}
|
||||
remark() {
|
||||
if (this.levelList[this.curIndex]) {
|
||||
return this.levelList[this.curIndex].remark;
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getLevelRule();
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/level');
|
||||
});
|
||||
nextIndex() {
|
||||
let num = 0;
|
||||
if (this.curIndex == this.levelList.length - 1) {
|
||||
return this.curIndex;
|
||||
} else {
|
||||
this.getLevelList();
|
||||
}
|
||||
// #ifdef MP-ALIPAY
|
||||
this.scaleX = 1
|
||||
this.scaleY = 1
|
||||
// #endif
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
filters: {
|
||||
rate(index, list, growth) {
|
||||
let nowGrowth = Number(growth);
|
||||
let minGrouth = Number(list[index].growth);
|
||||
if (index == list.length - 1) {
|
||||
return nowGrowth > minGrouth ? 100 : 0;
|
||||
} else {
|
||||
let maxGrouth = Number(list[index + 1].growth);
|
||||
let num2 = nowGrowth - minGrouth;
|
||||
let num1 = maxGrouth - minGrouth;
|
||||
let num = Math.floor((num2 / num1) * 100);
|
||||
return num > 100 ? 100 : num;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
swiperChange(e) {
|
||||
let that = this;
|
||||
this.curIndex = e.detail.current;
|
||||
this.isDescAnimating = true;
|
||||
let timer = setTimeout(function() {
|
||||
that.descIndex = e.detail.current;
|
||||
clearTimeout(timer);
|
||||
}, 150);
|
||||
},
|
||||
animationfinish(e) {
|
||||
this.isDescAnimating = false;
|
||||
},
|
||||
getBannerDetail(index) {
|
||||
uni.showLoading({
|
||||
title: '将前往详情页面',
|
||||
duration: 2000,
|
||||
mask: true
|
||||
});
|
||||
},
|
||||
getLevelList() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberlevel/lists',
|
||||
success: res => {
|
||||
if (res.data && res.code == 0) {
|
||||
this.levelList = res.data;
|
||||
for (var i = 0; i < this.levelList.length; i++) {
|
||||
if (this.levelList[i].send_coupon) {
|
||||
this.levelList[i].coupon_length = this.levelList[i].send_coupon.split(',')
|
||||
.length;
|
||||
}
|
||||
}
|
||||
this.levelId = this.memberInfo.member_level;
|
||||
this.growth = this.memberInfo.growth;
|
||||
for (let i = 0; i < this.levelList.length; i++) {
|
||||
if (this.levelList[i].level_id == this.levelId) {
|
||||
this.curIndex = i;
|
||||
this.descIndex = i;
|
||||
this.nowIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.levelList.forEach((v, i) => {
|
||||
if (parseFloat(v.growth) < parseFloat(this.growth)) {
|
||||
v.needGrowth = 0;
|
||||
v.rate = 100;
|
||||
} else {
|
||||
v.needGrowth = (parseFloat(v.growth) - parseFloat(this.growth))
|
||||
.toFixed(2);
|
||||
v.rate = (this.growth / v.growth).toFixed(2) * 100;
|
||||
}
|
||||
});
|
||||
|
||||
this.levelList.forEach(v => {
|
||||
if (v.consume_discount) {
|
||||
v.consume_discount = (v.consume_discount / 10).toFixed(2);
|
||||
}
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getLevelRule() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/accountrule',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data && res.data.growth) {
|
||||
this.rule = res.data.growth;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
growthRules() {
|
||||
this.$util.redirectTo('/pages_tool/member/level_growth_rules');
|
||||
},
|
||||
openCoupon(data) {
|
||||
this.couponPopList = [];
|
||||
this.$api.sendRequest({
|
||||
url: '/coupon/api/coupon/couponbyid',
|
||||
data: {
|
||||
id: data
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.couponPopList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$refs.couponPopup.open();
|
||||
},
|
||||
closeCoupon() {
|
||||
this.$refs.couponPopup.close();
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
return true;
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getLevelList();
|
||||
}
|
||||
return this.curIndex + 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getLevelRule();
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/level');
|
||||
});
|
||||
} else {
|
||||
this.getLevelList();
|
||||
}
|
||||
// #ifdef MP-ALIPAY
|
||||
this.scaleX = 1
|
||||
this.scaleY = 1
|
||||
// #endif
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
filters: {
|
||||
rate(index, list, growth) {
|
||||
let nowGrowth = Number(growth);
|
||||
let minGrouth = Number(list[index].growth);
|
||||
if (index == list.length - 1) {
|
||||
return nowGrowth > minGrouth ? 100 : 0;
|
||||
} else {
|
||||
let maxGrouth = Number(list[index + 1].growth);
|
||||
let num2 = nowGrowth - minGrouth;
|
||||
let num1 = maxGrouth - minGrouth;
|
||||
let num = Math.floor((num2 / num1) * 100);
|
||||
return num > 100 ? 100 : num;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
swiperChange(e) {
|
||||
let that = this;
|
||||
this.curIndex = e.detail.current;
|
||||
this.isDescAnimating = true;
|
||||
let timer = setTimeout(function () {
|
||||
that.descIndex = e.detail.current;
|
||||
clearTimeout(timer);
|
||||
}, 150);
|
||||
},
|
||||
animationfinish(e) {
|
||||
this.isDescAnimating = false;
|
||||
},
|
||||
getBannerDetail(index) {
|
||||
uni.showLoading({
|
||||
title: '将前往详情页面',
|
||||
duration: 2000,
|
||||
mask: true
|
||||
});
|
||||
},
|
||||
getLevelList() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberlevel/lists',
|
||||
success: res => {
|
||||
if (res.data && res.code == 0) {
|
||||
this.levelList = res.data;
|
||||
for (var i = 0; i < this.levelList.length; i++) {
|
||||
if (this.levelList[i].send_coupon) {
|
||||
this.levelList[i].coupon_length = this.levelList[i].send_coupon.split(',')
|
||||
.length;
|
||||
}
|
||||
}
|
||||
this.levelId = this.memberInfo.member_level;
|
||||
this.growth = this.memberInfo.growth;
|
||||
for (let i = 0; i < this.levelList.length; i++) {
|
||||
if (this.levelList[i].level_id == this.levelId) {
|
||||
this.curIndex = i;
|
||||
this.descIndex = i;
|
||||
this.nowIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.levelList.forEach((v, i) => {
|
||||
if (parseFloat(v.growth) < parseFloat(this.growth)) {
|
||||
v.needGrowth = 0;
|
||||
v.rate = 100;
|
||||
} else {
|
||||
v.needGrowth = (parseFloat(v.growth) - parseFloat(this.growth))
|
||||
.toFixed(2);
|
||||
v.rate = (this.growth / v.growth).toFixed(2) * 100;
|
||||
}
|
||||
});
|
||||
|
||||
this.levelList.forEach(v => {
|
||||
if (v.consume_discount) {
|
||||
v.consume_discount = (v.consume_discount / 10).toFixed(2);
|
||||
}
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getLevelRule() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/accountrule',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data && res.data.growth) {
|
||||
this.rule = res.data.growth;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
growthRules() {
|
||||
this.$util.redirectTo('/pages_tool/member/level_growth_rules');
|
||||
},
|
||||
openCoupon(data) {
|
||||
this.couponPopList = [];
|
||||
this.$api.sendRequest({
|
||||
url: '/coupon/api/coupon/couponbyid',
|
||||
data: {
|
||||
id: data
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.couponPopList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$refs.couponPopup.open();
|
||||
},
|
||||
closeCoupon() {
|
||||
this.$refs.couponPopup.close();
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
return true;
|
||||
},
|
||||
watch: {
|
||||
storeToken: function (nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getLevelList();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/level.scss';
|
||||
@import './public/css/level.scss';
|
||||
</style>
|
||||
@@ -43,232 +43,232 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsProgress from '@/pages_tool/components/ns-progress/ns-progress.vue';
|
||||
import toTop from '@/components/toTop/toTop.vue';
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsProgress,
|
||||
toTop
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
curIndex: 0,
|
||||
descIndex: 0,
|
||||
isDescAnimating: false,
|
||||
scaleX: (634 / 540).toFixed(4),
|
||||
scaleY: (378 / 330).toFixed(4),
|
||||
swiperConfig: {
|
||||
//type==1时的默认参数
|
||||
indicatorDots: false,
|
||||
indicatorColor: 'rgba(255, 255, 255, .4)',
|
||||
indicatorActiveColor: 'rgba(255, 255, 255, 1)',
|
||||
interval: 3000,
|
||||
duration: 300,
|
||||
circular: false,
|
||||
previousMargin: '58rpx',
|
||||
nextMargin: '58rpx'
|
||||
},
|
||||
levelList: [{
|
||||
needGrowth: 0,
|
||||
growth: 0
|
||||
}],
|
||||
levelId: 0,
|
||||
growth: 0,
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
|
||||
nowIndex: 0, //我当前所在等级的index
|
||||
rule: [] //成长值规则
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
listLen() {
|
||||
return this.levelList.length;
|
||||
export default {
|
||||
components: {
|
||||
nsProgress: () => import('@/pages_tool/components/ns-progress/ns-progress.vue'),
|
||||
toTop: () => import('@/components/toTop/toTop.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
curIndex: 0,
|
||||
descIndex: 0,
|
||||
isDescAnimating: false,
|
||||
scaleX: (634 / 540).toFixed(4),
|
||||
scaleY: (378 / 330).toFixed(4),
|
||||
swiperConfig: {
|
||||
//type==1时的默认参数
|
||||
indicatorDots: false,
|
||||
indicatorColor: 'rgba(255, 255, 255, .4)',
|
||||
indicatorActiveColor: 'rgba(255, 255, 255, 1)',
|
||||
interval: 3000,
|
||||
duration: 300,
|
||||
circular: false,
|
||||
previousMargin: '58rpx',
|
||||
nextMargin: '58rpx'
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
//会员等级
|
||||
this.getLevelList();
|
||||
this.getLevelRule();
|
||||
},
|
||||
onShow() {},
|
||||
filters: {
|
||||
rate(index, list, growth) {
|
||||
let nowGrowth = Number(growth);
|
||||
let minGrouth = Number(list[index].growth);
|
||||
if (index == list.length - 1) {
|
||||
return nowGrowth > minGrouth ? 100 : 0;
|
||||
} else {
|
||||
let maxGrouth = Number(list[index + 1].growth);
|
||||
let num2 = nowGrowth - minGrouth;
|
||||
let num1 = maxGrouth - minGrouth;
|
||||
let num = Math.floor((num2 / num1) * 100);
|
||||
return num > 100 ? 100 : num;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
swiperChange(e) {
|
||||
let that = this;
|
||||
this.curIndex = e.detail.current;
|
||||
this.isDescAnimating = true;
|
||||
let timer = setTimeout(function() {
|
||||
that.descIndex = e.detail.current;
|
||||
clearTimeout(timer);
|
||||
}, 150);
|
||||
},
|
||||
animationfinish(e) {
|
||||
this.isDescAnimating = false;
|
||||
},
|
||||
getBannerDetail(index) {
|
||||
uni.showLoading({
|
||||
title: '将前往详情页面',
|
||||
duration: 2000,
|
||||
mask: true
|
||||
});
|
||||
},
|
||||
getLevelList() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberlevel/lists',
|
||||
success: res => {
|
||||
if (res.data && res.code == 0) {
|
||||
this.levelList = res.data;
|
||||
this.levelId = this.memberInfo.member_level;
|
||||
this.growth = this.memberInfo.growth;
|
||||
for (let i = 0; i < this.levelList.length; i++) {
|
||||
if (this.levelList[i].level_id == this.levelId) {
|
||||
this.curIndex = i;
|
||||
this.descIndex = i;
|
||||
this.nowIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.levelList.forEach((v, i) => {
|
||||
let rate = 0;
|
||||
if (i != this.levelList.length - 1) {
|
||||
v.needGrowth = Number(this.levelList[i + 1].growth) - Number(this.growth); //距离下一阶段需要多少成长值
|
||||
levelList: [{
|
||||
needGrowth: 0,
|
||||
growth: 0
|
||||
}],
|
||||
levelId: 0,
|
||||
growth: 0,
|
||||
|
||||
if (v.needGrowth <= 0) {
|
||||
rate = 100;
|
||||
} else {
|
||||
rate = (this.growth / this.levelList[i + 1].growth).toFixed(2) * 100;
|
||||
}
|
||||
} else {
|
||||
v.needGrowth = Number(this.levelList[i].growth) - Number(this.growth); //距离下一阶段需要多少成长值
|
||||
if (v.needGrowth <= 0) {
|
||||
rate = 100;
|
||||
} else {
|
||||
rate = (this.growth / this.levelList[i].growth).toFixed(2) * 100;
|
||||
}
|
||||
}
|
||||
v.rate = rate;
|
||||
});
|
||||
|
||||
this.levelList.forEach(v => {
|
||||
if (v.consume_discount) {
|
||||
v.consume_discount = (v.consume_discount / 10).toFixed(2);
|
||||
}
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getLevelRule() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/accountrule',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data && res.data.growth) {
|
||||
this.rule = res.data.growth;
|
||||
}
|
||||
}
|
||||
});
|
||||
nowIndex: 0, //我当前所在等级的index
|
||||
rule: [] //成长值规则
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
listLen() {
|
||||
return this.levelList.length;
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
//会员等级
|
||||
this.getLevelList();
|
||||
this.getLevelRule();
|
||||
},
|
||||
onShow() { },
|
||||
filters: {
|
||||
rate(index, list, growth) {
|
||||
let nowGrowth = Number(growth);
|
||||
let minGrouth = Number(list[index].growth);
|
||||
if (index == list.length - 1) {
|
||||
return nowGrowth > minGrouth ? 100 : 0;
|
||||
} else {
|
||||
let maxGrouth = Number(list[index + 1].growth);
|
||||
let num2 = nowGrowth - minGrouth;
|
||||
let num1 = maxGrouth - minGrouth;
|
||||
let num = Math.floor((num2 / num1) * 100);
|
||||
return num > 100 ? 100 : num;
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
swiperChange(e) {
|
||||
let that = this;
|
||||
this.curIndex = e.detail.current;
|
||||
this.isDescAnimating = true;
|
||||
let timer = setTimeout(function () {
|
||||
that.descIndex = e.detail.current;
|
||||
clearTimeout(timer);
|
||||
}, 150);
|
||||
},
|
||||
animationfinish(e) {
|
||||
this.isDescAnimating = false;
|
||||
},
|
||||
getBannerDetail(index) {
|
||||
uni.showLoading({
|
||||
title: '将前往详情页面',
|
||||
duration: 2000,
|
||||
mask: true
|
||||
});
|
||||
},
|
||||
getLevelList() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberlevel/lists',
|
||||
success: res => {
|
||||
if (res.data && res.code == 0) {
|
||||
this.levelList = res.data;
|
||||
this.levelId = this.memberInfo.member_level;
|
||||
this.growth = this.memberInfo.growth;
|
||||
for (let i = 0; i < this.levelList.length; i++) {
|
||||
if (this.levelList[i].level_id == this.levelId) {
|
||||
this.curIndex = i;
|
||||
this.descIndex = i;
|
||||
this.nowIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.levelList.forEach((v, i) => {
|
||||
let rate = 0;
|
||||
if (i != this.levelList.length - 1) {
|
||||
v.needGrowth = Number(this.levelList[i + 1].growth) - Number(this.growth); //距离下一阶段需要多少成长值
|
||||
|
||||
if (v.needGrowth <= 0) {
|
||||
rate = 100;
|
||||
} else {
|
||||
rate = (this.growth / this.levelList[i + 1].growth).toFixed(2) * 100;
|
||||
}
|
||||
} else {
|
||||
v.needGrowth = Number(this.levelList[i].growth) - Number(this.growth); //距离下一阶段需要多少成长值
|
||||
if (v.needGrowth <= 0) {
|
||||
rate = 100;
|
||||
} else {
|
||||
rate = (this.growth / this.levelList[i].growth).toFixed(2) * 100;
|
||||
}
|
||||
}
|
||||
v.rate = rate;
|
||||
});
|
||||
|
||||
this.levelList.forEach(v => {
|
||||
if (v.consume_discount) {
|
||||
v.consume_discount = (v.consume_discount / 10).toFixed(2);
|
||||
}
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getLevelRule() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/accountrule',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data && res.data.growth) {
|
||||
this.rule = res.data.growth;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff;
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.grow-explain {
|
||||
padding: 30rpx;
|
||||
margin-top: 30rpx;
|
||||
|
||||
.explain-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
|
||||
image {
|
||||
margin: 0 20rpx;
|
||||
width: 54rpx;
|
||||
height: 18rpx;
|
||||
}
|
||||
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.grow-explain {
|
||||
padding: 30rpx;
|
||||
margin-top: 30rpx;
|
||||
.explain-tr {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.explain-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
.explain-th {
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
image {
|
||||
margin: 0 20rpx;
|
||||
width: 54rpx;
|
||||
height: 18rpx;
|
||||
}
|
||||
|
||||
margin-bottom: 40rpx;
|
||||
&~.explain-th {
|
||||
border-left: 4rpx solid #fff;
|
||||
}
|
||||
|
||||
.explain-tr {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
background-color: #f6f1e4;
|
||||
}
|
||||
|
||||
.explain-td {
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
&~.explain-td {
|
||||
border-left: 4rpx solid #fff;
|
||||
}
|
||||
|
||||
.explain-th {
|
||||
padding: 10rpx 30rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
flex: 1;
|
||||
background-color: #fcfbf7;
|
||||
}
|
||||
}
|
||||
|
||||
&~.explain-th {
|
||||
border-left: 4rpx solid #fff;
|
||||
}
|
||||
.grow-value,
|
||||
.acquisition-grow {
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
flex: 1;
|
||||
background-color: #f6f1e4;
|
||||
}
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.explain-td {
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
&~.explain-td {
|
||||
border-left: 4rpx solid #fff;
|
||||
}
|
||||
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
flex: 1;
|
||||
background-color: #fcfbf7;
|
||||
image {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.grow-value,
|
||||
.acquisition-grow {
|
||||
padding: 0 30rpx 30rpx;
|
||||
.content {
|
||||
font-size: 24rpx;
|
||||
margin-left: 40rpx;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: 24rpx;
|
||||
margin-left: 40rpx;
|
||||
|
||||
text {
|
||||
display: block;
|
||||
}
|
||||
text {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,8 +2,10 @@
|
||||
<view :style="themeColor" class="nc-modify-content">
|
||||
<view class="modify">
|
||||
<view>
|
||||
<image v-if="newImg == ''" :src="memberImg ? $util.img(memberImg) : $util.getDefaultImage().head" @error="memberImg = $util.getDefaultImage().head" mode="aspectFill"/>
|
||||
<image v-else :src="$util.img(newImg)" @error="newImg = $util.getDefaultImage().head" mode="aspectFill" />
|
||||
<image v-if="newImg == ''" :src="memberImg ? $util.img(memberImg) : $util.getDefaultImage().head"
|
||||
@error="memberImg = $util.getDefaultImage().head" mode="aspectFill" />
|
||||
<image v-else :src="$util.img(newImg)" @error="newImg = $util.getDefaultImage().head"
|
||||
mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="opection-box">
|
||||
@@ -28,167 +30,166 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import imgCropping from '@/pages_tool/components/img-cropping/cropping.vue';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
memberImg: '',
|
||||
newImg: '',
|
||||
imgurl: ''
|
||||
};
|
||||
},
|
||||
components: {
|
||||
imgCropping
|
||||
},
|
||||
onShow() {
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/login/login', {
|
||||
back: '/pages_tool/member/modify_face'
|
||||
},
|
||||
'redirectTo'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
this.memberImg = this.memberInfo.headimg;
|
||||
this.imgurl = this.memberInfo.headimg;
|
||||
},
|
||||
methods: {
|
||||
chooseImage() {
|
||||
this.$refs.imgCropping.fSelect();
|
||||
export default {
|
||||
components: {
|
||||
imgCropping: () => import('@/pages_tool/components/img-cropping/cropping.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
memberImg: '',
|
||||
newImg: '',
|
||||
imgurl: ''
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/login/login', {
|
||||
back: '/pages_tool/member/modify_face'
|
||||
},
|
||||
//上传返回图片
|
||||
myUpload(rsp) {
|
||||
let app_type = 'h5';
|
||||
let app_type_name = 'H5';
|
||||
'redirectTo'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// #ifdef MP
|
||||
app_type = 'weapp';
|
||||
app_type_name = 'weapp';
|
||||
// #endif
|
||||
uni.request({
|
||||
url: this.$config.baseUrl + '/api/upload/headimgBase64',
|
||||
method: 'POST',
|
||||
data: {
|
||||
app_type: app_type,
|
||||
app_type_name: app_type_name,
|
||||
images: rsp.base64
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded;application/json'
|
||||
},
|
||||
dataType: 'json',
|
||||
responseType: 'text',
|
||||
success: res => {
|
||||
if (res.data.code == 0) {
|
||||
this.newImg = res.data.data.pic_path;
|
||||
this.imgurl = res.data.data.pic_path;
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.memberImg = this.memberInfo.headimg;
|
||||
this.imgurl = this.memberInfo.headimg;
|
||||
},
|
||||
methods: {
|
||||
chooseImage() {
|
||||
this.$refs.imgCropping.fSelect();
|
||||
},
|
||||
//上传返回图片
|
||||
myUpload(rsp) {
|
||||
let app_type = 'h5';
|
||||
let app_type_name = 'H5';
|
||||
|
||||
// #ifdef MP
|
||||
app_type = 'weapp';
|
||||
app_type_name = 'weapp';
|
||||
// #endif
|
||||
uni.request({
|
||||
url: this.$config.baseUrl + '/api/upload/headimgBase64',
|
||||
method: 'POST',
|
||||
data: {
|
||||
app_type: app_type,
|
||||
app_type_name: app_type_name,
|
||||
images: rsp.base64
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded;application/json'
|
||||
},
|
||||
dataType: 'json',
|
||||
responseType: 'text',
|
||||
success: res => {
|
||||
if (res.data.code == 0) {
|
||||
this.newImg = res.data.data.pic_path;
|
||||
this.imgurl = res.data.data.pic_path;
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.$util.showToast({
|
||||
title: '头像上传失败'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
previewImage() {
|
||||
uni.previewImage({
|
||||
current: 0,
|
||||
urls: this.images
|
||||
});
|
||||
},
|
||||
save() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/modifyheadimg',
|
||||
data: {
|
||||
headimg: this.imgurl
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.memberInfo.headimg = this.imgurl;
|
||||
this.$store.commit('setMemberInfo', this.memberInfo);
|
||||
this.$util.showToast({
|
||||
title: '头像上传失败'
|
||||
title: '头像修改成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/member/info', {}, 'redirectTo');
|
||||
}, 2000);
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
previewImage() {
|
||||
uni.previewImage({
|
||||
current: 0,
|
||||
urls: this.images
|
||||
});
|
||||
},
|
||||
save() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/modifyheadimg',
|
||||
data: {
|
||||
headimg: this.imgurl
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.memberInfo.headimg = this.imgurl;
|
||||
this.$store.commit('setMemberInfo', this.memberInfo);
|
||||
this.$util.showToast({
|
||||
title: '头像修改成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/member/info', {}, 'redirectTo');
|
||||
}, 2000);
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
uploadFace() {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
success: (chooseImageRes) => {
|
||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||
this.$api.upload({
|
||||
url: '/api/upload/headimg',
|
||||
filePath: tempFilePaths[0],
|
||||
fileType: 'image',
|
||||
success: (res) => {
|
||||
if (res.code) {
|
||||
this.newImg = res.data.pic_path;
|
||||
this.imgurl = res.data.pic_path;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
uploadFace() {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
success: (chooseImageRes) => {
|
||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||
this.$api.upload({
|
||||
url: '/api/upload/headimg',
|
||||
filePath: tempFilePaths[0],
|
||||
fileType: 'image',
|
||||
success: (res) => {
|
||||
if (res.code) {
|
||||
this.newImg = res.data.pic_path;
|
||||
this.imgurl = res.data.pic_path;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
page {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.modify {
|
||||
position: relative;
|
||||
padding-top: 50rpx;
|
||||
|
||||
view {
|
||||
width: 500rpx;
|
||||
height: 500rpx;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
background-color: #ffffff;
|
||||
border: 4rpx solid #ffffff;
|
||||
border-radius: 100%;
|
||||
|
||||
.modify {
|
||||
position: relative;
|
||||
padding-top: 50rpx;
|
||||
|
||||
view {
|
||||
width: 500rpx;
|
||||
height: 500rpx;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
background-color: #ffffff;
|
||||
border: 4rpx solid #ffffff;
|
||||
border-radius: 100%;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.opection-box {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.opec {
|
||||
width: 100%;
|
||||
padding: 0 10%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
button {
|
||||
padding: 0 30rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
border: none;
|
||||
}
|
||||
.opection-box {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.opec {
|
||||
width: 100%;
|
||||
padding: 0 10%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
button {
|
||||
padding: 0 30rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,8 +3,10 @@
|
||||
<view class="tips" v-if="step != 0">请输入6位支付密码,建议不要使用重复或连续数字</view>
|
||||
<view class="tips" v-else>验证码已发送至{{ memberInfo.mobile | mobile }}请在下方输入4位数字验证码</view>
|
||||
<view class="password-wrap">
|
||||
<myp-one :maxlength="step == 0 ? 4 : 6" :is-pwd="step != 0" @input="input" ref="input" :auto-focus="true"></myp-one>
|
||||
<view v-show="step == 0" class="dynacode" :class="dynacodeData.seconds == 120 ? 'color-base-text' : 'color-tip'" @click="sendMobileCode">
|
||||
<myp-one :maxlength="step == 0 ? 4 : 6" :is-pwd="step != 0" @input="input" ref="input"
|
||||
:auto-focus="true"></myp-one>
|
||||
<view v-show="step == 0" class="dynacode"
|
||||
:class="dynacodeData.seconds == 120 ? 'color-base-text' : 'color-tip'" @click="sendMobileCode">
|
||||
{{ dynacodeData.codeText }}
|
||||
</view>
|
||||
<view class="action-tips" v-show="step == 0">输入短信验证码</view>
|
||||
@@ -16,263 +18,263 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mypOne from '@/pages_tool/components/myp-one/myp-one.vue';
|
||||
export default {
|
||||
components: {
|
||||
mypOne
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isClick: false,
|
||||
step: 1,
|
||||
key: '', // 短信key
|
||||
code: '', // 动态码
|
||||
password: '', // 密码
|
||||
repassword: '', // 重复密码
|
||||
isSub: false, // 防重复提交
|
||||
back: '', // 返回页
|
||||
dynacodeData: {
|
||||
seconds: 120,
|
||||
timer: null,
|
||||
codeText: '获取验证码',
|
||||
isSend: false
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.back) this.back = option.back;
|
||||
|
||||
// 判断登录
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo('/pages_tool/login/login');
|
||||
} else {
|
||||
if (this.memberInfo.mobile == '') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设置支付密码需要先绑定手机号,是否立即绑定?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$util.redirectTo('/pages_tool/member/info', {
|
||||
action: 'mobile',
|
||||
back: this.back
|
||||
}, 'redirectTo');
|
||||
} else {
|
||||
if (this.back) this.$util.redirectTo(this.back);
|
||||
else this.$util.redirectTo('/pages/member/index');
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
mypOne: () => import('@/pages_tool/components/myp-one/myp-one.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isClick: false,
|
||||
step: 1,
|
||||
key: '', // 短信key
|
||||
code: '', // 动态码
|
||||
password: '', // 密码
|
||||
repassword: '', // 重复密码
|
||||
isSub: false, // 防重复提交
|
||||
back: '', // 返回页
|
||||
dynacodeData: {
|
||||
seconds: 120,
|
||||
timer: null,
|
||||
codeText: '获取验证码',
|
||||
isSend: false
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.back) this.back = option.back;
|
||||
|
||||
// 判断登录
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo('/pages_tool/login/login');
|
||||
} else {
|
||||
if (this.memberInfo.mobile == '') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设置支付密码需要先绑定手机号,是否立即绑定?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$util.redirectTo('/pages_tool/member/info', {
|
||||
action: 'mobile',
|
||||
back: this.back
|
||||
}, 'redirectTo');
|
||||
} else {
|
||||
if (this.back) this.$util.redirectTo(this.back);
|
||||
else this.$util.redirectTo('/pages/member/index');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.step = 0;
|
||||
this.sendMobileCode();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
input(val) {
|
||||
if (this.step == 0) {
|
||||
if (val.length == 4) {
|
||||
this.isClick = true;
|
||||
this.code = val;
|
||||
} else {
|
||||
this.step = 0;
|
||||
this.sendMobileCode();
|
||||
this.isClick = false;
|
||||
}
|
||||
} else if (this.step == 1) {
|
||||
if (val.length == 6) {
|
||||
this.isClick = true;
|
||||
this.password = val;
|
||||
} else {
|
||||
this.isClick = false;
|
||||
}
|
||||
} else {
|
||||
if (val.length == 6) {
|
||||
this.isClick = true;
|
||||
this.repassword = val;
|
||||
} else {
|
||||
this.isClick = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
input(val) {
|
||||
confirm() {
|
||||
if (this.isClick) {
|
||||
if (this.step == 0) {
|
||||
if (val.length == 4) {
|
||||
this.isClick = true;
|
||||
this.code = val;
|
||||
} else {
|
||||
this.isClick = false;
|
||||
}
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/verifypaypwdcode',
|
||||
data: {
|
||||
code: this.code,
|
||||
key: this.key
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.$refs.input.clear();
|
||||
this.isClick = false;
|
||||
this.step = 1;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (this.step == 1) {
|
||||
if (val.length == 6) {
|
||||
this.isClick = true;
|
||||
this.password = val;
|
||||
} else {
|
||||
this.isClick = false;
|
||||
}
|
||||
this.$refs.input.clear();
|
||||
this.isClick = false;
|
||||
this.step = 2;
|
||||
} else {
|
||||
if (val.length == 6) {
|
||||
this.isClick = true;
|
||||
this.repassword = val;
|
||||
} else {
|
||||
this.isClick = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
if (this.isClick) {
|
||||
if (this.step == 0) {
|
||||
if (this.password == this.repassword) {
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/verifypaypwdcode',
|
||||
url: '/api/member/modifypaypassword',
|
||||
data: {
|
||||
key: this.key,
|
||||
code: this.code,
|
||||
key: this.key
|
||||
password: this.password
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.$refs.input.clear();
|
||||
this.isClick = false;
|
||||
this.step = 1;
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: '修改成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
if (this.back) this.$util.redirectTo(this.back, {},
|
||||
'redirectTo');
|
||||
else this.$util.redirectTo('/pages/member/index');
|
||||
}, 2000);
|
||||
} else {
|
||||
this.initInfo();
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (this.step == 1) {
|
||||
this.$refs.input.clear();
|
||||
this.isClick = false;
|
||||
this.step = 2;
|
||||
} else {
|
||||
if (this.password == this.repassword) {
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/modifypaypassword',
|
||||
data: {
|
||||
key: this.key,
|
||||
code: this.code,
|
||||
password: this.password
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: '修改成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
if (this.back) this.$util.redirectTo(this.back, {},
|
||||
'redirectTo');
|
||||
else this.$util.redirectTo('/pages/member/index');
|
||||
}, 2000);
|
||||
} else {
|
||||
this.initInfo();
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '两次输入的密码不一致',
|
||||
success: res => {
|
||||
this.initInfo();
|
||||
}
|
||||
});
|
||||
}
|
||||
this.$util.showToast({
|
||||
title: '两次输入的密码不一致',
|
||||
success: res => {
|
||||
this.initInfo();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
initInfo() {
|
||||
this.isClick = false;
|
||||
this.step = 1;
|
||||
this.password = '';
|
||||
this.repassword = '';
|
||||
this.oldpassword = '';
|
||||
this.isSub = false;
|
||||
this.$refs.input.clear();
|
||||
},
|
||||
/**
|
||||
* 发送手机动态码
|
||||
*/
|
||||
sendMobileCode() {
|
||||
if (this.dynacodeData.seconds != 120) return;
|
||||
if (this.dynacodeData.isSend) return;
|
||||
this.dynacodeData.isSend = true;
|
||||
}
|
||||
},
|
||||
initInfo() {
|
||||
this.isClick = false;
|
||||
this.step = 1;
|
||||
this.password = '';
|
||||
this.repassword = '';
|
||||
this.oldpassword = '';
|
||||
this.isSub = false;
|
||||
this.$refs.input.clear();
|
||||
},
|
||||
/**
|
||||
* 发送手机动态码
|
||||
*/
|
||||
sendMobileCode() {
|
||||
if (this.dynacodeData.seconds != 120) return;
|
||||
if (this.dynacodeData.isSend) return;
|
||||
this.dynacodeData.isSend = true;
|
||||
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/paypwdcode',
|
||||
success: res => {
|
||||
this.dynacodeData.isSend = false;
|
||||
if (res.code >= 0) {
|
||||
this.key = res.data.key;
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/paypwdcode',
|
||||
success: res => {
|
||||
this.dynacodeData.isSend = false;
|
||||
if (res.code >= 0) {
|
||||
this.key = res.data.key;
|
||||
|
||||
if (this.dynacodeData.seconds == 120 && this.dynacodeData.timer == null) {
|
||||
this.dynacodeData.timer = setInterval(() => {
|
||||
this.dynacodeData.seconds--;
|
||||
this.dynacodeData.codeText = this.dynacodeData.seconds + 's后可重新获取';
|
||||
}, 1000);
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
if (this.dynacodeData.seconds == 120 && this.dynacodeData.timer == null) {
|
||||
this.dynacodeData.timer = setInterval(() => {
|
||||
this.dynacodeData.seconds--;
|
||||
this.dynacodeData.codeText = this.dynacodeData.seconds + 's后可重新获取';
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: 'request:fail'
|
||||
title: res.message
|
||||
});
|
||||
this.dynacodeData.isSend = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
mobile(mobile) {
|
||||
return mobile.substring(0, 4 - 1) + '****' + mobile.substring(6 + 1);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'dynacodeData.seconds': {
|
||||
handler(newValue, oldValue) {
|
||||
if (newValue == 0) {
|
||||
clearInterval(this.dynacodeData.timer);
|
||||
this.dynacodeData = {
|
||||
seconds: 120,
|
||||
timer: null,
|
||||
codeText: '获取动态码',
|
||||
isSend: false
|
||||
};
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
fail: () => {
|
||||
this.$util.showToast({
|
||||
title: 'request:fail'
|
||||
});
|
||||
this.dynacodeData.isSend = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
mobile(mobile) {
|
||||
return mobile.substring(0, 4 - 1) + '****' + mobile.substring(6 + 1);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'dynacodeData.seconds': {
|
||||
handler(newValue, oldValue) {
|
||||
if (newValue == 0) {
|
||||
clearInterval(this.dynacodeData.timer);
|
||||
this.dynacodeData = {
|
||||
seconds: 120,
|
||||
timer: null,
|
||||
codeText: '获取动态码',
|
||||
isSend: false
|
||||
};
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: #fff;
|
||||
.container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: #fff;
|
||||
|
||||
.tips {
|
||||
width: 60%;
|
||||
margin: 0 auto;
|
||||
.tips {
|
||||
width: 60%;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
padding-top: 100rpx;
|
||||
}
|
||||
|
||||
.password-wrap {
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
margin-top: 40rpx;
|
||||
|
||||
.action-tips {
|
||||
text-align: center;
|
||||
padding-top: 100rpx;
|
||||
font-weight: 600;
|
||||
margin-top: 80rpx;
|
||||
}
|
||||
|
||||
.password-wrap {
|
||||
width: 80%;
|
||||
.dynacode {
|
||||
line-height: 1;
|
||||
margin-top: 20rpx;
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 0 auto;
|
||||
margin-top: 40rpx;
|
||||
margin-top: 30rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: $border-radius;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
|
||||
.action-tips {
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
margin-top: 80rpx;
|
||||
}
|
||||
|
||||
.dynacode {
|
||||
line-height: 1;
|
||||
margin-top: 20rpx;
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 0 auto;
|
||||
margin-top: 30rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: $border-radius;
|
||||
&.disabled {
|
||||
background: #ccc !important;
|
||||
border-color: #ccc !important;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
|
||||
&.disabled {
|
||||
background: #ccc !important;
|
||||
border-color: #ccc !important;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,10 +2,9 @@
|
||||
<view :style="themeColor" class="point">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="custom-navbar" :style="{
|
||||
'padding-top': menuButtonBounding.top + 'px',
|
||||
'height': menuButtonBounding.height + 'px'
|
||||
}"
|
||||
>
|
||||
'padding-top': menuButtonBounding.top + 'px',
|
||||
'height': menuButtonBounding.height + 'px'
|
||||
}">
|
||||
<view class="navbar-wrap">
|
||||
<text class="iconfont icon-back_light back" @click="$util.redirectTo('/pages/member/index')"></text>
|
||||
<view class="navbar-title">
|
||||
@@ -14,8 +13,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<view class="head-wrap" :style="{ background: 'url(' + $util.img('public/uniapp/point/point_bg.png') + ') no-repeat right bottom/ auto 340rpx, linear-gradient(314deg, #F16914 0%, #FEAA4C 100%)' }">
|
||||
|
||||
<view class="head-wrap"
|
||||
:style="{ background: 'url(' + $util.img('public/uniapp/point/point_bg.png') + ') no-repeat right bottom/ auto 340rpx, linear-gradient(314deg, #F16914 0%, #FEAA4C 100%)' }">
|
||||
<view class="point price-font">{{ pointInfo.point }}</view>
|
||||
<view class="title">当前积分</view>
|
||||
<view class="flex-box">
|
||||
@@ -48,7 +48,7 @@
|
||||
<text class="title">积分商城</text>
|
||||
</view>
|
||||
</view>
|
||||
<!--
|
||||
<!--
|
||||
<view class="task-wrap">
|
||||
<view class="title">做任务赚积分</view>
|
||||
<view class="task-item" @click="toSign">
|
||||
@@ -75,13 +75,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsLogin,
|
||||
loadingCover
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -153,7 +151,7 @@ export default {
|
||||
return true;
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
storeToken: function (nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getMemberPoint();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view :style="themeColor">
|
||||
<!-- <view class="tab color-bg">
|
||||
<!-- <view class="tab color-bg">
|
||||
<view class="tab-left">
|
||||
<picker mode="date" :value="searchType.date" @change="bindDateChange" fields="month">
|
||||
<view class="uni-input">
|
||||
@@ -26,10 +26,12 @@
|
||||
<view class="info" @click="toFromDetail(item)">
|
||||
<view class="event">{{ item.type_name }}</view>
|
||||
<view class="time-box">
|
||||
<text class="time color-tip">{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
||||
<text class="time color-tip">{{ $util.timeStampTurnTime(item.create_time)
|
||||
}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="num color-base-text" v-if="item.account_data > 0">+{{ parseInt(item.account_data) }}</view>
|
||||
<view class="num color-base-text" v-if="item.account_data > 0">+{{
|
||||
parseInt(item.account_data) }}</view>
|
||||
<view class="num " v-else>{{ parseInt(item.account_data) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -45,21 +47,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsEmpty,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
MescrollUni,
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
@@ -103,7 +99,7 @@ export default {
|
||||
this.getPointType();
|
||||
},
|
||||
methods: {
|
||||
bindDateChange: function(e) {
|
||||
bindDateChange: function (e) {
|
||||
var temp = e.target.value;
|
||||
var tempArr = temp.split('-');
|
||||
this.date = tempArr[0] + '年' + tempArr[1] + '月';
|
||||
@@ -272,11 +268,13 @@ export default {
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
.tab-left{
|
||||
|
||||
.tab-left {
|
||||
display: flex;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
.tab-right{
|
||||
|
||||
.tab-right {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-right: 40rpx;
|
||||
@@ -297,7 +295,7 @@ export default {
|
||||
display: flex;
|
||||
height: 90rpx;
|
||||
|
||||
& > view {
|
||||
&>view {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
padding: 0 $padding;
|
||||
|
||||
@@ -30,21 +30,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsEmpty,
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
MescrollUni,
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue')
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -53,11 +53,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
loadingCover
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<text class="notice-time">发表时间: {{ $util.timeStampTurnTime(detail.create_time) }}</text>
|
||||
</view>
|
||||
<view class="notice-content"><rich-text :nodes="content"></rich-text></view>
|
||||
|
||||
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
@@ -16,126 +16,132 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import htmlParser from '@/common/js/html-parser';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
noticeId: 0,
|
||||
content: '',
|
||||
detail: {}
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.noticeId = options.notice_id || 0;
|
||||
// 小程序扫码进入
|
||||
if (options.scene) {
|
||||
var sceneParams = decodeURIComponent(options.scene);
|
||||
this.noticeId = sceneParams.split('-')[1];
|
||||
}
|
||||
if (this.noticeId == 0) {
|
||||
this.$util.redirectTo('/pages_tool/notice/list', {}, 'redirectTo');
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/notice/info',
|
||||
data: {
|
||||
id: this.noticeId
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data) {
|
||||
this.detail = res.data;
|
||||
this.content = htmlParser(res.data.content);
|
||||
this.$langConfig.title(this.detail.title);
|
||||
this.setPublicShare();
|
||||
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/notice/list', {}, 'redirectTo');
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/notice/list', {}, 'redirectTo');
|
||||
}, 2000);
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.$util.redirectTo('/pages_tool/notice/list', {}, 'redirectTo');
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置公众号分享
|
||||
setPublicShare() {
|
||||
let shareUrl = this.$config.h5Domain + '/pages_tool/notice/detail?notice_id=' + this.noticeId;
|
||||
this.$util.setPublicShare({
|
||||
title: this.detail.title,
|
||||
desc: '',
|
||||
link: shareUrl,
|
||||
imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) :
|
||||
''
|
||||
});
|
||||
}
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
var title = '[公告]' + this.detail.title;
|
||||
var path = '/pages_tool/notice/detail?notice_id=' + this.noticeId;
|
||||
return {
|
||||
title: title,
|
||||
path: path,
|
||||
success: res => {},
|
||||
fail: res => {}
|
||||
};
|
||||
},
|
||||
//分享到朋友圈
|
||||
onShareTimeline() {
|
||||
var title = this.detail.title;
|
||||
var query = 'notice_id=' + this.noticeId;
|
||||
return {
|
||||
title: title,
|
||||
query: query,
|
||||
imageUrl: ''
|
||||
};
|
||||
import htmlParser from '@/common/js/html-parser.js';
|
||||
export default {
|
||||
components: {
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
noticeId: 0,
|
||||
content: '',
|
||||
detail: {}
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.noticeId = options.notice_id || 0;
|
||||
// 小程序扫码进入
|
||||
if (options.scene) {
|
||||
var sceneParams = decodeURIComponent(options.scene);
|
||||
this.noticeId = sceneParams.split('-')[1];
|
||||
}
|
||||
};
|
||||
if (this.noticeId == 0) {
|
||||
this.$util.redirectTo('/pages_tool/notice/list', {}, 'redirectTo');
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/notice/info',
|
||||
data: {
|
||||
id: this.noticeId
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data) {
|
||||
this.detail = res.data;
|
||||
this.content = htmlParser(res.data.content);
|
||||
this.$langConfig.title(this.detail.title);
|
||||
this.setPublicShare();
|
||||
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/notice/list', {}, 'redirectTo');
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/notice/list', {}, 'redirectTo');
|
||||
}, 2000);
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.$util.redirectTo('/pages_tool/notice/list', {}, 'redirectTo');
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置公众号分享
|
||||
setPublicShare() {
|
||||
let shareUrl = this.$config.h5Domain + '/pages_tool/notice/detail?notice_id=' + this.noticeId;
|
||||
this.$util.setPublicShare({
|
||||
title: this.detail.title,
|
||||
desc: '',
|
||||
link: shareUrl,
|
||||
imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) :
|
||||
''
|
||||
});
|
||||
}
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
var title = '[公告]' + this.detail.title;
|
||||
var path = '/pages_tool/notice/detail?notice_id=' + this.noticeId;
|
||||
return {
|
||||
title: title,
|
||||
path: path,
|
||||
success: res => { },
|
||||
fail: res => { }
|
||||
};
|
||||
},
|
||||
//分享到朋友圈
|
||||
onShareTimeline() {
|
||||
var title = this.detail.title;
|
||||
var query = 'notice_id=' + this.noticeId;
|
||||
return {
|
||||
title: title,
|
||||
query: query,
|
||||
imageUrl: ''
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.notice-title {
|
||||
font-size: $font-size-toolbar;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
.notice-title {
|
||||
font-size: $font-size-toolbar;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.notice-content {
|
||||
margin-top: $margin-updown;
|
||||
word-break: break-all;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
.notice-content {
|
||||
margin-top: $margin-updown;
|
||||
word-break: break-all;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
|
||||
.notice-meta {
|
||||
text-align: left;
|
||||
margin-top: $margin-updown;
|
||||
color: $color-tip;
|
||||
.notice-meta {
|
||||
text-align: left;
|
||||
margin-top: $margin-updown;
|
||||
color: $color-tip;
|
||||
|
||||
.notice-time {
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
.notice-time {
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -28,20 +28,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsLogin,
|
||||
MescrollUni,
|
||||
nsEmpty,
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
<view class="status-name color-base-text" v-if="item.refund_status == -1">退款失败</view>
|
||||
</view>
|
||||
<view class="goods-wrap">
|
||||
<image :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(index)" mode="aspectFill" :lazy-load="true"></image>
|
||||
<image :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(index)"
|
||||
mode="aspectFill" :lazy-load="true"></image>
|
||||
<view class="goods-info">
|
||||
<view class="goods-name" @click="refundDetail(item.order_goods_id)">{{ item.sku_name }}</view>
|
||||
<view class="goods-name" @click="refundDetail(item.order_goods_id)">{{ item.sku_name
|
||||
}}</view>
|
||||
<view class="goods-num">
|
||||
<view class="num-text color-base-text">{{ item.refund_status_name }}</view>
|
||||
<view class="num-price">
|
||||
@@ -27,17 +29,14 @@
|
||||
<view class="goods-btn">
|
||||
<view class="btn-text">
|
||||
<text>共{{ item.num }}件商品</text>
|
||||
<text>退款:¥{{ item.refund_status == 3 ? item.refund_real_money : item.refund_apply_money }}</text>
|
||||
<text>退款:¥{{ item.refund_status == 3 ? item.refund_real_money :
|
||||
item.refund_apply_money }}</text>
|
||||
</view>
|
||||
<view class="order-action">
|
||||
<view class="order-box-btn" @click="refundDetail(item.order_goods_id)">查看详情</view>
|
||||
<block v-if="item.refund_action.length">
|
||||
<view
|
||||
class="order-box-btn"
|
||||
@click="refundAction(actionItem.event, item)"
|
||||
v-for="(actionItem, actionIndex) in item.refund_action"
|
||||
:key="actionIndex"
|
||||
>
|
||||
<view class="order-box-btn" @click="refundAction(actionItem.event, item)"
|
||||
v-for="(actionItem, actionIndex) in item.refund_action" :key="actionIndex">
|
||||
{{ actionItem.title }}
|
||||
</view>
|
||||
</block>
|
||||
@@ -46,7 +45,8 @@
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="cart-empty" v-if="showEmpty"><ns-empty :isIndex="false" :text="$lang('emptyTips')"></ns-empty></view>
|
||||
<view class="cart-empty" v-if="showEmpty"><ns-empty :isIndex="false"
|
||||
:text="$lang('emptyTips')"></ns-empty></view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
@@ -56,17 +56,12 @@
|
||||
|
||||
<script>
|
||||
import refundMethod from './public/js/refundMethod.js';
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MescrollUni,
|
||||
nsEmpty,
|
||||
nsLogin,
|
||||
loadingCover
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -154,8 +149,10 @@ export default {
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.cart-empty {
|
||||
padding-top: 308rpx !important;
|
||||
}
|
||||
|
||||
@import './public/css/activist.scss';
|
||||
</style>
|
||||
|
||||
@@ -10,13 +10,15 @@ export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
components: {
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.order_id) {
|
||||
this.$util.redirectTo('/pages_order/detail', {order_id: option.order_id}, 'redirectTo');
|
||||
this.$util.redirectTo('/pages_order/detail', { order_id: option.order_id }, 'redirectTo');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
<style lang="scss"></style>
|
||||
|
||||
@@ -6,27 +6,31 @@
|
||||
<view class="eval-wrap">
|
||||
<view class="eval-good">
|
||||
<view class="good-box">
|
||||
<image class="good_pic" :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(index)" mode="widthFix" />
|
||||
<image class="good_pic" :src="$util.img(item.sku_image, { size: 'mid' })"
|
||||
@error="imageError(index)" mode="widthFix" />
|
||||
<view class="good_info font-size-base">{{ item.sku_name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="eval-star" v-if="!isEvaluate">
|
||||
<view class="star-box">
|
||||
<view class="star-title color-base-bg-before">描述相符</view>
|
||||
<view class="rate-box"><sx-rate :value="goodsEvalList[index].scores" :index="index" @change="setStar" /></view>
|
||||
<view class="rate-box"><sx-rate :value="goodsEvalList[index].scores" :index="index"
|
||||
@change="setStar" /></view>
|
||||
<view class="grade-li">
|
||||
<view class="icon iconfont" :class="
|
||||
goodsEvalList[index].explain_type == '1'
|
||||
? 'icon-haoping1 color-base-text'
|
||||
: goodsEvalList[index].explain_type == '2'
|
||||
? 'icon-zhongchaping color-base-text'
|
||||
: goodsEvalList[index].explain_type == '3'
|
||||
<view class="icon iconfont" :class="goodsEvalList[index].explain_type == '1'
|
||||
? 'icon-haoping1 color-base-text'
|
||||
: goodsEvalList[index].explain_type == '2'
|
||||
? 'icon-zhongchaping color-base-text'
|
||||
: goodsEvalList[index].explain_type == '3'
|
||||
? 'icon-zhongchaping'
|
||||
: ''
|
||||
"></view>
|
||||
<view class="font-size-tag color-base-text" v-if="goodsEvalList[index].explain_type == '1'">好评</view>
|
||||
<view class="font-size-tag color-base-text" v-if="goodsEvalList[index].explain_type == '2'">中评</view>
|
||||
<view class="font-size-tag color-base-text" v-if="goodsEvalList[index].explain_type == '3'">差评</view>
|
||||
<view class="font-size-tag color-base-text"
|
||||
v-if="goodsEvalList[index].explain_type == '1'">好评</view>
|
||||
<view class="font-size-tag color-base-text"
|
||||
v-if="goodsEvalList[index].explain_type == '2'">中评</view>
|
||||
<view class="font-size-tag color-base-text"
|
||||
v-if="goodsEvalList[index].explain_type == '3'">差评</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -35,20 +39,24 @@
|
||||
<view class="eval-text">
|
||||
<view class="text-box">
|
||||
<block v-if="!isEvaluate">
|
||||
<textarea placeholder="请在此处输入您的评价" v-model="goodsEvalList[index].content" maxlength="200" />
|
||||
<textarea placeholder="请在此处输入您的评价" v-model="goodsEvalList[index].content"
|
||||
maxlength="200" />
|
||||
<text class="maxSize">{{ goodsEvalList[index].content.length }}/200</text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<textarea placeholder="请在此处输入您的追评" v-model="goodsEvalList[index].again_content" maxlength="200" />
|
||||
<textarea placeholder="请在此处输入您的追评" v-model="goodsEvalList[index].again_content"
|
||||
maxlength="200" />
|
||||
<text class="maxSize">{{ goodsEvalList[index].again_content.length }}/200</text>
|
||||
</block>
|
||||
|
||||
<view class="other-info">
|
||||
<view class="other-info-box" v-for="(i, t) in imgList[index]" :key="t">
|
||||
<image :src="$util.img(i)" mode="aspectFill" @click="preview(i, index)"></image>
|
||||
<view class="imgDel" @click="deleteImg(i, index ,t)"><text class=" icon iconfont icon-delete"></text></view>
|
||||
<view class="imgDel" @click="deleteImg(i, index, t)"><text
|
||||
class=" icon iconfont icon-delete"></text></view>
|
||||
</view>
|
||||
<view class="other-info-box active" @click="addImg(index)" v-if="imgList[index].length < 6 || imgList[index].length == undefined">
|
||||
<view class="other-info-box active" @click="addImg(index)"
|
||||
v-if="imgList[index].length < 6 || imgList[index].length == undefined">
|
||||
<text class="icon iconfont icon-zhaoxiangji"></text>
|
||||
<text>{{ imgList[index].length ? 6 - imgList[index].length : 0 }}/6</text>
|
||||
</view>
|
||||
@@ -59,7 +67,8 @@
|
||||
</view>
|
||||
<view class="eval-bottom" :class="{ 'safe-area': isIphoneX }">
|
||||
<view class="all-election" @click="isAll()" v-if="!isEvaluate">
|
||||
<view class="iconfont color-base-text" :class="isAnonymous ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
|
||||
<view class="iconfont color-base-text"
|
||||
:class="isAnonymous ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
|
||||
<text>匿名</text>
|
||||
</view>
|
||||
<view class="action-btn"><button type="primary" @click="save()">提交</button></view>
|
||||
@@ -71,16 +80,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import sxRate from '@/pages_tool/components/sx-rate/index.vue';
|
||||
import evaluate from './public/js/evaluate.js';
|
||||
export default {
|
||||
components: {
|
||||
sxRate
|
||||
},
|
||||
mixins: [evaluate],
|
||||
};
|
||||
|
||||
import evaluate from './public/js/evaluate.js';
|
||||
export default {
|
||||
components: {
|
||||
sxRate: () => import('@/pages_tool/components/sx-rate/index.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
mixins: [evaluate],
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/evaluate.scss'
|
||||
@import './public/css/evaluate.scss'
|
||||
</style>
|
||||
@@ -1,22 +1,27 @@
|
||||
<template>
|
||||
<view :style="themeColor">
|
||||
<scroll-view class="order-nav" :scroll-x="true" :show-scrollbar="false">
|
||||
<view v-for="(packageItem, packageIndex) in packageList" :key="packageIndex" class="uni-tab-item" @click="ontabtap(packageIndex)">
|
||||
<text class="uni-tab-item-title" :class="packageIndex == currIndex ? 'uni-tab-item-title-active color-base-border color-base-text' : ''">
|
||||
<view v-for="(packageItem, packageIndex) in packageList" :key="packageIndex" class="uni-tab-item"
|
||||
@click="ontabtap(packageIndex)">
|
||||
<text class="uni-tab-item-title"
|
||||
:class="packageIndex == currIndex ? 'uni-tab-item-title-active color-base-border color-base-text' : ''">
|
||||
{{ packageItem.package_name }}
|
||||
</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view v-for="(packageItem, packageIndex) in packageList" :key="packageIndex" class="swiper-item" v-show="packageIndex == currIndex">
|
||||
<view v-for="(packageItem, packageIndex) in packageList" :key="packageIndex" class="swiper-item"
|
||||
v-show="packageIndex == currIndex">
|
||||
<view class="container">
|
||||
<view class="goods-wrap">
|
||||
<view class="body">
|
||||
<view class="goods" v-for="(goodsItem, goodsIndex) in packageItem.goods_list" :key="goodsIndex">
|
||||
<view class="goods-img" @click="toGoodsDetail(goodsItem.sku_id)">
|
||||
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })" @error="imageError(packageIndex, goodsIndex)" mode="aspectFill"></image>
|
||||
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })"
|
||||
@error="imageError(packageIndex, goodsIndex)" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<view @click="toGoodsDetail(goodsItem.sku_id)" class="goods-name">{{ goodsItem.sku_name }}</view>
|
||||
<view @click="toGoodsDetail(goodsItem.sku_id)" class="goods-name">{{ goodsItem.sku_name
|
||||
}}</view>
|
||||
<view class="goods-sub-section">
|
||||
<view>
|
||||
<text>
|
||||
@@ -31,7 +36,9 @@
|
||||
</view>
|
||||
|
||||
<view class="express-company-wrap" v-if="packageItem.delivery_type == 1">
|
||||
<view class="company-logo"><image :src="$util.img(packageItem.express_company_image)"></image></view>
|
||||
<view class="company-logo">
|
||||
<image :src="$util.img(packageItem.express_company_image)"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="company">
|
||||
<text>承运公司: {{ packageItem.express_company_name }}</text>
|
||||
@@ -48,16 +55,14 @@
|
||||
|
||||
<view class="track-wrap" v-if="packageItem.delivery_type == 1">
|
||||
<block v-if="packageItem.trace.success && packageItem.trace.list.length != 0">
|
||||
<view
|
||||
class="track-item"
|
||||
v-for="(traceItem, traceIndex) in packageItem.trace.list"
|
||||
:class="traceIndex == 0 ? 'active' : ''"
|
||||
:key="traceIndex"
|
||||
>
|
||||
<view class="track-item" v-for="(traceItem, traceIndex) in packageItem.trace.list"
|
||||
:class="traceIndex == 0 ? 'active' : ''" :key="traceIndex">
|
||||
<view class="dot" :class="traceIndex == 0 ? 'color-base-bg' : ''"></view>
|
||||
<view class="msg">
|
||||
<view class="text" :class="traceIndex == 0 ? 'color-base-text' : ''">{{ traceItem.remark }}</view>
|
||||
<view class="time" :class="traceIndex == 0 ? 'color-base-text' : ''">{{ traceItem.datetime }}</view>
|
||||
<view class="text" :class="traceIndex == 0 ? 'color-base-text' : ''">{{ traceItem.remark
|
||||
}}</view>
|
||||
<view class="time" :class="traceIndex == 0 ? 'color-base-text' : ''">{{
|
||||
traceItem.datetime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -76,6 +81,9 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
orderId: '',
|
||||
@@ -143,7 +151,7 @@ export default {
|
||||
this.packageList[packageIndex].goods_list[goodsIndex].sku_image = this.$util.getDefaultImage().goods;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
copyDeliveryNo(value){
|
||||
copyDeliveryNo(value) {
|
||||
this.$util.copy(value);
|
||||
}
|
||||
}
|
||||
@@ -152,6 +160,7 @@ export default {
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/logistics.scss';
|
||||
|
||||
/deep/.uni-scroll-view ::-webkit-scrollbar {
|
||||
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
|
||||
display: none;
|
||||
@@ -160,6 +169,7 @@ export default {
|
||||
color: transparent;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/deep/::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0;
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
<scroll-view scroll-y="true" class="refund-container">
|
||||
<view class="goods-wrap">
|
||||
<view class="goods-img">
|
||||
<image :src="$util.img(refund_data.order_goods_info.sku_image, { size: 'mid' })" @error="refund_data.order_goods_info.sku_image = $util.getDefaultImage().goods" mode="aspectFill" :lazy-load="true"/>
|
||||
<image :src="$util.img(refund_data.order_goods_info.sku_image, { size: 'mid' })"
|
||||
@error="refund_data.order_goods_info.sku_image = $util.getDefaultImage().goods"
|
||||
mode="aspectFill" :lazy-load="true" />
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<view class="goods-name">{{ refund_data.order_goods_info.sku_name }}</view>
|
||||
@@ -40,32 +42,23 @@
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
<view class="label">退款金额:</view>
|
||||
<view class="cont color-base-text">{{ $lang('common.currencySymbol') }}{{ refund_data.refund_money }}</view>
|
||||
<view class="cont color-base-text">{{ $lang('common.currencySymbol') }}{{
|
||||
refund_data.refund_money }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="refund-form">
|
||||
<view class="item-wrap"><view class="label active">退款说明</view></view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="label active">退款说明</view>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<textarea
|
||||
v-if="!showText"
|
||||
class="newText"
|
||||
placeholder="请输入退款说明(选填)"
|
||||
placeholder-class="color-tip font-size-tag"
|
||||
:auto-height="true"
|
||||
v-model="refund_remark"
|
||||
/>
|
||||
<textarea v-if="!showText" class="newText" placeholder="请输入退款说明(选填)"
|
||||
placeholder-class="color-tip font-size-tag" :auto-height="true" v-model="refund_remark" />
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<textarea
|
||||
class="newText"
|
||||
placeholder="请输入退款说明(选填)"
|
||||
@blur="textBlur()"
|
||||
placeholder-class="color-tip font-size-tag"
|
||||
:auto-height="true"
|
||||
v-model="refund_remark"
|
||||
/>
|
||||
<textarea class="newText" placeholder="请输入退款说明(选填)" @blur="textBlur()"
|
||||
placeholder-class="color-tip font-size-tag" :auto-height="true" v-model="refund_remark" />
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
|
||||
@@ -79,14 +72,18 @@
|
||||
<view class="refund-reason-popup popup">
|
||||
<view class="popup-header">
|
||||
<view><text class="tit">退款原因</text></view>
|
||||
<view class="align-right" @click="closePopup('refundReasonPopup')"><text class="iconfont icon-close"></text></view>
|
||||
<view class="align-right" @click="closePopup('refundReasonPopup')"><text
|
||||
class="iconfont icon-close"></text></view>
|
||||
</view>
|
||||
<view class="popup-body">
|
||||
<scroll-view scroll-y="true" class="scroll-view" :class="{ 'safe-area': isIphoneX }">
|
||||
<view class="reason-list">
|
||||
<view class="item" v-for="(item, index) in refund_data.refund_reason_type" :key="index" @click="changeReason(item)">
|
||||
<view class="item" v-for="(item, index) in refund_data.refund_reason_type"
|
||||
:key="index" @click="changeReason(item)">
|
||||
<view class="reason">{{ item }}</view>
|
||||
<view class="iconfont" :class="refund_reason == item ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
|
||||
<view class="iconfont"
|
||||
:class="refund_reason == item ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -98,16 +95,16 @@
|
||||
</uni-popup>
|
||||
</scroll-view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniPopup
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -191,7 +188,7 @@ export default {
|
||||
if (this.verify()) {
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
|
||||
|
||||
// #ifdef MP
|
||||
this.subscribeMessage(() => {
|
||||
this.$api.sendRequest({
|
||||
@@ -216,7 +213,7 @@ export default {
|
||||
});
|
||||
})
|
||||
// #endif
|
||||
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
this.$api.sendRequest({
|
||||
url: '/api/orderrefund/refund',
|
||||
@@ -257,7 +254,7 @@ export default {
|
||||
/**
|
||||
* 微信订阅消息
|
||||
*/
|
||||
subscribeMessage(callback){
|
||||
subscribeMessage(callback) {
|
||||
this.$api.sendRequest({
|
||||
url: '/weapp/api/weapp/messagetmplids',
|
||||
data: {
|
||||
@@ -270,7 +267,7 @@ export default {
|
||||
fail: (res) => {
|
||||
console.log('fail', res)
|
||||
},
|
||||
complete: ()=> {
|
||||
complete: () => {
|
||||
callback();
|
||||
}
|
||||
})
|
||||
@@ -290,15 +287,18 @@ export default {
|
||||
<style lang="scss">
|
||||
@import './public/css/refund.scss';
|
||||
</style>
|
||||
<style scoped>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
background: none;
|
||||
max-height: unset !important;
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
|
||||
/deep/ .uni-popup__wrapper {
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
/deep/ .uni-popup {
|
||||
z-index: 8;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
<view :style="themeColor">
|
||||
<view>
|
||||
<scroll-view scroll-y="true" class="refund-container">
|
||||
<view class="goods-wrap" v-for="(item,index) in refund_data.order_goods_info" :key="index">
|
||||
<view class="goods-wrap" v-for="(item, index) in refund_data.order_goods_info" :key="index">
|
||||
<view class="goods-img">
|
||||
<image :src="$util.img(item.sku_image, { size: 'mid' })" @error="item.sku_image = $util.getDefaultImage().goods" mode="aspectFill" :lazy-load="true"/>
|
||||
<image :src="$util.img(item.sku_image, { size: 'mid' })"
|
||||
@error="item.sku_image = $util.getDefaultImage().goods" mode="aspectFill"
|
||||
:lazy-load="true" />
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<view class="goods-name">{{ item.sku_name }}</view>
|
||||
@@ -12,7 +14,7 @@
|
||||
</view>
|
||||
|
||||
<view>
|
||||
|
||||
|
||||
<view class="refund-form">
|
||||
<view class="item-wrap" @click="openPopup('refundReasonPopup')">
|
||||
<view class="label">退款原因:</view>
|
||||
@@ -29,32 +31,23 @@
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
<view class="label">退款金额:</view>
|
||||
<view class="cont color-base-text">{{ $lang('common.currencySymbol') }}{{ refund_data.refund_money }}</view>
|
||||
<view class="cont color-base-text">{{ $lang('common.currencySymbol') }}{{
|
||||
refund_data.refund_money }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="refund-form">
|
||||
<view class="item-wrap"><view class="label active">退款说明</view></view>
|
||||
|
||||
<view class="item-wrap">
|
||||
<view class="label active">退款说明</view>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<textarea
|
||||
v-if="!showText"
|
||||
class="newText"
|
||||
placeholder="请输入退款说明(选填)"
|
||||
placeholder-class="color-tip font-size-tag"
|
||||
:auto-height="true"
|
||||
v-model="refund_remark"
|
||||
/>
|
||||
<textarea v-if="!showText" class="newText" placeholder="请输入退款说明(选填)"
|
||||
placeholder-class="color-tip font-size-tag" :auto-height="true" v-model="refund_remark" />
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<textarea
|
||||
class="newText"
|
||||
placeholder="请输入退款说明(选填)"
|
||||
@blur="textBlur()"
|
||||
placeholder-class="color-tip font-size-tag"
|
||||
:auto-height="true"
|
||||
v-model="refund_remark"
|
||||
/>
|
||||
<textarea class="newText" placeholder="请输入退款说明(选填)" @blur="textBlur()"
|
||||
placeholder-class="color-tip font-size-tag" :auto-height="true" v-model="refund_remark" />
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
|
||||
@@ -69,14 +62,18 @@
|
||||
<view class="refund-reason-popup popup">
|
||||
<view class="popup-header">
|
||||
<view><text class="tit">退款原因</text></view>
|
||||
<view class="align-right" @click="closePopup('refundReasonPopup')"><text class="iconfont icon-close"></text></view>
|
||||
<view class="align-right" @click="closePopup('refundReasonPopup')"><text
|
||||
class="iconfont icon-close"></text></view>
|
||||
</view>
|
||||
<view class="popup-body">
|
||||
<scroll-view scroll-y="true" class="scroll-view" :class="{ 'safe-area': isIphoneX }">
|
||||
<view class="reason-list">
|
||||
<view class="item" v-for="(item, index) in refund_data.refund_reason_type" :key="index" @click="changeReason(item)">
|
||||
<view class="item" v-for="(item, index) in refund_data.refund_reason_type"
|
||||
:key="index" @click="changeReason(item)">
|
||||
<view class="reason">{{ item }}</view>
|
||||
<view class="iconfont" :class="refund_reason == item ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
|
||||
<view class="iconfont"
|
||||
:class="refund_reason == item ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -88,16 +85,17 @@
|
||||
</uni-popup>
|
||||
</scroll-view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniPopup
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -118,7 +116,7 @@ export default {
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.order_goods_id) this.order_goods_id = option.order_goods_id;
|
||||
|
||||
|
||||
if (option.refund_type) this.refund_type = option.refund_type;
|
||||
},
|
||||
onShow() {
|
||||
@@ -183,7 +181,7 @@ export default {
|
||||
if (this.verify()) {
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
|
||||
|
||||
// #ifdef MP
|
||||
this.subscribeMessage(() => {
|
||||
this.$api.sendRequest({
|
||||
@@ -198,8 +196,8 @@ export default {
|
||||
this.$util.showToast({ title: res.message });
|
||||
if (res.code >= 0) {
|
||||
uni.removeStorage({
|
||||
key:'refund_goods_data',
|
||||
success:res=>{
|
||||
key: 'refund_goods_data',
|
||||
success: res => {
|
||||
this.$util.redirectTo('/pages_tool/order/activist');
|
||||
}
|
||||
})
|
||||
@@ -213,7 +211,7 @@ export default {
|
||||
});
|
||||
})
|
||||
// #endif
|
||||
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
this.$api.sendRequest({
|
||||
url: '/api/orderrefund/refund',
|
||||
@@ -227,8 +225,8 @@ export default {
|
||||
this.$util.showToast({ title: res.message });
|
||||
if (res.code >= 0) {
|
||||
uni.removeStorage({
|
||||
key:'refund_goods_data',
|
||||
success:res=>{
|
||||
key: 'refund_goods_data',
|
||||
success: res => {
|
||||
this.$util.redirectTo('/pages_tool/order/activist');
|
||||
}
|
||||
})
|
||||
@@ -259,7 +257,7 @@ export default {
|
||||
/**
|
||||
* 微信订阅消息
|
||||
*/
|
||||
subscribeMessage(callback){
|
||||
subscribeMessage(callback) {
|
||||
this.$api.sendRequest({
|
||||
url: '/weapp/api/weapp/messagetmplids',
|
||||
data: {
|
||||
@@ -272,7 +270,7 @@ export default {
|
||||
fail: (res) => {
|
||||
console.log('fail', res)
|
||||
},
|
||||
complete: ()=> {
|
||||
complete: () => {
|
||||
callback();
|
||||
}
|
||||
})
|
||||
@@ -292,19 +290,22 @@ export default {
|
||||
<style lang="scss">
|
||||
@import './public/css/refund.scss';
|
||||
</style>
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
background: none;
|
||||
max-height: unset !important;
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
|
||||
/deep/ .uni-popup__wrapper {
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
/deep/ .uni-popup {
|
||||
z-index: 8;
|
||||
}
|
||||
.sub-btn{
|
||||
|
||||
.sub-btn {
|
||||
padding-top: 20rpx;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
<!-- 商品信息 -->
|
||||
<view class="goods-wrap">
|
||||
<view class="goods-img" @click="refundDetail(detail)">
|
||||
<image :src="$util.img(detail.sku_image, { size: 'mid' })" @error="imageError()" mode="aspectFill" :lazy-load="true"></image>
|
||||
<image :src="$util.img(detail.sku_image, { size: 'mid' })" @error="imageError()"
|
||||
mode="aspectFill" :lazy-load="true"></image>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<view class="goods-name" @click="refundDetail(detail)">{{ detail.sku_name }}</view>
|
||||
@@ -49,21 +50,26 @@
|
||||
<!-- 退款信息 -->
|
||||
<view class="info">
|
||||
<view class="cell">退款方式:{{ detail.refund_type == 1 ? '仅退款' : '退款退货' }}</view>
|
||||
<view class="cell" v-if="detail.refund_status == 3">退款途径:{{ detail.refund_money_type == 1 ? '原路退款' : detail.refund_money_type == 2 ? '线下退款' : '退款到余额' }}</view>
|
||||
<view class="cell" v-if="detail.refund_status == 3">退款途径:{{ detail.refund_money_type == 1 ?
|
||||
'原路退款' : detail.refund_money_type == 2 ? '线下退款' : '退款到余额' }}</view>
|
||||
<view class="cell">退款原因:{{ detail.refund_reason }}</view>
|
||||
<view class="cell" v-if="detail.refund_status == 3 && detail.refund_real_money>0">退款金额:{{ $lang('common.currencySymbol') }}{{ detail.refund_real_money }}</view>
|
||||
<view class="cell" v-else-if="detail.refund_apply_money>0">退款金额:{{ $lang('common.currencySymbol') }}{{ detail.refund_apply_money }}</view>
|
||||
<view class="cell" v-if="detail.refund_status == 3 && detail.refund_real_money > 0">退款金额:{{
|
||||
$lang('common.currencySymbol') }}{{ detail.refund_real_money }}</view>
|
||||
<view class="cell" v-else-if="detail.refund_apply_money > 0">退款金额:{{
|
||||
$lang('common.currencySymbol') }}{{ detail.refund_apply_money }}</view>
|
||||
<view class="cell">退款编号:{{ detail.refund_no }}</view>
|
||||
<view class="cell">申请时间:{{ $util.timeStampTurnTime(detail.refund_action_time) }}</view>
|
||||
<view class="cell" v-if="detail.refund_time">退款时间:{{ $util.timeStampTurnTime(detail.refund_time) }}</view>
|
||||
<view class="cell" v-if="detail.refund_time">退款时间:{{
|
||||
$util.timeStampTurnTime(detail.refund_time) }}</view>
|
||||
<view class="cell" v-if="detail.refund_remark != ''">退款说明:{{ detail.refund_remark }}</view>
|
||||
<view class="cell" v-if="detail.use_point>0">退款积分:{{ detail.use_point }}</view>
|
||||
<view class="cell" v-if="detail.use_point > 0">退款积分:{{ detail.use_point }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="action" :class="{ 'bottom-safe-area': isIphoneX }" v-if="detail.refund_action.length">
|
||||
<view class="order-box-btn" v-for="(actionItem, actionIndex) in detail.refund_action" :key="actionIndex" @click="refundAction(actionItem.event)">
|
||||
<view class="order-box-btn" v-for="(actionItem, actionIndex) in detail.refund_action"
|
||||
:key="actionIndex" @click="refundAction(actionItem.event)">
|
||||
{{ actionItem.title }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -75,37 +81,24 @@
|
||||
<view class="item">
|
||||
<view class="label">物流公司</view>
|
||||
<view class="cont">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="请输入物流公司"
|
||||
class="input"
|
||||
<input type="text" placeholder="请输入物流公司" class="input"
|
||||
placeholder-class="input-placeholder color-tip"
|
||||
v-model="formData.refund_delivery_name"
|
||||
/>
|
||||
v-model="formData.refund_delivery_name" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">物流单号</view>
|
||||
<view class="cont">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="请输入物流单号"
|
||||
class="input"
|
||||
<input type="text" placeholder="请输入物流单号" class="input"
|
||||
placeholder-class="input-placeholder color-tip"
|
||||
v-model="formData.refund_delivery_no"
|
||||
/>
|
||||
v-model="formData.refund_delivery_no" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">物流说明</view>
|
||||
<view class="cont">
|
||||
<textarea
|
||||
placeholder-class="color-tip font-size-tag"
|
||||
:auto-height="true"
|
||||
class="textarea"
|
||||
placeholder="选填"
|
||||
v-model="formData.refund_delivery_remark"
|
||||
/>
|
||||
<textarea placeholder-class="color-tip font-size-tag" :auto-height="true"
|
||||
class="textarea" placeholder="选填" v-model="formData.refund_delivery_remark" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -115,7 +108,8 @@
|
||||
|
||||
<view v-show="action == 'consultrecord'">
|
||||
<view class="record-wrap">
|
||||
<view class="record-item" :class="logItem.action_way == 1 ? 'buyer' : ''" v-for="(logItem, logIndex) in detail.refund_log_list" :key="logIndex">
|
||||
<view class="record-item" :class="logItem.action_way == 1 ? 'buyer' : ''"
|
||||
v-for="(logItem, logIndex) in detail.refund_log_list" :key="logIndex">
|
||||
<view class="cont">
|
||||
<view class="head">
|
||||
<text>{{ logItem.action_way == 1 ? '买家' : '卖家' }}</text>
|
||||
@@ -130,7 +124,7 @@
|
||||
<view class="empty-box"></view>
|
||||
</view>
|
||||
<view class="history-bottom" :class="{ 'bottom-safe-area': isIphoneX }">
|
||||
<!-- <ns-contact :niushop="{order_id: detail.order_id}">
|
||||
<!-- <ns-contact :niushop="{order_id: detail.order_id}">
|
||||
<view>
|
||||
<text class="iconfont icon-ziyuan"></text>
|
||||
<text>联系客服</text>
|
||||
@@ -141,15 +135,19 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import refundMethod from './public/js/refundMethod.js';
|
||||
import validate from 'common/js/validate.js';
|
||||
import nsContact from '@/components/ns-contact/ns-contact.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsContact: () => import('@/components/ns-contact/ns-contact.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
order_goods_id: '',
|
||||
@@ -166,9 +164,6 @@ export default {
|
||||
isSub: false
|
||||
};
|
||||
},
|
||||
components: {
|
||||
nsContact
|
||||
},
|
||||
mixins: [refundMethod],
|
||||
onLoad(option) {
|
||||
if (option.order_goods_id) this.order_goods_id = option.order_goods_id;
|
||||
|
||||
@@ -1,225 +1,236 @@
|
||||
<template>
|
||||
<view class="goods-select" :style="themeColor">
|
||||
<view class="top">
|
||||
共<text class="color-base-text">{{refund_data.length}}</text>件商品
|
||||
共<text class="color-base-text">{{ refund_data.length }}</text>件商品
|
||||
</view>
|
||||
|
||||
|
||||
<view class="body">
|
||||
<view class="item" v-for="(item,index) in refund_data" :key="index">
|
||||
<view class="item" v-for="(item, index) in refund_data" :key="index">
|
||||
<view @click="single(index)" style="display:none">
|
||||
<text v-if="item.judge" class="iconfont icon-yuan_checked color-base-text"></text>
|
||||
<text v-else class="iconfont icon-yuan_checkbox"></text>
|
||||
</view>
|
||||
<image :src="$util.img(item.sku_image)" @error="error(index)"></image>
|
||||
<view class="title">
|
||||
<text>{{item.sku_name}}</text>
|
||||
<text>{{ item.sku_name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="bottom-all">
|
||||
<view >
|
||||
<!-- @click="all"
|
||||
<view>
|
||||
<!-- @click="all"
|
||||
<text v-if="judge" class="iconfont icon-yuan_checked color-base-text"></text>
|
||||
<text v-else class="iconfont icon-yuan_checkbox"></text> -->
|
||||
</view>
|
||||
|
||||
|
||||
<view v-if="nexthover" class="next" @click="next">下一步</view>
|
||||
<view v-else class="next nexthover">请选择商品</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <loading-cover ref="loadingCover"></loading-cover> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default{
|
||||
data(){
|
||||
return{
|
||||
refund_type:1,
|
||||
refund_data:[],
|
||||
judge:true,
|
||||
order_goods_id:[],
|
||||
nexthover:true
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(option){
|
||||
if(option.refund_type){
|
||||
this.refund_type = option.refund_type;
|
||||
this.getGoodsInfo()
|
||||
} else{
|
||||
uni.showToast({
|
||||
title:'未查找到订单信息',
|
||||
icon:'none'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.$util.redirectTo('/pages_order/list');
|
||||
},1000)
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
/**
|
||||
* 处理商品选中数据
|
||||
*/
|
||||
getGoodsInfo(){
|
||||
uni.getStorage({
|
||||
key:'refund_goods_data',
|
||||
success:res=>{
|
||||
let refund_data = JSON.parse(res.data);
|
||||
this.refund_data = [];
|
||||
refund_data.forEach(item=>{
|
||||
if(item.refund_status == 0){
|
||||
item.judge = true;
|
||||
this.refund_data.push(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
*单选事件
|
||||
*/
|
||||
single(key){
|
||||
this.refund_data[key].judge = !this.refund_data[key].judge;
|
||||
let allJudge = true;
|
||||
|
||||
this.refund_data.forEach((item)=>{
|
||||
if(!item.judge){
|
||||
allJudge = false;
|
||||
}
|
||||
})
|
||||
this.judge = allJudge;
|
||||
|
||||
this.getOrderIdInfo();
|
||||
this.$forceUpdate()
|
||||
},
|
||||
/**
|
||||
* 全选选择
|
||||
*/
|
||||
all(){
|
||||
|
||||
this.judge = !this.judge;
|
||||
this.refund_data.map(item=>{
|
||||
item.judge = this.judge;
|
||||
return item;
|
||||
})
|
||||
|
||||
this.getOrderIdInfo();
|
||||
this.$forceUpdate()
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取选择的order_goods_id
|
||||
*/
|
||||
getOrderIdInfo(){
|
||||
this.order_goods_id = [];
|
||||
this.refund_data.forEach(item=>{
|
||||
if(item.judge){
|
||||
this.order_goods_id.push(item.order_goods_id)
|
||||
}
|
||||
})
|
||||
if(this.order_goods_id.length == 0){
|
||||
this.nexthover = false;
|
||||
}else{
|
||||
this.nexthover = true;
|
||||
export default {
|
||||
components: {
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
refund_type: 1,
|
||||
refund_data: [],
|
||||
judge: true,
|
||||
order_goods_id: [],
|
||||
nexthover: true
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(option) {
|
||||
if (option.refund_type) {
|
||||
this.refund_type = option.refund_type;
|
||||
this.getGoodsInfo()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '未查找到订单信息',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_order/list');
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 处理商品选中数据
|
||||
*/
|
||||
getGoodsInfo() {
|
||||
uni.getStorage({
|
||||
key: 'refund_goods_data',
|
||||
success: res => {
|
||||
let refund_data = JSON.parse(res.data);
|
||||
this.refund_data = [];
|
||||
refund_data.forEach(item => {
|
||||
if (item.refund_status == 0) {
|
||||
item.judge = true;
|
||||
this.refund_data.push(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.$forceUpdate();
|
||||
},
|
||||
/**
|
||||
* 跳转退款界面
|
||||
*/
|
||||
next(){
|
||||
this.refund_data.forEach(item=>{
|
||||
})
|
||||
},
|
||||
/**
|
||||
*单选事件
|
||||
*/
|
||||
single(key) {
|
||||
this.refund_data[key].judge = !this.refund_data[key].judge;
|
||||
let allJudge = true;
|
||||
|
||||
this.refund_data.forEach((item) => {
|
||||
if (!item.judge) {
|
||||
allJudge = false;
|
||||
}
|
||||
})
|
||||
this.judge = allJudge;
|
||||
|
||||
this.getOrderIdInfo();
|
||||
this.$forceUpdate()
|
||||
},
|
||||
/**
|
||||
* 全选选择
|
||||
*/
|
||||
all() {
|
||||
|
||||
this.judge = !this.judge;
|
||||
this.refund_data.map(item => {
|
||||
item.judge = this.judge;
|
||||
return item;
|
||||
})
|
||||
|
||||
this.getOrderIdInfo();
|
||||
this.$forceUpdate()
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取选择的order_goods_id
|
||||
*/
|
||||
getOrderIdInfo() {
|
||||
this.order_goods_id = [];
|
||||
this.refund_data.forEach(item => {
|
||||
if (item.judge) {
|
||||
this.order_goods_id.push(item.order_goods_id)
|
||||
})
|
||||
if(this.order_goods_id.length == 0){
|
||||
this.getOrderIdInfo();
|
||||
}
|
||||
|
||||
this.$util.redirectTo('/pages_tool/order/refund_batch', { order_goods_id: this.order_goods_id.join(), refund_type:this.refund_type });
|
||||
},
|
||||
/**
|
||||
* 默认图片处理
|
||||
*/
|
||||
error(index){
|
||||
this.refund_data[index].sku_image = this.$util.getDefaultImage().goods
|
||||
this.$forceUpdate();
|
||||
})
|
||||
if (this.order_goods_id.length == 0) {
|
||||
this.nexthover = false;
|
||||
} else {
|
||||
this.nexthover = true;
|
||||
}
|
||||
|
||||
this.$forceUpdate();
|
||||
},
|
||||
/**
|
||||
* 跳转退款界面
|
||||
*/
|
||||
next() {
|
||||
this.refund_data.forEach(item => {
|
||||
this.order_goods_id.push(item.order_goods_id)
|
||||
})
|
||||
if (this.order_goods_id.length == 0) {
|
||||
this.getOrderIdInfo();
|
||||
}
|
||||
|
||||
this.$util.redirectTo('/pages_tool/order/refund_batch', { order_goods_id: this.order_goods_id.join(), refund_type: this.refund_type });
|
||||
},
|
||||
/**
|
||||
* 默认图片处理
|
||||
*/
|
||||
error(index) {
|
||||
this.refund_data[index].sku_image = this.$util.getDefaultImage().goods
|
||||
this.$forceUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.goods-select{
|
||||
.top{
|
||||
padding: 20rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 28rpx;
|
||||
background: #FFFFFF;
|
||||
text{
|
||||
font-size: 30rpx;
|
||||
margin: 0 10rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.iconfont{
|
||||
font-size: 40rpx;
|
||||
}
|
||||
.body{
|
||||
margin: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #FFFFFF;
|
||||
padding: 30rpx 0 0;
|
||||
.item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 30rpx 30rpx;
|
||||
.goods-select {
|
||||
.top {
|
||||
padding: 20rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 28rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
image{
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.title{
|
||||
width: 368rpx;
|
||||
height:180rpx;
|
||||
font-size: 28rpx;
|
||||
text{
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
}
|
||||
}
|
||||
text {
|
||||
font-size: 30rpx;
|
||||
margin: 0 10rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.bottom-all{
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
.body {
|
||||
margin: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #FFFFFF;
|
||||
padding: 30rpx 0 0;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #FFFFFF;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
.next{
|
||||
padding: 16rpx 80rpx;
|
||||
color: #FFFFFF;
|
||||
background: #ff4544;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
image {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.nexthover{
|
||||
background: #e7dcdc !important;
|
||||
|
||||
.title {
|
||||
width: 368rpx;
|
||||
height: 180rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
text {
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.bottom-all {
|
||||
padding-left: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #FFFFFF;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
.next {
|
||||
padding: 16rpx 80rpx;
|
||||
color: #FFFFFF;
|
||||
background: #ff4544;
|
||||
}
|
||||
|
||||
.nexthover {
|
||||
background: #e7dcdc !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -25,96 +25,97 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
export default {
|
||||
components: {
|
||||
uniPopup
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
order_id: '',
|
||||
isIphoneX: false,
|
||||
refund_data: {},
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.order_id) this.order_id = option.order_id;
|
||||
},
|
||||
onShow() {
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
if (this.storeToken) {
|
||||
this.getRefundData();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/login/login', {
|
||||
back: '/pages_tool/order/refund?order_goods_id=' + this.order_goods_id
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 选择退款方式
|
||||
* @param {Object} type
|
||||
*/
|
||||
selectRefundType(type) {
|
||||
this.$util.redirectTo('/pages_tool/order/refund_goods_select', {
|
||||
refund_type: type
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取退款订单数据
|
||||
*/
|
||||
getRefundData() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/order/detail',
|
||||
data: {
|
||||
order_id: this.order_id
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.refund_data = res.data;
|
||||
uni.setStorage({
|
||||
key: 'refund_goods_data',
|
||||
data: JSON.stringify(res.data.order_goods),
|
||||
})
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '未获取到该订单项退款信息'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_order/list');
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
order_id: '',
|
||||
isIphoneX: false,
|
||||
refund_data: {},
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.order_id) this.order_id = option.order_id;
|
||||
},
|
||||
onShow() {
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
if (this.storeToken) {
|
||||
this.getRefundData();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/login/login', {
|
||||
back: '/pages_tool/order/refund?order_goods_id=' + this.order_goods_id
|
||||
});
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 选择退款方式
|
||||
* @param {Object} type
|
||||
*/
|
||||
selectRefundType(type) {
|
||||
this.$util.redirectTo('/pages_tool/order/refund_goods_select', {
|
||||
refund_type: type
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取退款订单数据
|
||||
*/
|
||||
getRefundData() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/order/detail',
|
||||
data: {
|
||||
order_id: this.order_id
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.refund_data = res.data;
|
||||
uni.setStorage({
|
||||
key: 'refund_goods_data',
|
||||
data: JSON.stringify(res.data.order_goods),
|
||||
})
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '未获取到该订单项退款信息'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_order/list');
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/refund.scss';
|
||||
@import './public/css/refund.scss';
|
||||
</style>
|
||||
<style scoped>
|
||||
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
background: none;
|
||||
max-height: unset !important;
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
background: none;
|
||||
max-height: unset !important;
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
|
||||
/deep/ .uni-popup__wrapper {
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
/deep/ .uni-popup__wrapper {
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
/deep/ .uni-popup {
|
||||
z-index: 8;
|
||||
}
|
||||
/deep/ .uni-popup {
|
||||
z-index: 8;
|
||||
}
|
||||
|
||||
.sub-btn {
|
||||
padding-top: 20rpx;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.sub-btn {
|
||||
padding-top: 20rpx;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
</style>
|
||||
@@ -7,15 +7,17 @@
|
||||
<text class="unit price-font">¥</text>
|
||||
<text class="money price-font">{{ payInfo.pay_money | moneyFormat }}</text>
|
||||
</view>
|
||||
|
||||
|
||||
<block v-if="payTypeList.length > 0">
|
||||
<view class="pay-type">
|
||||
<view class="payment-item" v-for="(item, index) in payTypeList" :key="index" @click="payIndex = index">
|
||||
<view class="payment-item" v-for="(item, index) in payTypeList" :key="index"
|
||||
@click="payIndex = index">
|
||||
<view>
|
||||
<text class="iconfont" :class="item.icon"></text>
|
||||
<text class="name">{{ item.name }}</text>
|
||||
</view>
|
||||
<text class="iconfont" :class="payIndex == index ? 'icon-yuan_checked color-base-text' : 'icon-checkboxblank'"></text>
|
||||
<text class="iconfont"
|
||||
:class="payIndex == index ? 'icon-yuan_checked color-base-text' : 'icon-checkboxblank'"></text>
|
||||
</view>
|
||||
</view>
|
||||
<button type="primary" @click="confirm">确认支付</button>
|
||||
@@ -31,11 +33,13 @@
|
||||
|
||||
<script>
|
||||
import { Weixin } from 'common/js/wx-jssdk.js';
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
|
||||
export default {
|
||||
components: { nsLogin, nsEmpty },
|
||||
components: {
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
payIndex: 0,
|
||||
@@ -86,7 +90,7 @@ export default {
|
||||
this.autoPay();
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -106,10 +110,10 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
autoPay(){
|
||||
autoPay() {
|
||||
if (!this.payTypeList.length) return;
|
||||
if (this.$util.isWeiXin()) {
|
||||
this.payTypeList.forEach((item, index) => {
|
||||
this.payTypeList.forEach((item, index) => {
|
||||
if (item.type == 'wechatpay') {
|
||||
this.payIndex = index;
|
||||
this.confirm();
|
||||
@@ -286,7 +290,7 @@ export default {
|
||||
// #endif
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
storeToken: function (nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getPayInfo();
|
||||
}
|
||||
@@ -310,6 +314,7 @@ export default {
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
padding: 80rpx 26rpx;
|
||||
|
||||
.content {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -318,13 +323,16 @@ export default {
|
||||
padding: 0 60rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.money-wrap {
|
||||
font-weight: bold;
|
||||
margin: 40rpx 0;
|
||||
|
||||
.unit {
|
||||
font-size: 40rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
.money {
|
||||
font-size: 70rpx;
|
||||
}
|
||||
@@ -334,6 +342,7 @@ export default {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.payment-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -341,34 +350,43 @@ export default {
|
||||
height: 90rpx;
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
> view {
|
||||
|
||||
>view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.name {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 64rpx;
|
||||
}
|
||||
|
||||
.icon-weixin1 {
|
||||
color: #24af41;
|
||||
}
|
||||
|
||||
.icon-zhifubaozhifu- {
|
||||
color: #00a0e9;
|
||||
}
|
||||
|
||||
.icon-yuan_checked {
|
||||
font-size: 40rpx;
|
||||
color: $base-color;
|
||||
}
|
||||
|
||||
.icon-checkboxblank {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
margin-top: 80rpx !important;
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
components: {
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isIphoneX: false,
|
||||
|
||||
@@ -3,16 +3,19 @@
|
||||
<template v-if="payInfo.pay_status != undefined">
|
||||
<view class="result-box">
|
||||
<template v-if="payInfo.pay_status">
|
||||
<image :src="$util.img('public/uniapp/pay/pay_success.png')" mode="widthFix" lazy-load="true" class="result-image"/>
|
||||
<image :src="$util.img('public/uniapp/pay/pay_success.png')" mode="widthFix" lazy-load="true"
|
||||
class="result-image" />
|
||||
<view class="msg success">{{ $lang('paymentSuccess') }}</view>
|
||||
<view class="pay-amount">
|
||||
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="price-style large">{{ parseFloat(payInfo.pay_money).toFixed(2).split(".")[0] }}</text>
|
||||
<text class="price-style small">.{{ parseFloat(payInfo.pay_money).toFixed(2).split(".")[1] }}</text>
|
||||
<text class="price-style large">{{ parseFloat(payInfo.pay_money).toFixed(2).split(".")[0]
|
||||
}}</text>
|
||||
<text class="price-style small">.{{ parseFloat(payInfo.pay_money).toFixed(2).split(".")[1]
|
||||
}}</text>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<image :src="$util.img('public/uniapp/pay/pay_fail.png')" mode="widthFix" class="result-image"/>
|
||||
<image :src="$util.img('public/uniapp/pay/pay_fail.png')" mode="widthFix" class="result-image" />
|
||||
<view class="msg fail">{{ $lang('paymentFail') }}</view>
|
||||
</template>
|
||||
|
||||
@@ -60,284 +63,288 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
payInfo: {},
|
||||
outTradeNo: '',
|
||||
paySource: '',
|
||||
consumeInfo: {},
|
||||
consumeStatus: 0,
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.code) this.outTradeNo = option.code;
|
||||
this.paySource = uni.getStorageSync('paySource');
|
||||
},
|
||||
onShow() {
|
||||
this.getPayInfo();
|
||||
this.getConsume();
|
||||
},
|
||||
methods: {
|
||||
consume(type) {
|
||||
switch (type) {
|
||||
case 'point':
|
||||
this.$util.redirectTo('/pages_tool/member/point_detail', {});
|
||||
break;
|
||||
case 'growth':
|
||||
this.$util.redirectTo('/pages_tool/member/level', {});
|
||||
break;
|
||||
case 'coupon':
|
||||
this.$util.redirectTo('/pages_tool/member/coupon', {});
|
||||
break;
|
||||
default:
|
||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
||||
break;
|
||||
}
|
||||
},
|
||||
getConsume() {
|
||||
this.$api.sendRequest({
|
||||
url: '/memberconsume/api/config/info',
|
||||
data: {
|
||||
out_trade_no: this.outTradeNo
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
let reward = res.data.value;
|
||||
if (res.data.is_use && (reward.point_num > 0 || reward.growth_num > 0 || reward.coupon_list.length)) {
|
||||
this.consumeStatus = res.data.is_use;
|
||||
this.consumeInfo = res.data.value;
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
getPayInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/pay/info',
|
||||
data: {
|
||||
out_trade_no: this.outTradeNo
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.payInfo = res.data;
|
||||
this.payInfo.pay_money = parseFloat(res.data.pay_money);
|
||||
this.payInfo.pay_money += parseFloat(res.data.balance);
|
||||
this.payInfo.pay_money += parseFloat(res.data.balance_money);
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '未获取到支付信息!'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index', {}, 'reLaunch');
|
||||
}, 1500);
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
goHome() {
|
||||
this.$util.redirectTo('/pages/index/index', {}, 'reLaunch');
|
||||
},
|
||||
toOrderDetail(id) {
|
||||
if (this.payInfo.order_type == 2) {
|
||||
this.$util.redirectTo('/pages_order/detail_pickup', {
|
||||
order_id: id
|
||||
}, 'redirectTo');
|
||||
} else if (this.payInfo.order_type == 3) {
|
||||
this.$util.redirectTo('/pages_order/detail_local_delivery', {
|
||||
order_id: id
|
||||
}, 'redirectTo');
|
||||
} else if (this.payInfo.order_type == 4) {
|
||||
this.$util.redirectTo('/pages_tool/order/detail_virtual', {
|
||||
order_id: id
|
||||
}, 'redirectTo');
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_order/detail', {
|
||||
order_id: id
|
||||
}, 'redirectTo');
|
||||
}
|
||||
},
|
||||
toOrder(id) {
|
||||
this.$util.redirectTo('/pages_promotion/giftcard/order_list', {}, 'redirectTo');
|
||||
uni.setStorageSync('paySource', '');
|
||||
},
|
||||
toRecharge() {
|
||||
this.$util.redirectTo('/pages_tool/recharge/order_list', {}, 'redirectTo');
|
||||
uni.setStorageSync('paySource', '');
|
||||
},
|
||||
toCard() {
|
||||
this.$util.redirectTo('/pages_tool/member/card', {}, 'redirectTo');
|
||||
uni.setStorageSync('paySource', '');
|
||||
},
|
||||
toPresaleOrder() {
|
||||
this.$util.redirectTo('/pages_promotion/presale/order_list', {}, 'redirectTo');
|
||||
uni.setStorageSync('paySource', '');
|
||||
},
|
||||
toExchangeOrder() {
|
||||
this.$util.redirectTo('/pages_promotion/point/order_list', {}, 'redirectTo');
|
||||
uni.setStorageSync('paySource', '');
|
||||
export default {
|
||||
components: {
|
||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
payInfo: {},
|
||||
outTradeNo: '',
|
||||
paySource: '',
|
||||
consumeInfo: {},
|
||||
consumeStatus: 0,
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.code) this.outTradeNo = option.code;
|
||||
this.paySource = uni.getStorageSync('paySource');
|
||||
},
|
||||
onShow() {
|
||||
this.getPayInfo();
|
||||
this.getConsume();
|
||||
},
|
||||
methods: {
|
||||
consume(type) {
|
||||
switch (type) {
|
||||
case 'point':
|
||||
this.$util.redirectTo('/pages_tool/member/point_detail', {});
|
||||
break;
|
||||
case 'growth':
|
||||
this.$util.redirectTo('/pages_tool/member/level', {});
|
||||
break;
|
||||
case 'coupon':
|
||||
this.$util.redirectTo('/pages_tool/member/coupon', {});
|
||||
break;
|
||||
default:
|
||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
||||
break;
|
||||
}
|
||||
},
|
||||
getConsume() {
|
||||
this.$api.sendRequest({
|
||||
url: '/memberconsume/api/config/info',
|
||||
data: {
|
||||
out_trade_no: this.outTradeNo
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
let reward = res.data.value;
|
||||
if (res.data.is_use && (reward.point_num > 0 || reward.growth_num > 0 || reward.coupon_list.length)) {
|
||||
this.consumeStatus = res.data.is_use;
|
||||
this.consumeInfo = res.data.value;
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
getPayInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/pay/info',
|
||||
data: {
|
||||
out_trade_no: this.outTradeNo
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.payInfo = res.data;
|
||||
this.payInfo.pay_money = parseFloat(res.data.pay_money);
|
||||
this.payInfo.pay_money += parseFloat(res.data.balance);
|
||||
this.payInfo.pay_money += parseFloat(res.data.balance_money);
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '未获取到支付信息!'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index', {}, 'reLaunch');
|
||||
}, 1500);
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
goHome() {
|
||||
this.$util.redirectTo('/pages/index/index', {}, 'reLaunch');
|
||||
},
|
||||
toOrderDetail(id) {
|
||||
if (this.payInfo.order_type == 2) {
|
||||
this.$util.redirectTo('/pages_order/detail_pickup', {
|
||||
order_id: id
|
||||
}, 'redirectTo');
|
||||
} else if (this.payInfo.order_type == 3) {
|
||||
this.$util.redirectTo('/pages_order/detail_local_delivery', {
|
||||
order_id: id
|
||||
}, 'redirectTo');
|
||||
} else if (this.payInfo.order_type == 4) {
|
||||
this.$util.redirectTo('/pages_tool/order/detail_virtual', {
|
||||
order_id: id
|
||||
}, 'redirectTo');
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_order/detail', {
|
||||
order_id: id
|
||||
}, 'redirectTo');
|
||||
}
|
||||
},
|
||||
toOrder(id) {
|
||||
this.$util.redirectTo('/pages_promotion/giftcard/order_list', {}, 'redirectTo');
|
||||
uni.setStorageSync('paySource', '');
|
||||
},
|
||||
toRecharge() {
|
||||
this.$util.redirectTo('/pages_tool/recharge/order_list', {}, 'redirectTo');
|
||||
uni.setStorageSync('paySource', '');
|
||||
},
|
||||
toCard() {
|
||||
this.$util.redirectTo('/pages_tool/member/card', {}, 'redirectTo');
|
||||
uni.setStorageSync('paySource', '');
|
||||
},
|
||||
toPresaleOrder() {
|
||||
this.$util.redirectTo('/pages_promotion/presale/order_list', {}, 'redirectTo');
|
||||
uni.setStorageSync('paySource', '');
|
||||
},
|
||||
toExchangeOrder() {
|
||||
this.$util.redirectTo('/pages_promotion/point/order_list', {}, 'redirectTo');
|
||||
uni.setStorageSync('paySource', '');
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.consume-box {
|
||||
padding: $padding;
|
||||
background: #F8F8F8;
|
||||
width: calc(100% - 48rpx);
|
||||
margin: 0 24rpx 0 24rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 20rpx;
|
||||
.consume-box {
|
||||
padding: $padding;
|
||||
background: #F8F8F8;
|
||||
width: calc(100% - 48rpx);
|
||||
margin: 0 24rpx 0 24rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.consume-head {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-weight: 500;
|
||||
.consume-head {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-weight: 500;
|
||||
font-size: 26rpx;
|
||||
|
||||
.consume-head-text {
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.consume-list {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.consume-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: $color-title;
|
||||
font-size: $font-size-base;
|
||||
margin-top: 10rpx;
|
||||
|
||||
image {
|
||||
width: 24rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.consume-value {
|
||||
font-size: 26rpx;
|
||||
|
||||
.consume-head-text {
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.consume-list {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.consume-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: $color-title;
|
||||
font-size: $font-size-base;
|
||||
margin-top: 10rpx;
|
||||
|
||||
image {
|
||||
width: 24rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.consume-value {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.consume-remark {
|
||||
color: $color-tip;
|
||||
font-size: $font-size-tag;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
.consume-remark {
|
||||
color: $color-tip;
|
||||
font-size: $font-size-tag;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.result-box {
|
||||
padding-top: 94rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background-color: #FFFFFF;
|
||||
width: 100%;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.result-box {
|
||||
padding-top: 94rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background-color: #FFFFFF;
|
||||
width: 100%;
|
||||
padding-bottom: 40rpx;
|
||||
.result-image {
|
||||
width: 80rpx;
|
||||
height: auto;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.msg {
|
||||
font-size: 32rpx;
|
||||
margin-top: 25rpx;
|
||||
|
||||
&.success {
|
||||
color: #09BB07;
|
||||
}
|
||||
|
||||
.result-image {
|
||||
width: 80rpx;
|
||||
height: auto;
|
||||
will-change: transform;
|
||||
&.fail {
|
||||
color: #FF4646;
|
||||
}
|
||||
}
|
||||
|
||||
.pay-amount {
|
||||
font-size: 30rpx;
|
||||
margin: 40rpx 0 24rpx 0;
|
||||
font-weight: 600;
|
||||
line-height: 50rpx;
|
||||
|
||||
text {
|
||||
color: #333333 !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.msg {
|
||||
font-size: 32rpx;
|
||||
margin-top: 25rpx;
|
||||
|
||||
&.success {
|
||||
color: #09BB07;
|
||||
}
|
||||
|
||||
&.fail {
|
||||
color: #FF4646;
|
||||
}
|
||||
.unit {
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.pay-amount {
|
||||
.large {
|
||||
font-size: 60rpx !important;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 36rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.action {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
margin-top: 24rpx;
|
||||
|
||||
.btn {
|
||||
font-size: 30rpx;
|
||||
margin: 40rpx 0 24rpx 0;
|
||||
font-weight: 600;
|
||||
line-height: 50rpx;
|
||||
|
||||
text {
|
||||
color: #333333 !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.unit {
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.large {
|
||||
font-size: 60rpx !important;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 36rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.action {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 200rpx;
|
||||
height: 66rpx;
|
||||
line-height: 66rpx;
|
||||
text-align: center;
|
||||
border-radius: 66rpx;
|
||||
border: 1px solid $color-tip;
|
||||
box-sizing: border-box;
|
||||
margin-top: 24rpx;
|
||||
|
||||
.btn {
|
||||
font-size: 30rpx;
|
||||
width: 200rpx;
|
||||
height: 66rpx;
|
||||
line-height: 66rpx;
|
||||
text-align: center;
|
||||
border-radius: 66rpx;
|
||||
border: 1px solid $color-tip;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:last-child {
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.go-home {
|
||||
background-color: $base-color;
|
||||
color: #fff;
|
||||
border-color: $base-color;
|
||||
&:last-child {
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .goods-recommend {
|
||||
margin-top: 30rpx;
|
||||
.go-home {
|
||||
background-color: $base-color;
|
||||
color: #fff;
|
||||
border-color: $base-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .goods-recommend {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
</style>
|
||||
@@ -12,15 +12,15 @@ export default {
|
||||
name: 'wx_pay',
|
||||
data() {
|
||||
return {
|
||||
show : true,
|
||||
wx_alipay : "",
|
||||
out_trade_no : ""
|
||||
show: true,
|
||||
wx_alipay: "",
|
||||
out_trade_no: ""
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.wx_alipay = options.wx_alipay || '';
|
||||
this.out_trade_no = options.out_trade_no || '';
|
||||
if(!this.$util.isWeiXin() && this.wx_alipay){
|
||||
if (!this.$util.isWeiXin() && this.wx_alipay) {
|
||||
this.show = false;
|
||||
location.href = this.wx_alipay;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.checkPayStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -64,29 +64,33 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.launch-mask{
|
||||
position:fixed;
|
||||
top:0px;
|
||||
.launch-mask {
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width:100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background:rgba(0,0,0,0.8);
|
||||
.mask-img{
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
|
||||
.mask-img {
|
||||
text-align: right;
|
||||
margin:10% 10px 10px 30px;
|
||||
image{
|
||||
margin: 10% 10px 10px 30px;
|
||||
|
||||
image {
|
||||
width: 50px;
|
||||
height:117px;
|
||||
margin-right:9%
|
||||
height: 117px;
|
||||
margin-right: 9%
|
||||
}
|
||||
}
|
||||
.mask-word{
|
||||
|
||||
.mask-word {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
text{
|
||||
color:#FF0036 !important
|
||||
|
||||
text {
|
||||
color: #FF0036 !important
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,11 +9,14 @@
|
||||
<text class="color-tip font-size-tag">{{ orderItem.order_no }}</text>
|
||||
</view>
|
||||
<view class="align-right">
|
||||
<text class="color-tip font-size-tag">{{ $util.timeStampTurnTime(orderItem.create_time) }}</text>
|
||||
<text class="color-tip font-size-tag">{{ $util.timeStampTurnTime(orderItem.create_time)
|
||||
}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-body">
|
||||
<view class="goods_info_flex"><view class="goods-name font-size-base">充值成功</view></view>
|
||||
<view class="goods_info_flex">
|
||||
<view class="goods-name font-size-base">充值成功</view>
|
||||
</view>
|
||||
|
||||
<view class="goods-img color-base-text">
|
||||
¥
|
||||
@@ -40,17 +43,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsLogin from '@/components/ns-login/ns-login.vue';
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsLogin,
|
||||
loadingCover,
|
||||
nsEmpty,
|
||||
MescrollUni
|
||||
components: {
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -129,7 +128,7 @@ export default {
|
||||
line-height: 80rpx;
|
||||
border-bottom: 1px solid #e3e3e3;
|
||||
|
||||
& > view {
|
||||
&>view {
|
||||
flex: 1;
|
||||
line-height: 1;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
<view>
|
||||
<view class="content">
|
||||
<view class="goods-attr">
|
||||
<view class="title">{{title}}</view>
|
||||
<view class="title">{{ title }}</view>
|
||||
<view class="attr-wrap">
|
||||
<block v-for="(item, index) in list" :key="index">
|
||||
<view class="item">
|
||||
<text class="attr-name" :style="{background: item.background}">{{item.text}}</text>
|
||||
<text class="value-name" :style="{color: item.color}">{{item.value}}</text>
|
||||
<text class="attr-name" :style="{ background: item.background }">{{ item.text }}</text>
|
||||
<text class="value-name" :style="{ color: item.color }">{{ item.value }}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="g0>0">
|
||||
<block v-if="g0 > 0">
|
||||
<view class="foot">
|
||||
<view @tap="generateImage" class="item" style="margin-right:30rpx;">导出图片</view>
|
||||
<view @tap="generatePdf" class="item">导出PDF</view>
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
const filePath = res.tempFilePath;
|
||||
uni.shareFileMessage({
|
||||
filePath: filePath,
|
||||
success: () => {},
|
||||
success: () => { },
|
||||
fail: console.error
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<view class="content">
|
||||
<view class="cate-search">
|
||||
<view class="search-box">
|
||||
<input class="uni-input" maxlength="50" confirm-type="search" :focus="true" placeholder="请输入介质名称 '如汽油'" v-model="inputValue" @focus="inputFocus" @confirm="search" @input="inputChange" />
|
||||
<input class="uni-input" maxlength="50" confirm-type="search" :focus="true" placeholder="请输入介质名称 '如汽油'"
|
||||
v-model="inputValue" @focus="inputFocus" @confirm="search" @input="inputChange" />
|
||||
<text @tap="search" class="iconfont icon-sousuo3"></text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -17,7 +18,7 @@
|
||||
<view class="history-bottom">
|
||||
<block v-for="(item, index) in list" :key="index">
|
||||
<view @tap="otherSearch(item, index)" @longtap="deleteItem(item, index)" class="history-li">
|
||||
<view>{{item.name}}</view>
|
||||
<view>{{ item.name }}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
@@ -33,11 +34,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsEmpty
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -2,14 +2,15 @@
|
||||
<view>
|
||||
<view class="picker-container">
|
||||
<view v-for="(item, idx) in pickerList" :key="item.id" class="single-picker">
|
||||
<picker mode="selector" :value="item.value" :range="item.range" range-key="name" @change="bindPickerChange($event, idx, item)">
|
||||
<view class="picker">当前选择:{{item.range[item.value].name || '请选择'}}</view>
|
||||
<picker mode="selector" :value="item.value" :range="item.range" range-key="name"
|
||||
@change="bindPickerChange($event, idx, item)">
|
||||
<view class="picker">当前选择:{{ item.range[item.value].name || '请选择' }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="answerName">
|
||||
<view style="font-size:32rpx;color:#ff0000;text-align:center;">
|
||||
<view style="color:#ff0000;">选型结果:</view>{{answerName}}
|
||||
<view style="color:#ff0000;">选型结果:</view>{{ answerName }}
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="files_url">
|
||||
|
||||
@@ -16,15 +16,15 @@ export default {
|
||||
},
|
||||
onShow() {
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
|
||||
|
||||
this.getSiteStatus();
|
||||
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
wx.hideHomeButton();
|
||||
// #endif
|
||||
},
|
||||
methods:{
|
||||
getSiteStatus(){
|
||||
methods: {
|
||||
getSiteStatus() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/site/status',
|
||||
data: {},
|
||||
@@ -78,6 +78,7 @@ export default {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.closeBox {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@@ -86,9 +87,11 @@ export default {
|
||||
align-items: center;
|
||||
margin-top: 330rpx;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 240rpx;
|
||||
}
|
||||
|
||||
.close-title {
|
||||
font-size: $font-size-toolbar;
|
||||
color: $color-tip;
|
||||
|
||||
@@ -3,11 +3,14 @@
|
||||
<view class="iconfont iconshang navigate-back" @click="navigateBack"></view>
|
||||
<web-view :src="src"></web-view>
|
||||
</view>
|
||||
<!-- <diy-bottom-nav></diy-bottom-nav> -->
|
||||
<!-- <diy-bottom-nav></diy-bottom-nav> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
diyBottomNav: () => import('@/components-diy/diy-bottom-nav.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
src: ''
|
||||
@@ -21,7 +24,7 @@ export default {
|
||||
console.log(res)
|
||||
if (res.code == 0) {
|
||||
uni.setNavigationBarTitle({
|
||||
title:res.data.title
|
||||
title: res.data.title
|
||||
})
|
||||
this.src = res.data.url
|
||||
}
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="error-msg">{{errorMsg}}</view>
|
||||
<view class="error-msg">{{ errorMsg }}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
outTradeNo:'',
|
||||
errorMsg:'',
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.merchant_trade_no){
|
||||
this.outTradeNo = option.merchant_trade_no;
|
||||
this.getOrderDetailPath();
|
||||
}else{
|
||||
this.errorMsg = '缺少merchant_trade_no参数';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getOrderDetailPath(){
|
||||
this.$api.sendRequest({
|
||||
url: '/api/pay/outTradeNoToOrderDetailPath',
|
||||
data:{
|
||||
out_trade_no : this.outTradeNo,
|
||||
},
|
||||
success: res => {
|
||||
if (res.code < 0) {
|
||||
this.errorMsg = res.message || '未知错误';
|
||||
}else{
|
||||
this.$util.redirectTo(res.data);
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
outTradeNo: '',
|
||||
errorMsg: '',
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.merchant_trade_no) {
|
||||
this.outTradeNo = option.merchant_trade_no;
|
||||
this.getOrderDetailPath();
|
||||
} else {
|
||||
this.errorMsg = '缺少merchant_trade_no参数';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getOrderDetailPath() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/pay/outTradeNoToOrderDetailPath',
|
||||
data: {
|
||||
out_trade_no: this.outTradeNo,
|
||||
},
|
||||
success: res => {
|
||||
if (res.code < 0) {
|
||||
this.errorMsg = res.message || '未知错误';
|
||||
} else {
|
||||
this.$util.redirectTo(res.data);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.error-msg{
|
||||
text-align: center;
|
||||
padding-top: 10vh;
|
||||
}
|
||||
.error-msg {
|
||||
text-align: center;
|
||||
padding-top: 10vh;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -11,14 +11,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// #ifdef MP-WEIXIN
|
||||
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
components: {
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
|
||||
Reference in New Issue
Block a user