chore(代码合并): 代码从Custom/common分支合并

This commit is contained in:
2026-01-04 09:40:09 +08:00
parent 26f8537d24
commit 4da852944e
145 changed files with 13781 additions and 11628 deletions

View File

@@ -1,55 +1,54 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view style="padding: 20rpx;">
<rich-text :nodes="content"></rich-text>
</view>
</template>
<script>
import htmlParser from '@/common/js/html-parser';
export default {
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() {
// privacy content
var data = {
type:this.type
}
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
})
this.content = res.data.content
}
});
}
}
};
</script>
<style lang="scss">
<template>
<view style="padding: 20rpx;" :style="themeColor">
<rich-text :nodes="content"></rich-text>
</view>
</template>
<script>
import htmlParser from '@/common/js/html-parser';
export default {
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() {
// privacy content
var data = {
type:this.type
}
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
})
this.content = res.data.content
}
});
}
}
};
</script>
<style lang="scss">
</style>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="page">
<view class="page" :style="themeColor">
<view class="help-title">{{ detail.article_title }}</view>
<view class="help-meta" v-if="detail.is_show_release_time == 1">
<text class="help-time">发表时间: {{ $util.timeStampTurnTime(detail.create_time) }}</text>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<mescroll-uni @getData="getData" ref="mescroll">
<block slot="list">
<view class="article-wrap" v-if="list.length">
@@ -35,6 +34,14 @@
<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 {
@@ -42,7 +49,14 @@
};
},
components: {
nsAdv
nsAdv,
MescrollUni,
nsLogin,
loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
onShow() {
this.setPublicShare();

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<view class="about w100">
<view class="bg border-top"></view>
<view class="list_cotact padding-top">
@@ -11,7 +10,7 @@
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;">在线留言</view>
<view class="name bl line1" style="margin-top: 6rpx;">{{ $lang('onlineMessage') }}</view>
</view>
</view>
</view>
@@ -23,19 +22,20 @@
<button class="bl bor" hoverClass="none" openType="contact" sessionFrom="weapp"
showMessageCard="true" style="margin: 0;">
<image mode="heightFix" :src="$util.img('public/static/img/kefu.png')"></image>
<view class="name bl line1">专属客服</view>
<view class="name bl line1">{{ $lang('exclusiveCustomerService') }}</view>
</button>
</view>
<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;">在线留言</view>
<view class="name bl line1" style="margin-top: 6rpx;">{{ $lang('onlineMessage') }}</view>
</view>
</view>
</view>
<!-- #endif -->
<view class="view_ul_100" v-for="(item, index) in dataList" :key="index" style="margin-bottom: 20rpx;">
<view class="view_ul_100" v-for="(item, index) in dataList" :key="index"
style="margin-bottom: 20rpx;">
<view class="bl clearfix bor bg-white"
:style="{ backgroundImage: ' url(' + $util.img(personnel_bg) + ')', backgroundSize: '100% 100%' }">
@@ -51,10 +51,7 @@
<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
style="margin-top: 0rpx;margin-left: 10rpx;font-size: 26rpx;color:rgba(71,71,71,.79)"
@click="Tel(item.mobile)"><span
style="background: #0054a5;color:#fff;padding: 10rpx 30rpx;font-size: 24rpx;border-radius: 50rpx;">一键拨打</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"
@@ -62,10 +59,7 @@
<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
style="margin-top: 0rpx;margin-left: 10rpx;font-size: 26rpx;color:rgba(71,71,71,.79)"
@click="tomap()"><span
style="background: #888;color:#fff;padding: 10rpx 30rpx;font-size: 24rpx;border-radius: 50rpx;">立即导航</span>
<view class="btn-container" @click="copy(item.email)"><span class="contact-btn" style="background: #888;">{{ $lang('copy') }}</span>
</view>
</view>
</view>
@@ -90,7 +84,7 @@
: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">一键导航</cover-view>
@click="tomap"><cover-view style="font-size:24rpx">{{ $lang('oneClickNavigation') }}</cover-view>
</cover-view>
</map>
</view>
@@ -110,45 +104,42 @@
<uni-popup ref="informationPopup" type="bottom" @change="change">
<view class="liuyan-popup-layer popup-layer">
<view class="head-wrap" @click="closeinformationPopup()">
<text>在线留言</text>
<text>{{ $lang('onlineMessage') }}</text>
<text class="iconfont icon-close"></text>
</view>
<scroll-view scroll-y class="liuyan-body">
<view style="padding: 0 30rpx;">
<view class="fui-cell-group">
<view class="fui-cell ">
<view class="fui-cell-label ">姓名</view>
<view class="fui-cell-label ">{{ $lang('name') }}</view>
<view class="fui-cell-info">
<input v-model="Form.realname" class="fui-input" placeholder="请输入您的姓名"
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">联系方式</view>
<view class="fui-cell-label">{{ $lang('contactInfo') }}</view>
<view class="fui-cell-info">
<input v-model="Form.mobile" class="fui-input" maxlength="11"
placeholder="请输入您的手机号" 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">留言内容</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="请输入留言内容"
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()">提交</button></view>
<view class="button-box"><button type="primary" @click="save()">{{ $lang('submit') }}</button></view>
</view>
</uni-popup>
</view>
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
<hover-nav></hover-nav>
<diy-bottom-nav></diy-bottom-nav>
</view>
<hover-nav></hover-nav>
<diy-bottom-nav></diy-bottom-nav>
</template>
<script>
@@ -273,18 +264,23 @@ export default {
copy(text) {
uni.setClipboardData({
data: text,
success: function () {
success: () => {
console.log('复制成功');
// 可以添加用户友好的提示例如使用uni.showToast提示复制成功
uni.showToast({
title: '复制成功',
title: this.$lang('copySuccess'),
icon: 'success',
duration: 2000
});
},
fail: function () {
fail: (err) => {
console.log('复制失败');
// 可以添加错误处理或用户友好的提示
uni.showToast({
title: err.message || err.errMsg || this.$lang('copyFailed'),
icon: 'none',
duration: 2000
});
}
});
},
@@ -292,7 +288,7 @@ export default {
uni.openLocation({
latitude: parseFloat(this.shop.latitude),
longitude: parseFloat(this.shop.longitude),
name: "一键导航",
name: this.$lang('oneClickNavigation'),
})
}
}
@@ -547,6 +543,27 @@ image {
padding-left: 0rpx;
}
.btn-container {
white-space: nowrap;
min-width: 140rpx;
width: max-content;
margin-top: 0rpx;
margin-left: 10rpx;
font-size: 26rpx;
color: rgba(71, 71, 71, .79);
text-align: center;
}
.contact-btn {
color: #fff;
padding: 6rpx 30rpx;
font-size: 24rpx;
border-radius: 50rpx;
min-width: 100rpx;
display: inline-block;
text-align: center;
}
.contact_name image {
opacity: .79;
width: 30rpx;
@@ -564,17 +581,16 @@ image {
width: 90rpx;
z-index: 9999;
}
</style>
<style lang="scss" scoped>
/deep/ .mescroll-totop {
right: 27rpx!important;
/* #ifdef H5 */
bottom: 120rpx!important;
/* #endif */
/* #ifdef MP-WEIXIN */
bottom: 180rpx!important;
/* #endif */
}
/deep/ .mescroll-totop {
right: 27rpx !important;
/* #ifdef H5 */
bottom: 120rpx !important;
/* #endif */
/* #ifdef MP-WEIXIN */
bottom: 180rpx !important;
/* #endif */
}
</style>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<view class="page" v-if="detail">
<view class="form-banner">
<image :src="$util.img('public/uniapp/form/banner.png')" mode="widthFix"></image>

View File

@@ -0,0 +1,165 @@
<template>
<view>
<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>
<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>
</view>
</view>
</block>
<block v-else>
<ns-empty :text="complete ? '提交成功' : '未获取到表单信息'" :isIndex="false"></ns-empty>
</block>
<loading-cover ref="loadingCover"></loading-cover>
<ns-login ref="login"></ns-login>
</view>
</template>
<script>
export default {
data() {
return {
id: 0,
detail: null,
isRepeat: false,
complete: false,
scroll: true,
uniacid: 0
}
},
onLoad(options) {
if (!options.uniacid) {
uni.showModal({
title: '提示',
content: '参数错误',
showCancel: false,
success: () => {}
})
return false
}
this.uniacid = options.uniacid
this.id = options.id || 0
if (options.scene) {
const scene = decodeURIComponent(options.scene)
const params = scene.split('&')
params.length && params.forEach(item => {
if (item.indexOf('id') != -1) {
this.id = item.split('-')[1]
}
})
}
this.getData()
},
watch: {
storeToken(newVal, oldVal) {
newVal && this.getData()
}
},
methods: {
getData() {
this.$api.sendRequest({
url: '/form/api/form/info',
data: {
form_id: this.id,
uniacid: this.uniacid
},
success: res => {
if (res.code == 0 && res.data) {
this.detail = res.data
uni.setNavigationBarTitle({
title: res.data.form_name
})
}
this.$refs.loadingCover && this.$refs.loadingCover.hide()
},
fail: () => {
this.$refs.loadingCover && this.$refs.loadingCover.hide()
}
})
},
create() {
if (!this.$refs.form.verify()) return
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),
uniacid: this.uniacid
},
success: res => {
if (res.code == 0) {
uni.showModal({
title: '提示',
content: '提交成功',
showCancel: false,
success: () => {}
})
} else {
this.isRepeat = false
this.$util.showToast({
title: res.message
})
}
}
})
}
}
}
</script>
<style scoped>
page {
background: #fff;
}
.form-banner {
width: 100vw;
line-height: 1;
}
.form-banner image {
width: 100%;
line-height: 1;
}
.system-form-wrap {
border-radius: 32rpx;
overflow: hidden;
margin: 0 0 60rpx 0;
padding: 0 12rpx;
transform: translateY(-40rpx);
}
.system-form-wrap .form-title {
line-height: 100rpx;
padding-top: 20rpx;
}
.system-form-wrap .button {
height: 80rpx;
line-height: 80rpx !important;
margin-top: 30rpx !important;
width: 84%;
margin-left: 28rpx !important;
border-radius: 80rpx;
background: #f4391c;
color: #fff;
}
.system-form-wrap .form-wrap {
background: #fff;
padding: 30rpx;
border-radius: 32rpx;
}
</style>

View File

@@ -27,11 +27,25 @@
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
nsAdv,
MescrollUni,
nsLogin,
loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
data() {
return {

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<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>
@@ -71,7 +70,23 @@
</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: [],

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view class="container" :style="themeColor">
<view class="content">
<view class="wx-code">
<image :src="$util.img(path)" />

View File

@@ -1,342 +1,364 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="goods-evaluate">
<view class="evaluate-tab">
<view v-for="(item, index) in evaluateList" :key="index" :class="evaluateTab == item.value ? 'active-tab' : ''" @click="onEvaluateTab(item.value)">
{{ item.name }}({{ item.count }})
</view>
</view>
<mescroll-uni ref="mescroll" top="100" @getData="getGoodsEvaluate">
<block slot="list">
<view class="evaluate-item" v-for="(item, index) in list" :key="index">
<view class="evaluator">
<view>
<view class="evaluator-face">
<image v-if="item.member_headimg" :src="$util.img(item.member_headimg)" @error="imageError(index)" mode="aspectFill" />
<image v-else :src="$util.getDefaultImage().head" mode="aspectFill" />
</view>
<view class="evaluator-info">
<view class="evaluator-info-left">
<view class="evaluator-name using-hidden" v-if="item.member_name.length > 2 && item.is_anonymous == 1">
{{ item.member_name[0] }}***{{ item.member_name[item.member_name.length - 1] }}
</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 class="evaluator-xing"><xiaoStarComponent :starCount="item.scores * 2"></xiaoStarComponent></view>
</view>
</view>
</view>
<view class="cont">{{ item.content }}</view>
<scroll-view scroll-x="true">
<view class="evaluate-img" v-if="item.images">
<view class="img-box" v-for="(img, img_index) in item.images" :key="img_index" @click="previewEvaluate(index, img_index, 'images')">
<image :src="$util.img(img)" mode="aspectFill" />
</view>
</view>
</scroll-view>
<view v-if="item.explain_first != ''" class="time shop-reply-box">
<view class="shop-reply">商家回复</view>
<view class="cont">{{ item.explain_first }}</view>
</view>
<template v-if="item.again_content != '' && item.again_is_audit == 1">
<view class="review-evaluation color-base-text">追加评价</view>
<view class="cont">{{ item.again_content }}</view>
<scroll-view scroll-x="true">
<view class="evaluate-img" v-if="item.again_images.length > 0">
<view
class="img-box"
v-for="(again_img, again_index) in item.again_images"
:key="again_index"
@click="previewEvaluate(index, again_index, 'again_images')"
>
<image :src="$util.img(again_img)" mode="aspectFill"></image>
</view>
</view>
</scroll-view>
<view v-if="item.again_explain != ''" class="time shop-reply-box">
<view class="shop-reply" v-if="item.again_explain != ''">商家回复</view>
<view class="cont">{{ item.again_explain }}</view>
</view>
</template>
</view>
<view v-if="list.length == 0"><ns-empty text="暂无商品评价"></ns-empty></view>
</block>
</mescroll-uni>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</template>
<script>
import xiaoStarComponent from '@/components/xiao-star-component/xiao-star-component.vue';
export default {
components: { xiaoStarComponent },
data() {
return {
goodsId: 0,
list: [],
evaluateList: [{ name: '全部', value: 0, count: 0 }, { name: '好评', value: 1, count: 0 }, { name: '中评', value: 2, count: 0 }, { name: '差评', value: 3, count: 0 }],
evaluateTab: 0,
mescroll_type: {}
};
},
onLoad(data) {
this.goodsId = data.goods_id || 0;
this.getEvaluateCount();
},
onShow() {
},
methods: {
getEvaluateCount(mescroll) {
this.$api.sendRequest({
url: '/api/goodsevaluate/getgoodsevaluate',
data: {
goods_id: this.goodsId
},
success: res => {
for (let i = 0; i < this.evaluateList.length; i++) {
if (this.evaluateList[i].value == 0) {
this.evaluateList[i].count = res.data.total;
} else if (this.evaluateList[i].value == 1) {
this.evaluateList[i].count = res.data.haoping;
} else if (this.evaluateList[i].value == 2) {
this.evaluateList[i].count = res.data.zhongping;
} else if (this.evaluateList[i].value == 3) {
this.evaluateList[i].count = res.data.chaping;
}
}
}
});
},
getGoodsEvaluate(mescroll) {
this.mescroll_type = mescroll;
this.$api.sendRequest({
url: '/api/goodsevaluate/page',
data: {
page: mescroll.num,
page_size: mescroll.size,
goods_id: this.goodsId,
explain_type: this.evaluateTab == 0 ? '' : this.evaluateTab
},
success: res => {
let newArr = [];
let msg = res.message;
if (res.code == 0 && res.data) {
newArr = res.data.list;
} else {
this.$util.showToast({
title: msg
});
}
for (var i = 0; i < newArr.length; i++) {
if (newArr[i].images) newArr[i].images = newArr[i].images.split(',');
if (newArr[i].again_images) newArr[i].again_images = newArr[i].again_images.split(',');
if (newArr[i].is_anonymous == 1) newArr[i].member_name = newArr[i].member_name.replace(newArr[i].member_name.substring(1, newArr[i].member_name.length - 1), '***');
}
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();
}
});
},
// 预览评价图片
previewEvaluate(index, img_index, field) {
var paths = [];
for (let i = 0; i < this.list[index][field].length; i++) {
paths.push(this.$util.img(this.list[index][field][i]));
}
uni.previewImage({
current: img_index,
urls: paths
});
},
imageError(index) {
this.list[index].member_headimg = this.$util.getDefaultImage().head;
this.$forceUpdate();
},
onEvaluateTab(value) {
this.list = [];
this.evaluateTab = value;
this.mescroll_type.num = 1;
this.mescroll_type.size = 10;
let mescrolls = {
num: 1,
size: 10
};
this.getGoodsEvaluate(this.mescroll_type);
}
}
};
</script>
<style lang="scss">
.goods-evaluate {
.evaluate-tab {
display: flex;
align-items: center;
background: #fff;
height: 100rpx;
padding: 0 $margin-both;
view {
background: #f0f0f0;
color: #333;
border-radius: 30rpx;
margin-right: 20rpx;
padding: 8rpx 30rpx;
font-size: 24rpx;
}
.active-tab {
background-color: $base-color;
color: #fff;
}
}
.evaluate-item {
margin: $margin-updown $margin-both;
padding: $margin-both;
background: #fff;
border-radius: 10rpx;
.evaluator {
& > view {
display: flex;
align-items: center;
}
.evaluator-face {
width: 79rpx;
height: 79rpx;
border-radius: 50%;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.evaluator-info {
width: 85%;
margin-left: 13rpx;
.evaluator-name {
color: #303133;
font-size: $font-size-base;
line-height: 1;
width: 250rpx;
}
.evaluator-time {
font-size: $font-size-tag;
// margin-top: 14rpx;
line-height: 1;
}
.evaluator-info-left {
display: flex;
align-items: center;
justify-content: space-between;
}
}
}
.cont {
text-align: justify;
display: -webkit-box;
word-break: break-all;
font-size: $font-size-base;
margin: 26rpx 0 0;
color: #000000;
line-height: 42rpx;
}
.evaluate-img {
display: flex;
width: 100%;
flex-wrap: wrap;
margin-top: 19rpx;
.img-box {
flex-shrink: 0;
width: 140rpx;
height: 140rpx;
overflow: hidden;
margin: 20rpx 23rpx 0 0;
border-radius: 10rpx;
&:nth-child(4n) {
margin-right: 0;
}
&:nth-child(-n + 4) {
margin-top: 0;
}
image {
width: 100%;
height: 100%;
}
}
}
.time {
font-size: $font-size-tag;
background: #f8f8f8;
padding: 10rpx 20rpx;
border-radius: 6rpx;
margin-top: 20rpx;
text {
line-height: 42rpx;
color: $color-tip;
}
}
.evaluation-reply {
margin-top: 10rpx;
font-size: $font-size-tag;
}
.review-evaluation {
margin-top: 29rpx;
font-size: $font-size-base;
line-height: 1;
.review-time {
overflow: hidden;
float: right;
}
& + .cont {
margin: 18rpx 0 0;
}
}
}
}
.shop-reply {
font-size: $font-size-base;
color: #000;
line-height: 1;
& + .cont {
margin-top: 10rpx !important;
}
}
.shop-reply-box {
padding: 20rpx !important;
}
</style>
<template>
<view class="goods-evaluate" :style="themeColor">
<view class="evaluate-tab">
<view v-for="(item, index) in evaluateList" :key="index"
:class="evaluateTab == item.value ? 'active-tab' : ''" @click="onEvaluateTab(item.value)">
{{ item.name }}({{ item.count }})
</view>
</view>
<mescroll-uni ref="mescroll" top="100" @getData="getGoodsEvaluate">
<block slot="list">
<view class="evaluate-item" v-for="(item, index) in list" :key="index">
<view class="evaluator">
<view>
<view class="evaluator-face">
<image v-if="item.member_headimg" :src="$util.img(item.member_headimg)"
@error="imageError(index)" mode="aspectFill" />
<image v-else :src="$util.getDefaultImage().head" mode="aspectFill" />
</view>
<view class="evaluator-info">
<view class="evaluator-info-left">
<view class="evaluator-name using-hidden"
v-if="item.member_name.length > 2 && item.is_anonymous == 1">
{{ item.member_name[0] }}***{{ item.member_name[item.member_name.length - 1] }}
</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 class="evaluator-xing">
<xiaoStarComponent :starCount="item.scores * 2"></xiaoStarComponent>
</view>
</view>
</view>
</view>
<view class="cont">{{ item.content }}</view>
<scroll-view scroll-x="true">
<view class="evaluate-img" v-if="item.images">
<view class="img-box" v-for="(img, img_index) in item.images" :key="img_index"
@click="previewEvaluate(index, img_index, 'images')">
<image :src="$util.img(img)" mode="aspectFill" />
</view>
</view>
</scroll-view>
<view v-if="item.explain_first != ''" class="time shop-reply-box">
<view class="shop-reply">商家回复</view>
<view class="cont">{{ item.explain_first }}</view>
</view>
<template v-if="item.again_content != '' && item.again_is_audit == 1">
<view class="review-evaluation color-base-text">追加评价</view>
<view class="cont">{{ item.again_content }}</view>
<scroll-view scroll-x="true">
<view class="evaluate-img" v-if="item.again_images.length > 0">
<view class="img-box" v-for="(again_img, again_index) in item.again_images"
:key="again_index" @click="previewEvaluate(index, again_index, 'again_images')">
<image :src="$util.img(again_img)" mode="aspectFill"></image>
</view>
</view>
</scroll-view>
<view v-if="item.again_explain != ''" class="time shop-reply-box">
<view class="shop-reply" v-if="item.again_explain != ''">商家回复</view>
<view class="cont">{{ item.again_explain }}</view>
</view>
</template>
</view>
<view v-if="list.length == 0"><ns-empty text="暂无商品评价"></ns-empty></view>
</block>
</mescroll-uni>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</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,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
data() {
return {
goodsId: 0,
list: [],
evaluateList: [{ name: '全部', value: 0, count: 0 }, { name: '好评', value: 1, count: 0 }, { name: '中评', value: 2, count: 0 }, { name: '差评', value: 3, count: 0 }],
evaluateTab: 0,
mescroll_type: {}
};
},
onLoad(data) {
this.goodsId = data.goods_id || 0;
this.getEvaluateCount();
},
onShow() {
},
methods: {
getEvaluateCount(mescroll) {
this.$api.sendRequest({
url: '/api/goodsevaluate/getgoodsevaluate',
data: {
goods_id: this.goodsId
},
success: res => {
for (let i = 0; i < this.evaluateList.length; i++) {
if (this.evaluateList[i].value == 0) {
this.evaluateList[i].count = res.data.total;
} else if (this.evaluateList[i].value == 1) {
this.evaluateList[i].count = res.data.haoping;
} else if (this.evaluateList[i].value == 2) {
this.evaluateList[i].count = res.data.zhongping;
} else if (this.evaluateList[i].value == 3) {
this.evaluateList[i].count = res.data.chaping;
}
}
}
});
},
getGoodsEvaluate(mescroll) {
this.mescroll_type = mescroll;
this.$api.sendRequest({
url: '/api/goodsevaluate/page',
data: {
page: mescroll.num,
page_size: mescroll.size,
goods_id: this.goodsId,
explain_type: this.evaluateTab == 0 ? '' : this.evaluateTab
},
success: res => {
let newArr = [];
let msg = res.message;
if (res.code == 0 && res.data) {
newArr = res.data.list;
} else {
this.$util.showToast({
title: msg
});
}
for (var i = 0; i < newArr.length; i++) {
if (newArr[i].images) newArr[i].images = newArr[i].images.split(',');
if (newArr[i].again_images) newArr[i].again_images = newArr[i].again_images.split(',');
if (newArr[i].is_anonymous == 1) newArr[i].member_name = newArr[i].member_name.replace(newArr[i].member_name.substring(1, newArr[i].member_name.length - 1), '***');
}
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();
}
});
},
// 预览评价图片
previewEvaluate(index, img_index, field) {
var paths = [];
for (let i = 0; i < this.list[index][field].length; i++) {
paths.push(this.$util.img(this.list[index][field][i]));
}
uni.previewImage({
current: img_index,
urls: paths
});
},
imageError(index) {
this.list[index].member_headimg = this.$util.getDefaultImage().head;
this.$forceUpdate();
},
onEvaluateTab(value) {
this.list = [];
this.evaluateTab = value;
this.mescroll_type.num = 1;
this.mescroll_type.size = 10;
let mescrolls = {
num: 1,
size: 10
};
this.getGoodsEvaluate(this.mescroll_type);
}
}
};
</script>
<style lang="scss">
.goods-evaluate {
.evaluate-tab {
display: flex;
align-items: center;
background: #fff;
height: 100rpx;
padding: 0 $margin-both;
view {
background: #f0f0f0;
color: #333;
border-radius: 30rpx;
margin-right: 20rpx;
padding: 8rpx 30rpx;
font-size: 24rpx;
}
.active-tab {
background-color: $base-color;
color: #fff;
}
}
.evaluate-item {
margin: $margin-updown $margin-both;
padding: $margin-both;
background: #fff;
border-radius: 10rpx;
.evaluator {
&>view {
display: flex;
align-items: center;
}
.evaluator-face {
width: 79rpx;
height: 79rpx;
border-radius: 50%;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.evaluator-info {
width: 85%;
margin-left: 13rpx;
.evaluator-name {
color: #303133;
font-size: $font-size-base;
line-height: 1;
width: 250rpx;
}
.evaluator-time {
font-size: $font-size-tag;
// margin-top: 14rpx;
line-height: 1;
}
.evaluator-info-left {
display: flex;
align-items: center;
justify-content: space-between;
}
}
}
.cont {
text-align: justify;
display: -webkit-box;
word-break: break-all;
font-size: $font-size-base;
margin: 26rpx 0 0;
color: #000000;
line-height: 42rpx;
}
.evaluate-img {
display: flex;
width: 100%;
flex-wrap: wrap;
margin-top: 19rpx;
.img-box {
flex-shrink: 0;
width: 140rpx;
height: 140rpx;
overflow: hidden;
margin: 20rpx 23rpx 0 0;
border-radius: 10rpx;
&:nth-child(4n) {
margin-right: 0;
}
&:nth-child(-n + 4) {
margin-top: 0;
}
image {
width: 100%;
height: 100%;
}
}
}
.time {
font-size: $font-size-tag;
background: #f8f8f8;
padding: 10rpx 20rpx;
border-radius: 6rpx;
margin-top: 20rpx;
text {
line-height: 42rpx;
color: $color-tip;
}
}
.evaluation-reply {
margin-top: 10rpx;
font-size: $font-size-tag;
}
.review-evaluation {
margin-top: 29rpx;
font-size: $font-size-base;
line-height: 1;
.review-time {
overflow: hidden;
float: right;
}
&+.cont {
margin: 18rpx 0 0;
}
}
}
}
.shop-reply {
font-size: $font-size-base;
color: #000;
line-height: 1;
&+.cont {
margin-top: 10rpx !important;
}
}
.shop-reply-box {
padding: 20rpx !important;
}
</style>

View File

@@ -1,43 +1,42 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="page">
<view class="closeBox">
<image :src="$util.img('public/uniapp/goods/not_exist.png')" mode="widthFix"></image>
<text class="close-title">您查看的商品不存在可能已下架或被删除</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
},
onShow() {},
methods: {}
};
</script>
<style lang="scss">
.page{
height: 100vh;
overflow: hidden;
}
.closeBox {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 260rpx;
}
image {
width: 400rpx;
}
.close-title {
font-size: $font-size-base;
color: $color-tip;
margin: 55rpx;
letter-spacing: 4rpx;
}
</style>
<template>
<view class="page" :style="themeColor">
<view class="closeBox">
<image :src="$util.img('public/uniapp/goods/not_exist.png')" mode="widthFix"></image>
<text class="close-title">您查看的商品不存在可能已下架或被删除</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
},
onShow() {},
methods: {}
};
</script>
<style lang="scss">
.page{
height: 100vh;
overflow: hidden;
}
.closeBox {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 260rpx;
}
image {
width: 400rpx;
}
.close-title {
font-size: $font-size-base;
color: $color-tip;
margin: 55rpx;
letter-spacing: 4rpx;
}
</style>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<view class="content">
<view class="cate-search">
<view class="search-box" @click="search()" @tap.stop="search()">

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="page">
<view class="page" :style="themeColor">
<view class="help-title">{{ detail.title }}</view>
<view class="help-content"><rich-text :nodes="content"></rich-text></view>
<view class="help-meta">

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="help">
<view class="help" :style="themeColor">
<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 File

@@ -1,95 +1,104 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img">
<view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch" :style="{ backgroundImage: bgImg }">
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true"/>
</view>
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl" :scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" :haveTopCategory="true"/>
<ns-copyright v-show="isShowCopyRight"/>
</diy-index-page>
<view v-else class="bg-index" :style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"/>
<ns-copyright v-show="isShowCopyRight"/>
</view>
<template v-if="diyData.global && diyData.global.popWindow && diyData.global.popWindow.count != -1 && diyData.global.popWindow.imageUrl">
<view @touchmove.prevent.stop>
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
<view class="image-wrap">
<image :src="$util.img(diyData.global.popWindow.imageUrl)" :style="popWindowStyle" @click="uniPopupWindowFn()" mode="aspectFit"/>
</view>
<text class="iconfont icon-round-close" @click="closePopupWindow"></text>
</uni-popup>
<view :style="themeColor">
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }"
class="page-img">
<view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch"
:style="{ backgroundImage: bgImg }">
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true" />
</view>
</template>
<!-- 底部tabBar -->
<view class="page-bottom" v-if="openBottomNav">
<diy-bottom-nav @callback="callback" :name="name"/>
</view>
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
:haveTopCategory="true" />
<ns-copyright v-show="isShowCopyRight" />
</diy-index-page>
<!-- 收藏 -->
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
<view v-if="showTip" class="collectPopupWindow" :style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit"/>
<text @click="closeCollectPopupWindow">我知道了</text>
<view v-else class="bg-index"
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" />
<ns-copyright v-show="isShowCopyRight" />
</view>
</uni-popup>
<!-- #ifdef MP-WEIXIN -->
<!-- 小程序隐私协议 -->
<privacy-popup ref="privacyPopup"></privacy-popup>
<!-- #endif -->
<template
v-if="diyData.global && diyData.global.popWindow && diyData.global.popWindow.count != -1 && diyData.global.popWindow.imageUrl">
<view @touchmove.prevent.stop>
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
<view class="image-wrap">
<image :src="$util.img(diyData.global.popWindow.imageUrl)" :style="popWindowStyle"
@click="uniPopupWindowFn()" mode="aspectFit" />
</view>
<text class="iconfont icon-round-close" @click="closePopupWindow"></text>
</uni-popup>
</view>
</template>
<!-- 底部tabBar -->
<view class="page-bottom" v-if="openBottomNav">
<diy-bottom-nav @callback="callback" :name="name" />
</view>
<!-- 收藏 -->
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
<view v-if="showTip" class="collectPopupWindow"
:style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
<text @click="closeCollectPopupWindow">我知道了</text>
</view>
</uni-popup>
<!-- #ifdef MP-WEIXIN -->
<!-- 小程序隐私协议 -->
<privacy-popup ref="privacyPopup"></privacy-popup>
<!-- #endif -->
</view>
</view>
</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';
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
},
mixins: [diyJs, microPageJs]
};
export default {
components: {
uniPopup,
nsNavbar
},
mixins: [diyJs, microPageJs]
};
</script>
<style lang="scss">
@import '@/common/css/diy.scss';
@import '@/common/css/diy.scss';
</style>
<style scoped>
.wap-floating>>>.uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
background: none !important;
}
.wap-floating>>>.uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
background: none !important;
}
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
border-radius: 0;
}
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
border-radius: 0;
}
.choose-store>>>.goodslist-uni-popup-box {
width: 80%;
}
.choose-store>>>.goodslist-uni-popup-box {
width: 80%;
}
/deep/ .placeholder {
height: 0;
}
/deep/ .placeholder {
height: 0;
}
/deep/::-webkit-scrollbar {
width: 0;
height: 0;
background-color: transparent;
display: none;
}
/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;
}
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
max-height: unset !important;
}
</style>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="find">
<view class="find" :style="themeColor">
<view class="iconfont icon-close" @click="navigateBack()"></view>
<view class="header-wrap">
<block v-if="stepShow == 0">

View File

@@ -1,482 +1,498 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<scroll-view scroll-y="false" class="container">
<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 :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="t-b">
<div v-html="$lang('welcomeText')"></div>
</view>
</view>
</view>
<view class="body-wrap">
<view class="form-wrap">
<view class="input-wrap" v-show="loginMode == 'mobile'">
<view class="content">
<!-- <view class="area-code">+86</view> -->
<input type="number" :placeholder="$lang('mobileInputPlaceholder')" placeholder-class="input-placeholder" class="input" maxlength="11" v-model="formData.mobile" />
<view class="body-wrap">
<view class="form-wrap">
<view class="input-wrap" v-show="loginMode == 'mobile'">
<view class="content">
<!-- <view class="area-code">+86</view> -->
<input type="number" :placeholder="$lang('mobileInputPlaceholder')"
placeholder-class="input-placeholder" class="input" maxlength="11"
v-model="formData.mobile" />
</view>
</view>
</view>
<view class="input-wrap" v-show="loginMode == 'account'">
<view class="content">
<input type="text" :placeholder="$lang('accountInputPlaceholder')" placeholder-class="input-placeholder" class="input" v-model="formData.account" />
<view class="input-wrap" v-show="loginMode == 'account'">
<view class="content">
<input type="text" :placeholder="$lang('accountInputPlaceholder')"
placeholder-class="input-placeholder" class="input" v-model="formData.account" />
</view>
</view>
</view>
<view class="input-wrap" v-show="loginMode == 'account'">
<view class="content">
<input type="password" :placeholder="$lang('passwordInputPlaceholder')" placeholder-class="input-placeholder" class="input" v-model="formData.password" />
<view class="align-right" v-show="loginMode == 'account'">
<text @click="forgetPassword">{{ $lang('forgetPasswordText') }}</text>
<view class="input-wrap" v-show="loginMode == 'account'">
<view class="content">
<input type="password" :placeholder="$lang('passwordInputPlaceholder')"
placeholder-class="input-placeholder" class="input" v-model="formData.password" />
<view class="align-right" v-show="loginMode == 'account'">
<text @click="forgetPassword">{{ $lang('forgetPasswordText') }}</text>
</view>
</view>
</view>
<view class="input-wrap" v-show="loginMode == 'mobile'">
<view class="content">
<input type="text" :placeholder="$lang('dynacodeInputPlaceholder')"
placeholder-class="input-placeholder" class="input" v-model="formData.dynacode" />
<view class="dynacode"
:class="dynacodeData.seconds == 120 ? 'color-base-text' : 'color-tip'"
@click="sendMobileCode">{{ dynacodeData.codeText }}</view>
</view>
</view>
</view>
<view class="input-wrap" v-show="loginMode == 'mobile'">
<view class="content">
<input type="text" :placeholder="$lang('dynacodeInputPlaceholder')" placeholder-class="input-placeholder" class="input" v-model="formData.dynacode" />
<view class="dynacode" :class="dynacodeData.seconds == 120 ? 'color-base-text' : 'color-tip'"
@click="sendMobileCode">{{ dynacodeData.codeText }}</view>
</view>
<view class="btn_view">
<button type="primary" @click="login" class="login-btn color-base-border color-base-bg"
style="background: #2796f2 !important;border: none;">{{ $lang('loginButtonText') }}</button>
</view>
<view class="regisiter-agreement"
style="margin: 0 50rpx;padding-top: 40rpx;line-height: 1.5;display: flex;">
<view style="" class="iconfont"
:class="isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2'"
@click="isAgree = !isAgree"></view>
<view style="text-align: left;margin-left: 10rpx;padding-top: 2rpx;">{{
$lang('registerAgreementText') }} <text @click="tourl('/pages_tool/agreement/contenr?type=0')"
style="color:#4395ff">{{ $lang('privacyPolicyText') }}</text> <text
@click="tourl('/pages_tool/agreement/contenr?type=1')" style="color:#4395ff">{{
$lang('userServiceAgreementText') }}</text></view>
</view>
</view>
<view class="btn_view">
<button type="primary" @click="login" class="login-btn color-base-border color-base-bg" style="background: #2796f2 !important;border: none;">{{ $lang('loginButtonText') }}</button>
</view>
<view class="regisiter-agreement" style="margin: 0 50rpx;padding-top: 40rpx;line-height: 1.5;display: flex;">
<view style="" class="iconfont" :class=" isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2' " @click="isAgree = !isAgree"></view>
<view style="text-align: left;margin-left: 10rpx;padding-top: 2rpx;">{{ $lang('registerAgreementText') }} <text @click="tourl('/pages_tool/agreement/contenr?type=0')" style="color:#4395ff">{{ $lang('privacyPolicyText') }}</text> <text @click="tourl('/pages_tool/agreement/contenr?type=1')" style="color:#4395ff">{{ $lang('userServiceAgreementText') }}</text></view>
</view>
</view>
<loading-cover ref="loadingCover"></loading-cover>
<register-reward ref="registerReward"></register-reward>
</scroll-view>
<loading-cover ref="loadingCover"></loading-cover>
<register-reward ref="registerReward"></register-reward>
</scroll-view>
</view>
</template>
<script>
import validate from 'common/js/validate.js';
import registerReward from '@/components/register-reward/register-reward.vue';
import validate from 'common/js/validate.js';
import registerReward from '@/components/register-reward/register-reward.vue';
export default {
data() {
return {
isAgree: false,
// loginMode: 'account',
loginMode: 'mobile',
formData: {
mobile: '',
account: '',
password: '',
vercode: '',
dynacode: '',
key: ''
},
captcha: {
id: '',
img: ''
},
isSub: false, // 提交防重复
back: '', // 返回页
redirect: 'redirectTo', // 跳转方式
dynacodeData: {
seconds: 120,
timer: null,
codeText: this.$lang('getDynacode'),
isSend: false
},
registerConfig: {
register: 'mobile',
login: ''
},
captchaConfig: 0,
authInfo: null
};
},
components: {
registerReward
},
onLoad(option) {
if (option.back) this.back = option.back;
this.getRegisterConfig();
// this.getCaptchaConfig();
this.authInfo = uni.getStorageSync('authInfo');
},
onShow() {},
onReady() {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
methods: {
/**
* 获取验证码配置
*/
getCaptchaConfig() {
this.$api.sendRequest({
url: '/api/config/getCaptchaConfig',
success: res => {
if (res.code >= 0) {
this.captchaConfig = res.data.shop_reception_login;
if (this.captchaConfig == 1) this.getCaptcha();
}
export default {
data() {
return {
isAgree: false,
// loginMode: 'account',
loginMode: 'mobile',
formData: {
mobile: '',
account: '',
password: '',
vercode: '',
dynacode: '',
key: ''
},
captcha: {
id: '',
img: ''
},
isSub: false, // 提交防重复
back: '', // 返回页
redirect: 'redirectTo', // 跳转方式
dynacodeData: {
seconds: 120,
timer: null,
codeText: this.$lang('getDynacode'),
isSend: false
},
registerConfig: {
register: 'mobile',
login: ''
},
captchaConfig: 0,
authInfo: null
};
},
components: {
registerReward
},
onLoad(option) {
if (option.back) this.back = option.back;
this.getRegisterConfig();
// this.getCaptchaConfig();
this.authInfo = uni.getStorageSync('authInfo');
},
onShow() { },
onReady() {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
methods: {
/**
* 获取验证码配置
*/
getCaptchaConfig() {
this.$api.sendRequest({
url: '/api/config/getCaptchaConfig',
success: res => {
if (res.code >= 0) {
this.captchaConfig = res.data.shop_reception_login;
if (this.captchaConfig == 1) this.getCaptcha();
}
});
},
/**
* 获取注册配置
*/
getRegisterConfig() {
this.$api.sendRequest({
url: '/api/register/config',
success: res => {
if (res.code >= 0) {
// this.registerConfig = res.data.value;
// if (this.registerConfig.login.indexOf('mobile') != -1) this.loginMode = 'mobile';
// else this.loginMode = 'account';
}
}
});
},
/**
* 切换登录方式
*/
switchLoginMode() {
this.loginMode = this.loginMode == 'mobile' ? 'account' : 'mobile';
},
/**
* 获取验证码
*/
getCaptcha() {
if (this.captchaConfig == 0) return;
this.$api.sendRequest({
url: '/api/captcha/captcha',
data: {
captcha_id: this.captcha.id
},
success: res => {
if (res.code >= 0) {
this.captcha = res.data;
this.captcha.img = this.captcha.img.replace(/\r\n/g, '');
}
}
});
},
/**
* 去注册
*/
toRegister() {
if (this.back) this.$util.redirectTo('/pages_tool/login/register', {
back: encodeURIComponent(this.back)
});
else this.$util.redirectTo('/pages_tool/login/register');
},
/**
* 忘记密码
*/
forgetPassword() {
if (this.back) this.$util.redirectTo('/pages_tool/login/find', {
back: encodeURIComponent(this.back)
});
else this.$util.redirectTo('/pages_tool/login/find');
},
tourl(url){
this.$util.redirectTo(url);
},
/**
* 登录
*/
login() {
if (!this.isAgree) {
this.$util.showToast({
title: this.$lang('agreeAgreementTip')
});
return false;
}
if (this.loginMode == 'account') {
var url = '/api/login/login';
});
},
/**
* 获取注册配置
*/
getRegisterConfig() {
this.$api.sendRequest({
url: '/api/register/config',
success: res => {
if (res.code >= 0) {
// this.registerConfig = res.data.value;
// if (this.registerConfig.login.indexOf('mobile') != -1) this.loginMode = 'mobile';
// else this.loginMode = 'account';
}
}
});
},
/**
* 切换登录方式
*/
switchLoginMode() {
this.loginMode = this.loginMode == 'mobile' ? 'account' : 'mobile';
},
/**
* 获取验证码
*/
getCaptcha() {
if (this.captchaConfig == 0) return;
this.$api.sendRequest({
url: '/api/captcha/captcha',
data: {
captcha_id: this.captcha.id
},
success: res => {
if (res.code >= 0) {
this.captcha = res.data;
this.captcha.img = this.captcha.img.replace(/\r\n/g, '');
}
}
});
},
/**
* 去注册
*/
toRegister() {
if (this.back) this.$util.redirectTo('/pages_tool/login/register', {
back: encodeURIComponent(this.back)
});
else this.$util.redirectTo('/pages_tool/login/register');
},
/**
* 忘记密码
*/
forgetPassword() {
if (this.back) this.$util.redirectTo('/pages_tool/login/find', {
back: encodeURIComponent(this.back)
});
else this.$util.redirectTo('/pages_tool/login/find');
},
tourl(url) {
this.$util.redirectTo(url);
},
/**
* 登录
*/
login() {
if (!this.isAgree) {
this.$util.showToast({
title: this.$lang('agreeAgreementTip')
});
return false;
}
if (this.loginMode == 'account') {
var url = '/api/login/login';
data = {
username: this.formData.account,
password: this.formData.password
};
} else {
var url = '/api/login/mobile',
data = {
username: this.formData.account,
password: this.formData.password
mobile: this.formData.mobile,
key: this.formData.key,
code: this.formData.dynacode
};
} else {
var url = '/api/login/mobile',
data = {
mobile: this.formData.mobile,
key: this.formData.key,
code: this.formData.dynacode
};
}
if (this.captcha.id != '') {
data.captcha_id = this.captcha.id;
data.captcha_code = this.formData.vercode;
}
if (this.authInfo) Object.assign(data, this.authInfo);
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
}
if (this.captcha.id != '') {
data.captcha_id = this.captcha.id;
data.captcha_code = this.formData.vercode;
}
if (this.authInfo) Object.assign(data, this.authInfo);
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
if (this.verify(data)) {
if (this.isSub) return;
this.isSub = true;
this.$api.sendRequest({
url,
data,
success: res => {
if (res.code >= 0) {
var can_receive_registergift = res.data.can_receive_registergift;
this.$store.commit('setToken', res.data.token);
this.$store.dispatch('getCartNumber');
this.getMemberInfo(() => {
if (can_receive_registergift == 1) {
this.$util.showToast({
title: this.$lang('loginSuccessTip')
});
let back = this.back ? this.back : '/pages/member/index';
if(this.$refs.registerReward) this.$refs.registerReward.open(back);
if (this.verify(data)) {
if (this.isSub) return;
this.isSub = true;
this.$api.sendRequest({
url,
data,
success: res => {
if (res.code >= 0) {
var can_receive_registergift = res.data.can_receive_registergift;
this.$store.commit('setToken', res.data.token);
this.$store.dispatch('getCartNumber');
this.getMemberInfo(() => {
if (can_receive_registergift == 1) {
this.$util.showToast({
title: this.$lang('loginSuccessTip')
});
let back = this.back ? this.back : '/pages/member/index';
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
} else {
if (this.back != '') {
this.$util.redirectTo(decodeURIComponent(this.back), {}, 'reLaunch');
} else {
if (this.back != '') {
this.$util.redirectTo(decodeURIComponent(this.back), {}, 'reLaunch');
} else {
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
}
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
}
});
} else {
this.isSub = false;
this.getCaptcha();
this.$util.showToast({
title: res.message
});
}
},
fail: res => {
}
});
} else {
this.isSub = false;
this.getCaptcha();
}
});
}
},
/**
* 登录验证
* @param {Object} data
*/
verify(data) {
let rule = [];
// 手机号验证
if (this.loginMode == 'mobile') {
rule = [{
name: 'mobile',
checkType: 'required',
errorMsg: this.$lang('enterMobileTip')
}, {
name: 'mobile',
checkType: 'phoneno',
errorMsg: this.$lang('enterCorrectMobileTip')
}];
if (this.captchaConfig == 1) {
if (this.captcha.id != '') rule.push({
name: 'captcha_code',
checkType: 'required',
errorMsg: this.$lang('captchaPlaceholder')
});
}
rule.push({
name: 'code',
checkType: 'required',
errorMsg: this.$lang('dynacodePlaceholder')
});
}
// 账号验证
if (this.loginMode == 'account') {
rule = [{
name: 'username',
checkType: 'required',
errorMsg: this.$lang('accountPlaceholder')
},
{
name: 'password',
checkType: 'required',
errorMsg: this.$lang('passwordPlaceholder')
}
];
if (this.captchaConfig == 1) {
if (this.captcha.id != '') rule.push({
name: 'captcha_code',
checkType: 'required',
errorMsg: this.$lang('captchaPlaceholder')
});
}
}
var checkRes = validate.check(data, rule);
if (checkRes) {
return true;
} else {
this.$util.showToast({
title: validate.error
});
return false;
}
},
mobileAuthLogin(e) {
if (e.detail.errMsg == 'getPhoneNumber:ok') {
var data = {
iv: e.detail.iv,
encryptedData: e.detail.encryptedData
};
if (Object.keys(this.authInfo).length) {
Object.assign(data, this.authInfo);
if (this.authInfo.nickName) data.nickname = this.authInfo.nickName;
if (this.authInfo.avatarUrl) data.headimg = this.authInfo.avatarUrl;
}
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
if (this.isSub) return;
this.isSub = true;
this.$api.sendRequest({
url: '/api/tripartite/mobileauth',
data,
success: res => {
if (res.code >= 0) {
var can_receive_registergift = res.data.can_receive_registergift;
this.$store.commit('setToken', res.data.token);
this.$store.dispatch('getCartNumber');
this.getMemberInfo(() => {
if (can_receive_registergift == 1) {
let back = this.back ? this.back : '/pages/member/index';
if(this.$refs.registerReward) this.$refs.registerReward.open(back);
} else {
if (this.back != '') {
this.$util.redirectTo(decodeURIComponent(this.back), {}, this.redirect);
} else {
this.$util.redirectTo('/pages/member/index', {}, this.redirect);
}
}
})
} else {
this.isSub = false;
this.$util.showToast({
title: res.message
});
}
},
fail: res => {
this.isSub = false;
this.$util.showToast({
title: this.$lang('requestFailTip')
});
}
});
}
},
/**
* 发送手机动态码
*/
sendMobileCode() {
if (this.dynacodeData.seconds != 120 || this.dynacodeData.isSend) return;
var data = {
mobile: this.formData.mobile,
captcha_id: this.captcha.id,
captcha_code: this.formData.vercode
};
var rule = [{
name: 'mobile',
checkType: 'required',
errorMsg: '请输入手机号'
}, {
name: 'mobile',
checkType: 'phoneno',
errorMsg: '请输入正确的手机号'
}];
if (this.captchaConfig == 1) {
rule.push({
name: 'captcha_code',
checkType: 'required',
errorMsg: this.$lang('enterCaptchaTip')
});
}
var checkRes = validate.check(data, rule);
if (!checkRes) {
this.$util.showToast({
title: validate.error
});
return;
}
this.dynacodeData.isSend = true;
this.dynacodeData.timer = setInterval(() => {
this.dynacodeData.seconds--;
this.dynacodeData.codeText = this.dynacodeData.seconds + 's后可重新获取';
}, 1000);
this.$api.sendRequest({
url: '/api/login/mobileCode',
data: data,
success: res => {
if (res.code >= 0) {
this.formData.key = res.data.key;
} else {
this.refreshDynacodeData();
this.$util.showToast({
title: res.message
});
}
},
fail: () => {
this.$util.showToast({
title: 'request:fail'
});
this.refreshDynacodeData();
}
});
},
refreshDynacodeData() {
this.getCaptcha();
clearInterval(this.dynacodeData.timer);
this.dynacodeData = {
seconds: 120,
timer: null,
codeText: '获取动态码',
isSend: false
};
},
getMemberInfo(callback) {
this.$api.sendRequest({
url: '/api/member/info',
success: (res) => {
if (res.code >= 0) {
// 登录成功,存储会员信息
this.$store.commit('setMemberInfo', res.data);
if (callback) callback();
}
fail: res => {
this.isSub = false;
this.getCaptcha();
}
});
}
},
watch: {
'dynacodeData.seconds': {
handler(newValue, oldValue) {
if (newValue == 0) {
/**
* 登录验证
* @param {Object} data
*/
verify(data) {
let rule = [];
// 手机号验证
if (this.loginMode == 'mobile') {
rule = [{
name: 'mobile',
checkType: 'required',
errorMsg: this.$lang('enterMobileTip')
}, {
name: 'mobile',
checkType: 'phoneno',
errorMsg: this.$lang('enterCorrectMobileTip')
}];
if (this.captchaConfig == 1) {
if (this.captcha.id != '') rule.push({
name: 'captcha_code',
checkType: 'required',
errorMsg: this.$lang('captchaPlaceholder')
});
}
rule.push({
name: 'code',
checkType: 'required',
errorMsg: this.$lang('dynacodePlaceholder')
});
}
// 账号验证
if (this.loginMode == 'account') {
rule = [{
name: 'username',
checkType: 'required',
errorMsg: this.$lang('accountPlaceholder')
},
{
name: 'password',
checkType: 'required',
errorMsg: this.$lang('passwordPlaceholder')
}
];
if (this.captchaConfig == 1) {
if (this.captcha.id != '') rule.push({
name: 'captcha_code',
checkType: 'required',
errorMsg: this.$lang('captchaPlaceholder')
});
}
}
var checkRes = validate.check(data, rule);
if (checkRes) {
return true;
} else {
this.$util.showToast({
title: validate.error
});
return false;
}
},
mobileAuthLogin(e) {
if (e.detail.errMsg == 'getPhoneNumber:ok') {
var data = {
iv: e.detail.iv,
encryptedData: e.detail.encryptedData
};
if (Object.keys(this.authInfo).length) {
Object.assign(data, this.authInfo);
if (this.authInfo.nickName) data.nickname = this.authInfo.nickName;
if (this.authInfo.avatarUrl) data.headimg = this.authInfo.avatarUrl;
}
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
if (this.isSub) return;
this.isSub = true;
this.$api.sendRequest({
url: '/api/tripartite/mobileauth',
data,
success: res => {
if (res.code >= 0) {
var can_receive_registergift = res.data.can_receive_registergift;
this.$store.commit('setToken', res.data.token);
this.$store.dispatch('getCartNumber');
this.getMemberInfo(() => {
if (can_receive_registergift == 1) {
let back = this.back ? this.back : '/pages/member/index';
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
} else {
if (this.back != '') {
this.$util.redirectTo(decodeURIComponent(this.back), {}, this.redirect);
} else {
this.$util.redirectTo('/pages/member/index', {}, this.redirect);
}
}
})
} else {
this.isSub = false;
this.$util.showToast({
title: res.message
});
}
},
fail: res => {
this.isSub = false;
this.$util.showToast({
title: this.$lang('requestFailTip')
});
}
});
}
},
/**
* 发送手机动态码
*/
sendMobileCode() {
if (this.dynacodeData.seconds != 120 || this.dynacodeData.isSend) return;
var data = {
mobile: this.formData.mobile,
captcha_id: this.captcha.id,
captcha_code: this.formData.vercode
};
var rule = [{
name: 'mobile',
checkType: 'required',
errorMsg: '请输入手机号'
}, {
name: 'mobile',
checkType: 'phoneno',
errorMsg: '请输入正确的手机号'
}];
if (this.captchaConfig == 1) {
rule.push({
name: 'captcha_code',
checkType: 'required',
errorMsg: this.$lang('enterCaptchaTip')
});
}
var checkRes = validate.check(data, rule);
if (!checkRes) {
this.$util.showToast({
title: validate.error
});
return;
}
this.dynacodeData.isSend = true;
this.dynacodeData.timer = setInterval(() => {
this.dynacodeData.seconds--;
this.dynacodeData.codeText = this.dynacodeData.seconds + 's后可重新获取';
}, 1000);
this.$api.sendRequest({
url: '/api/login/mobileCode',
data: data,
success: res => {
if (res.code >= 0) {
this.formData.key = res.data.key;
} else {
this.refreshDynacodeData();
this.$util.showToast({
title: res.message
});
}
},
immediate: true,
deep: true
}
fail: () => {
this.$util.showToast({
title: 'request:fail'
});
this.refreshDynacodeData();
}
});
},
refreshDynacodeData() {
this.getCaptcha();
clearInterval(this.dynacodeData.timer);
this.dynacodeData = {
seconds: 120,
timer: null,
codeText: '获取动态码',
isSend: false
};
},
getMemberInfo(callback) {
this.$api.sendRequest({
url: '/api/member/info',
success: (res) => {
if (res.code >= 0) {
// 登录成功,存储会员信息
this.$store.commit('setMemberInfo', res.data);
if (callback) callback();
}
}
});
}
};
},
watch: {
'dynacodeData.seconds': {
handler(newValue, oldValue) {
if (newValue == 0) {
this.refreshDynacodeData();
}
},
immediate: true,
deep: true
}
}
};
</script>
<style lang="scss">
@import './public/css/common.scss';
.color-base-text{
color:#2796f2 !important
}
@import './public/css/common.scss';
.color-base-text {
color: #2796f2 !important
}
</style>
<style lang="scss" scoped>
/deep/ .reward-popup .uni-popup__wrapper-box {
background: none !important;
max-width: unset !important;
max-height: unset !important;
overflow: unset !important;
}
/deep/ .reward-popup .uni-popup__wrapper-box {
background: none !important;
max-width: unset !important;
max-height: unset !important;
overflow: unset !important;
}
/deep/ uni-toast .uni-simple-toast__text {
background: red !important;
}
/deep/ uni-toast .uni-simple-toast__text {
background: red !important;
}
</style>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<mescroll-uni ref="mescroll" @getData="getData" v-if="storeToken">
<block slot="list">
<view class="nc-info-list-content">
@@ -66,12 +65,20 @@
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
loadingCover,
nsEmpty,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
data() {
return {

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="account-list-content">
<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" />

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="address-edit-content">
<view class="address-edit-content" :style="themeColor">
<view class="edit-wrap">
<view class="tip">地址信息</view>
<view class="edit-item">

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view class="container" :style="themeColor">
<view class="bank-account-wrap" @click="goAccount()">
<view class="tx-wrap" v-if="bankAccountInfo.withdraw_type">
<text class="tx-to">提现到</text>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view class="container" :style="themeColor">
<view class="assets-wrap">
<view class="assets-block">
<view class="assets-tips"><text>风险提示确认申请后您的资产将被清空且不可找回!</text></view>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="balance">
<view class="balance" :style="themeColor">
<!-- #ifdef MP-WEIXIN -->
<view class="custom-navbar" :style="{
'padding-top': menuButtonBounding.top + 'px',

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<!-- <scroll-view id="tab-bar" class="order-nav" :scroll-x="true" :show-scrollbar="false" :scroll-into-view="scrollInto">
<view v-for="(statusItem, statusIndex) in statusList" :key="statusIndex" class="uni-tab-item" :id="statusItem.id" :data-current="statusIndex" @click="ontabtap">
<text class="uni-tab-item-title" :class="statusIndex == orderStatus ? 'uni-tab-item-title-active' : ''">{{ statusItem.name }}</text>
@@ -55,12 +54,18 @@
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
MescrollUni,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
data() {
const currentDate = this.getDate({

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view class="container" :style="themeColor">
<view class="agreement-box">
<view class="agreement-intro">
<view class="align-center agreement-title">{{ agreement.title }}</view>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<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-title">您的申请已拒绝</view>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view class="container" :style="themeColor">
<view class="cancelstatus-wrap">
<view class="cancelstatus-block">
<view class="cancelstatus-box">

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view class="container" :style="themeColor">
<view class="cancel-wrap">
<view class="cancel-img">
<image :src="$util.img('public/uniapp/member/success.png')"></image>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="member-level">
<view class="member-level" :style="themeColor">
<view class="level-top">
<image :src="$util.img('public/uniapp/level/card-top-bg.png')"></image>
</view>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="page">
<view class="page" :style="themeColor">
<view class="agreement-title">{{ title }}</view>
<view class="agreement-content"><rich-text :nodes="content"></rich-text></view>
</view>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="member-level">
<view class="member-level" :style="themeColor">
<block v-if="levelList.length">
<view class="level-top">
<image :src="$util.img('public/uniapp/level/card-top-bg.png')"></image>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<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">
@@ -41,6 +40,9 @@ 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 {
@@ -49,7 +51,10 @@ export default {
nsEmpty,
nsLogin,
loadingCover,
MescrollUni
MescrollUni,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
mixins: [collection],
data() {

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="contact">
<view class="contact" :style="themeColor">
<image :src="$util.img('public/uniapp/member/contact_service.png')" mode="widthFix"></image>
<!--<ns-contact><button type="primary">联系客服</button></ns-contact>-->
</view>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view :class="isIphoneX ? 'iphone-x' : ''">
<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>
@@ -75,12 +74,18 @@ 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
MescrollUni,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
data() {
return {

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view class="container" :style="themeColor">
<view class="head-wrap" v-if="storeToken">
<text @click="manageFootprint">{{ manage ? '完成' : '管理' }}</text>
</view>
@@ -69,13 +68,19 @@ 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
MescrollUni,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
data() {
return {

View File

@@ -1,65 +1,75 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img">
<view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch"
:style="{ backgroundImage: bgImg }">
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true" />
</view>
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
:haveTopCategory="true" />
<ns-copyright v-show="isShowCopyRight" />
</diy-index-page>
<view v-else class="bg-index"
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" />
<ns-copyright v-show="isShowCopyRight" />
<view class="foot">
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=0')">{{ isEnEnv ? 'Privacy Policy' : '隐私协议'}}</view>
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=1')">{{ isEnEnv ? 'Registration Agreement' : '注册协议'}}</view>
<view :style="themeColor">
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }"
class="page-img">
<view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch"
:style="{ backgroundImage: bgImg }">
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true" />
</view>
</view>
<template
v-if="diyData.global && diyData.global.popWindow && diyData.global.popWindow.count != -1 && diyData.global.popWindow.imageUrl">
<view @touchmove.prevent.stop>
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
<view class="image-wrap">
<image :src="$util.img(diyData.global.popWindow.imageUrl)" :style="popWindowStyle"
@click="uniPopupWindowFn()" mode="aspectFit" />
</view>
<text class="iconfont icon-round-close" @click="closePopupWindow"></text>
</uni-popup>
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
:haveTopCategory="true" />
<ns-copyright v-show="isShowCopyRight" />
</diy-index-page>
<view v-else class="bg-index"
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" />
<ns-copyright v-show="isShowCopyRight" />
<view class="foot">
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=0')">{{
$lang('privacyPolicy') }}</view>
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=1')">{{
$lang('registrationAgreement') }}</view>
</view>
<!-- 退出登录和账号注销按钮 -->
<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>
</view>
</template>
<!-- 底部tabBar -->
<view id="tab-bar" :class="{ hide: bottomNavHidden }" v-if="openBottomNav">
<diy-bottom-nav @callback="callback" />
</view>
<template
v-if="diyData.global && diyData.global.popWindow && diyData.global.popWindow.count != -1 && diyData.global.popWindow.imageUrl">
<view @touchmove.prevent.stop>
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
<view class="image-wrap">
<image :src="$util.img(diyData.global.popWindow.imageUrl)" :style="popWindowStyle"
@click="uniPopupWindowFn()" mode="aspectFit" />
</view>
<text class="iconfont icon-round-close" @click="closePopupWindow"></text>
</uni-popup>
</view>
</template>
<!-- 收藏 -->
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
<view v-if="showTip" class="collectPopupWindow"
:style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
<text @click="closeCollectPopupWindow">我知道了</text>
<!-- 底部tabBar -->
<view id="tab-bar" :class="{ hide: bottomNavHidden }" v-if="openBottomNav">
<diy-bottom-nav @callback="callback" />
</view>
</uni-popup>
<ns-birthday-gift ref="birthdayGift"></ns-birthday-gift>
<ns-new-gift ref="nsNewGift"></ns-new-gift>
<!-- 收藏 -->
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
<view v-if="showTip" class="collectPopupWindow"
:style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
<text @click="closeCollectPopupWindow">我知道了</text>
</view>
</uni-popup>
<ns-birthday-gift ref="birthdayGift"></ns-birthday-gift>
<ns-new-gift ref="nsNewGift"></ns-new-gift>
<hover-nav></hover-nav>
<!-- #ifdef MP-WEIXIN -->
<!-- 小程序隐私协议 -->
<privacy-popup ref="privacyPopup"></privacy-popup>
<!-- #endif -->
<hover-nav></hover-nav>
<!-- #ifdef MP-WEIXIN -->
<!-- 小程序隐私协议 -->
<privacy-popup ref="privacyPopup"></privacy-popup>
<!-- #endif -->
</view>
</view>
</template>
@@ -79,6 +89,52 @@ export default {
tourl(url) {
this.$util.redirectTo(url);
},
// 退出登录
logout() {
uni.showModal({
title: this.$lang('logoutTitle'),
content: this.$lang('logoutContent'),
success: (res) => {
if (res.confirm) {
this.$store.commit('setToken', '');
this.$store.commit('setMemberInfo', '');
this.$store.dispatch('emptyCart');
uni.removeStorageSync('authInfo');
this.$util.redirectTo('/pages/member/index');
}
}
});
},
// 账号注销
cancellation() {
uni.showModal({
title: this.$lang('cancellationTitle'),
content: this.$lang('cancellationContent'),
confirmColor: '#000000',
success: res => {
if (res.confirm) {
this.$api.sendRequest({
url: '/membercancel/api/membercancel/apply',
success: rres => {
if (rres.code >= 0) {
this.$store.commit('setToken', '');
this.$store.commit('setMemberInfo', '');
this.$store.dispatch('emptyCart');
uni.removeStorageSync('authInfo');
this.$util.redirectTo('/pages/member/index');
} else {
this.$util.showToast({
title: rres.message
});
}
}
});
}
}
});
}
}
@@ -100,6 +156,7 @@ export default {
color: #F4391c
}
}
</style>
<style scoped>
@@ -133,4 +190,33 @@ export default {
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
max-height: unset !important;
}
.action-buttons {
display: flex;
flex-direction: column;
align-items: center;
margin: 20rpx 30rpx 40rpx;
gap: 20rpx;
}
.action-btn {
width: 80%;
height: 80rpx;
line-height: 80rpx;
text-align: center;
border-radius: 40rpx;
font-size: 28rpx;
font-weight: 500;
}
.logout-btn {
background-color: var(--main-color);
color: #fff;
border: 1rpx solid #ddd;
}
.cancel-btn {
background-color:var(--main-color);
color: #fff;
}
</style>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<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 File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<template v-if="memberInfo">
<!-- 修改用户名 -->
<view v-if="indent == 'username'" class="edit-info">

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<view v-if="info" style="background-color: #fff;">
<view class="invite_adv">

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="member-level">
<view :style="themeColor" class="member-level">
<view class="level-top">
<image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image>
</view>

View File

@@ -1,275 +1,274 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="member-level">
<view class="grow-explain">
<view class="explain-title">
<image :src="$util.img('public/uniapp/level/growth_that_left.png')" mode="aspectFit"></image>
成长值说明
<image :src="$util.img('public/uniapp/level/growth_that_right.png')" mode="aspectFit"></image>
</view>
<view class="explain-table">
<view class="explain-tr">
<text class="explain-th">等级</text>
<text class="explain-th">成长值</text>
</view>
<view class="explain-tr" v-for="(item, index) in levelList" :key="index">
<text class="explain-td">{{ item.level_name }}</text>
<text class="explain-td">{{ item.growth }}</text>
</view>
</view>
</view>
<view class="grow-value">
<view class="title">
<image :src="$util.img('public/uniapp/level/explain.png')" mode="aspectFit"></image>
<text>什么是成长值</text>
</view>
<view class="content color-tip">成长值是消费者在店铺成为会员后通过消费计算出来的值成长值决定会员等级会员等级越高所享受的会员权益和会员礼包就越多</view>
</view>
<view class="acquisition-grow">
<view class="title">
<image :src="$util.img('public/uniapp/level/explain.png')" mode="aspectFit"></image>
<text>如何获得成长值</text>
</view>
<view class="content color-tip">
<text>1注册会员送x成长值</text>
<text>2会员充值到余额送x成长值</text>
<text>3会员签到送x成长值</text>
<text>4会员消费x元交易完成即可获得x个成长值</text>
</view>
</view>
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</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,
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;
}
.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;
}
.explain-tr {
display: flex;
}
.explain-th {
padding: 10rpx 30rpx;
&~.explain-th {
border-left: 4rpx solid #fff;
}
flex: 1;
background-color: #f6f1e4;
}
.explain-td {
padding: 10rpx 30rpx;
&~.explain-td {
border-left: 4rpx solid #fff;
}
height: 60rpx;
line-height: 60rpx;
flex: 1;
background-color: #fcfbf7;
}
}
.grow-value,
.acquisition-grow {
padding: 0 30rpx 30rpx;
.title {
display: flex;
align-items: center;
image {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
}
.content {
font-size: 24rpx;
margin-left: 40rpx;
text {
display: block;
}
}
}
<template>
<view :style="themeColor" class="member-level">
<view class="grow-explain">
<view class="explain-title">
<image :src="$util.img('public/uniapp/level/growth_that_left.png')" mode="aspectFit"></image>
成长值说明
<image :src="$util.img('public/uniapp/level/growth_that_right.png')" mode="aspectFit"></image>
</view>
<view class="explain-table">
<view class="explain-tr">
<text class="explain-th">等级</text>
<text class="explain-th">成长值</text>
</view>
<view class="explain-tr" v-for="(item, index) in levelList" :key="index">
<text class="explain-td">{{ item.level_name }}</text>
<text class="explain-td">{{ item.growth }}</text>
</view>
</view>
</view>
<view class="grow-value">
<view class="title">
<image :src="$util.img('public/uniapp/level/explain.png')" mode="aspectFit"></image>
<text>什么是成长值</text>
</view>
<view class="content color-tip">成长值是消费者在店铺成为会员后通过消费计算出来的值成长值决定会员等级会员等级越高所享受的会员权益和会员礼包就越多</view>
</view>
<view class="acquisition-grow">
<view class="title">
<image :src="$util.img('public/uniapp/level/explain.png')" mode="aspectFit"></image>
<text>如何获得成长值</text>
</view>
<view class="content color-tip">
<text>1注册会员送x成长值</text>
<text>2会员充值到余额送x成长值</text>
<text>3会员签到送x成长值</text>
<text>4会员消费x元交易完成即可获得x个成长值</text>
</view>
</view>
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</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,
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;
}
.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;
}
.explain-tr {
display: flex;
}
.explain-th {
padding: 10rpx 30rpx;
&~.explain-th {
border-left: 4rpx solid #fff;
}
flex: 1;
background-color: #f6f1e4;
}
.explain-td {
padding: 10rpx 30rpx;
&~.explain-td {
border-left: 4rpx solid #fff;
}
height: 60rpx;
line-height: 60rpx;
flex: 1;
background-color: #fcfbf7;
}
}
.grow-value,
.acquisition-grow {
padding: 0 30rpx 30rpx;
.title {
display: flex;
align-items: center;
image {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
}
.content {
font-size: 24rpx;
margin-left: 40rpx;
text {
display: block;
}
}
}
</style>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="nc-modify-content">
<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"/>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view :style="themeColor" class="container">
<view class="tips" v-if="step != 0">请输入6位支付密码建议不要使用重复或连续数字</view>
<view class="tips" v-else>验证码已发送至{{ memberInfo.mobile | mobile }}请在下方输入4位数字验证码</view>
<view class="password-wrap">

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="point">
<view :style="themeColor" class="point">
<!-- #ifdef MP-WEIXIN -->
<view class="custom-navbar" :style="{
'padding-top': menuButtonBounding.top + 'px',

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<!-- <view class="tab color-bg">
<view class="tab-left">
<picker mode="date" :value="searchType.date" @change="bindDateChange" fields="month">
@@ -50,12 +49,18 @@ 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
MescrollUni,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
data() {
const currentDate = this.getDate({

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<mescroll-uni @getData="getData" class="member-point">
<view slot="list">
<block v-if="dataList.length">
@@ -35,12 +34,18 @@ 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
MescrollUni,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
data() {
return {

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<view class="money-wrap">
<text>-{{ detail.apply_money }}</text>
</view>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="page">
<view :style="themeColor" class="page">
<view class="notice-title">{{ detail.title }}</view>
<view class="notice-meta">
<text class="notice-time">发表时间: {{ $util.timeStampTurnTime(detail.create_time) }}</text>

View File

@@ -1,10 +1,10 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<mescroll-uni @getData="getData" ref="mescroll">
<block slot="list">
<view class="notice-list" v-if="dataList.length">
<view class="notice-item" @click="jumpDetail(item.id)" v-for="(item, index) in dataList" :key="index">
<view class="notice-item" @click="jumpDetail(item.id)" v-for="(item, index) in dataList"
:key="index">
<view class="title-info">
<view class="title">
<text v-if="item.is_top == 1" class="color-base-bg tag">置顶</text>
@@ -28,152 +28,167 @@
</template>
<script>
export default {
data() {
return {
dataList: []
};
},
onShow() {
this.setPublicShare();
},
methods: {
getData(mescroll) {
this.$api.sendRequest({
url: '/api/notice/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); //追加新数据
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
fail: res => {
mescroll.endErr();
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
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,
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
data() {
return {
dataList: []
};
},
onShow() {
this.setPublicShare();
},
methods: {
getData(mescroll) {
this.$api.sendRequest({
url: '/api/notice/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
});
}
});
},
jumpDetail(e) {
this.$util.redirectTo('/pages_tool/notice/detail?notice_id=' + e);
},
// 设置公众号分享
setPublicShare() {
let shareUrl = this.$config.h5Domain + '/pages_tool/notice/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.dataList = []; //如果是第一页需手动制空列表
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();
}
});
},
onShareAppMessage(res) {
var title = '公告';
var path = '/pages_tool/notice/list';
return {
title: title,
path: path,
success: res => {},
fail: res => {}
};
jumpDetail(e) {
this.$util.redirectTo('/pages_tool/notice/detail?notice_id=' + e);
},
// 设置公众号分享
setPublicShare() {
let shareUrl = this.$config.h5Domain + '/pages_tool/notice/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/notice/list';
return {
title: title,
path: path,
success: res => { },
fail: res => { }
};
}
};
</script>
<style lang="scss" scoped>
/deep/ .fixed {
position: relative;
top: 0;
}
/deep/ .fixed {
position: relative;
top: 0;
}
.cart-empty {
padding-top: 308rpx;
}
.cart-empty {
padding-top: 308rpx;
}
.notice-list {
.notice-item {
margin: $margin-updown $margin-both;
background: #fff;
border-radius: 10rpx;
padding: 32rpx 34rpx;
box-sizing: border-box;
.notice-list {
.notice-item {
margin: $margin-updown $margin-both;
background: #fff;
border-radius: 10rpx;
padding: 32rpx 34rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
line-height: 1;
.title-info {
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
line-height: 1;
overflow: hidden;
.title-info {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
overflow: hidden;
.title {
flex: 6;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: flex;
align-items: center;
.txt {
color: #000;
font-size: $font-size-base;
}
.tag {
font-size: 22rpx;
color: #ffffff;
line-height: 28rpx;
border-radius: 6rpx;
padding: 2rpx 6rpx;
margin-right: 10rpx;
}
}
.release-time {
flex: 2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-left: 20rpx;
color: $color-tip;
text-align: right;
font-size: $font-size-tag;
}
.iconfont {
color: $color-tip;
font-size: $font-size-tag;
}
}
.content {
margin-top: 10rpx;
display: inline-block;
white-space: nowrap;
.title {
flex: 6;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
white-space: nowrap;
display: flex;
align-items: center;
.txt {
color: #000;
font-size: $font-size-base;
}
.tag {
font-size: 22rpx;
color: #ffffff;
line-height: 28rpx;
border-radius: 6rpx;
padding: 2rpx 6rpx;
margin-right: 10rpx;
}
}
.release-time {
flex: 2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-left: 20rpx;
color: $color-tip;
font-size: $font-size-goods-tag;
padding-bottom: 30rpx;
text-align: right;
font-size: $font-size-tag;
}
.iconfont {
color: $color-tip;
font-size: $font-size-tag;
}
}
.content {
margin-top: 10rpx;
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
color: $color-tip;
font-size: $font-size-goods-tag;
padding-bottom: 30rpx;
}
}
}
</style>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="activist-container">
<view :style="themeColor" class="activist-container">
<mescroll-uni ref="mescroll" @getData="getListData">
<block slot="list">
<view class="container">
@@ -59,11 +58,15 @@
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
nsEmpty,
nsLogin,
loadingCover
},
data() {
return {

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<loading-cover ref="loadingCover"></loading-cover>
</view>
</template>

View File

@@ -1,87 +1,86 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view>
<view class="page">
<block v-for="(item, index) in goodsList" :key="index">
<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" />
<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="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'
? '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>
</view>
</view>
</view>
<view class="eval-text">
<view class="text-box">
<block v-if="!isEvaluate">
<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" />
<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>
<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>
</view>
</view>
</view>
</block>
</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>
<text>匿名</text>
</view>
<view class="action-btn"><button type="primary" @click="save()">提交</button></view>
</view>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</view>
</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],
};
</script>
<style lang="scss">
@import './public/css/evaluate.scss'
<template>
<view :style="themeColor">
<view>
<view class="page">
<block v-for="(item, index) in goodsList" :key="index">
<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" />
<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="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'
? '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>
</view>
</view>
</view>
<view class="eval-text">
<view class="text-box">
<block v-if="!isEvaluate">
<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" />
<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>
<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>
</view>
</view>
</view>
</block>
</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>
<text>匿名</text>
</view>
<view class="action-btn"><button type="primary" @click="save()">提交</button></view>
</view>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</view>
</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],
};
</script>
<style lang="scss">
@import './public/css/evaluate.scss'
</style>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<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 File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<view>
<scroll-view scroll-y="true" class="refund-container">
<view class="goods-wrap">

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<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 File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<scroll-view scroll-y="true" class="detail-container" :class="{ 'safe-area': isIphoneX }" v-if="detail">
<view v-show="action == ''">
<view class="status-wrap">

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="goods-select">
<view class="goods-select" :style="themeColor">
<view class="top">
<text class="color-base-text">{{refund_data.length}}</text>件商品
</view>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<view>
<view class="refund-option">
<view class="option-item" @click="selectRefundType(1)">

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="cashier">
<view class="cashier" :style="themeColor">
<block v-if="payInfo">
<block v-if="payInfo.pay_status == 0">
<text class="content">{{ payInfo.pay_body }}</text>
@@ -31,11 +30,11 @@
</template>
<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 {
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 },
data() {
return {

View File

@@ -1,21 +1,22 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<scroll-view scroll-y="true" class="pay-container">
<view class="payment-amount">
<text class="amount-tit">{{ $lang('paymentAmount') }}</text>
<view class="amount-num">
{{ $lang('common.currencySymbol') }}
<text>{{ payInfo.pay_money }}</text>
<view :style="themeColor">
<scroll-view scroll-y="true" class="pay-container">
<view class="payment-amount">
<text class="amount-tit">{{ $lang('paymentAmount') }}</text>
<view class="amount-num">
{{ $lang('common.currencySymbol') }}
<text>{{ payInfo.pay_money }}</text>
</view>
<view class="payment-name">{{ payInfo.pay_body }}</view>
</view>
<view class="payment-name">{{ payInfo.pay_body }}</view>
</view>
<loading-cover ref="loadingCover"></loading-cover>
</scroll-view>
<loading-cover ref="loadingCover"></loading-cover>
</scroll-view>
</view>
</template>
<script>
<script>
export default {
components: {},
data() {
@@ -71,38 +72,45 @@ export default {
width: 100vw;
height: 100vh;
}
@mixin flex-column {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
@mixin flex-row {
display: flex;
align-items: center;
justify-content: space-between;
}
.payment-amount {
@include flex-column;
margin: $margin-updown $margin-both;
border-radius: 8rpx;
padding: 20rpx 0 58rpx 0;
background-color: #fff;
.amount-tit {
font-size: $font-size-base;
color: #838383;
line-height: 1;
margin-top: 44rpx;
}
.amount-num {
color: #000;
margin-top: 36rpx;
line-height: 1;
text {
font-size: $font-size-toolbar;
color: #000;
}
}
.amount-desc {
font-size: $font-size-tag;
color: #838383;
@@ -111,6 +119,7 @@ export default {
box-sizing: border-box;
text-align: center;
line-height: 1;
text {
width: 100%;
display: block;
@@ -119,6 +128,7 @@ export default {
white-space: nowrap;
}
}
.payment-name {
width: 90%;
overflow: hidden;

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view class="container" :style="themeColor">
<template v-if="payInfo.pay_status != undefined">
<view class="result-box">
<template v-if="payInfo.pay_status">

View File

@@ -1,94 +1,93 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="launch-mask" v-if="show == true">
<view class="mask-img">
<image :src="$util.img('public/uniapp/pay/invite_friends_share.png')" mode="aspectFit"></image>
</view>
<view class="mask-word">点击右上角跳转到浏览器打开</view>
</view>
</template>
<script>
export default {
name: 'wx_pay',
data() {
return {
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){
this.show = false;
location.href = this.wx_alipay;
}
this.checkPayStatus();
},
methods: {
getPayInfo(out_trade_no) {
this.$api.sendRequest({
url: '/api/pay/info',
data: {
out_trade_no
},
success: res => {
if (res.code >= 0 && res.data) {
this.checkPayStatus();
}
}
});
},
checkPayStatus() {
var that = this;
var timer = setInterval(() => {
that.$api.sendRequest({
url: '/api/pay/status',
data: { out_trade_no: that.out_trade_no },
success: res => {
if (res.code == 0) {
if (res.data.pay_status == 2) {
clearInterval(timer);
that.$util.redirectTo('/pages_tool/pay/result', { code: that.out_trade_no }, '', 'redirectTo');
}
} else {
clearInterval(timer);
}
}
});
}, 1000);
},
},
};
</script>
<style lang="scss">
.launch-mask{
position:fixed;
top:0px;
left: 0px;
width:100%;
height: 100%;
background:rgba(0,0,0,0.8);
.mask-img{
text-align: right;
margin:10% 10px 10px 30px;
image{
width: 50px;
height:117px;
margin-right:9%
}
}
.mask-word{
color: #fff;
text-align: center;
font-weight: bold;
font-size: 18px;
text{
color:#FF0036 !important
}
}
}
</style>
<template>
<view class="launch-mask" v-if="show == true" :style="themeColor">
<view class="mask-img">
<image :src="$util.img('public/uniapp/pay/invite_friends_share.png')" mode="aspectFit"></image>
</view>
<view class="mask-word">点击右上角跳转到浏览器打开</view>
</view>
</template>
<script>
export default {
name: 'wx_pay',
data() {
return {
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){
this.show = false;
location.href = this.wx_alipay;
}
this.checkPayStatus();
},
methods: {
getPayInfo(out_trade_no) {
this.$api.sendRequest({
url: '/api/pay/info',
data: {
out_trade_no
},
success: res => {
if (res.code >= 0 && res.data) {
this.checkPayStatus();
}
}
});
},
checkPayStatus() {
var that = this;
var timer = setInterval(() => {
that.$api.sendRequest({
url: '/api/pay/status',
data: { out_trade_no: that.out_trade_no },
success: res => {
if (res.code == 0) {
if (res.data.pay_status == 2) {
clearInterval(timer);
that.$util.redirectTo('/pages_tool/pay/result', { code: that.out_trade_no }, '', 'redirectTo');
}
} else {
clearInterval(timer);
}
}
});
}, 1000);
},
},
};
</script>
<style lang="scss">
.launch-mask{
position:fixed;
top:0px;
left: 0px;
width:100%;
height: 100%;
background:rgba(0,0,0,0.8);
.mask-img{
text-align: right;
margin:10% 10px 10px 30px;
image{
width: 50px;
height:117px;
margin-right:9%
}
}
.mask-word{
color: #fff;
text-align: center;
font-weight: bold;
font-size: 18px;
text{
color:#FF0036 !important
}
}
}
</style>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="page">
<view class="page" :style="themeColor">
<view>
<!-- <view class="recharge-title">充值</view>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="order-container">
<view class="order-container" :style="themeColor">
<mescroll-uni ref="mescroll" @getData="getListData">
<block slot="list">
<block v-if="orderList.length > 0">
@@ -45,6 +44,7 @@ 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,

View File

@@ -1,99 +1,98 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view class="closeBox">
<image :src="$util.img('public/uniapp/store/storeclose.png')" mode="widthFix"></image>
<text class="close-title">{{ textVal }}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isIphoneX: false
};
},
onShow() {
this.isIphoneX = this.$util.uniappIsIPhoneX();
this.getSiteStatus();
// #ifdef MP-WEIXIN
wx.hideHomeButton();
// #endif
},
methods:{
getSiteStatus(){
this.$api.sendRequest({
url: '/api/site/status',
data: {},
success: res => {
if (res.code == 0) {
this.$util.redirectTo('/pages/index/index');
}
}
});
}
},
computed: {
textVal() {
return '该店铺已打烊...';
},
pageVal() {
if (this.$store.state.siteState == -2) {
return '店铺不存在';
} else if (this.$store.state.siteState == -3) {
return '店铺打烊';
}
}
},
onBackPress() {
return true;
}
};
</script>
<style lang="scss">
.head-nav {
width: 100%;
height: var(--status-bar-height);
}
.head-nav.active {
padding-top: 40rpx;
}
.head-return {
padding-left: 30rpx;
padding-right: 30rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
font-weight: 600;
font-size: $font-size-toolbar;
text {
display: inline-block;
margin-right: 10rpx;
}
}
.closeBox {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 330rpx;
}
image {
width: 240rpx;
}
.close-title {
font-size: $font-size-toolbar;
color: $color-tip;
margin-top: 55rpx;
letter-spacing: 4rpx;
}
</style>
<template>
<view :style="themeColor">
<view class="closeBox">
<image :src="$util.img('public/uniapp/store/storeclose.png')" mode="widthFix"></image>
<text class="close-title">{{ textVal }}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isIphoneX: false
};
},
onShow() {
this.isIphoneX = this.$util.uniappIsIPhoneX();
this.getSiteStatus();
// #ifdef MP-WEIXIN
wx.hideHomeButton();
// #endif
},
methods:{
getSiteStatus(){
this.$api.sendRequest({
url: '/api/site/status',
data: {},
success: res => {
if (res.code == 0) {
this.$util.redirectTo('/pages/index/index');
}
}
});
}
},
computed: {
textVal() {
return '该店铺已打烊...';
},
pageVal() {
if (this.$store.state.siteState == -2) {
return '店铺不存在';
} else if (this.$store.state.siteState == -3) {
return '店铺打烊';
}
}
},
onBackPress() {
return true;
}
};
</script>
<style lang="scss">
.head-nav {
width: 100%;
height: var(--status-bar-height);
}
.head-nav.active {
padding-top: 40rpx;
}
.head-return {
padding-left: 30rpx;
padding-right: 30rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
font-weight: 600;
font-size: $font-size-toolbar;
text {
display: inline-block;
margin-right: 10rpx;
}
}
.closeBox {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 330rpx;
}
image {
width: 240rpx;
}
.close-title {
font-size: $font-size-toolbar;
color: $color-tip;
margin-top: 55rpx;
letter-spacing: 4rpx;
}
</style>

View File

@@ -1,52 +1,51 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view class="iconfont iconshang navigate-back" @click="navigateBack"></view>
<web-view :src="src"></web-view>
</view>
<!-- <diy-bottom-nav></diy-bottom-nav> -->
</template>
<script>
export default {
data() {
return {
src: ''
};
},
onLoad(option) {
// this.src = decodeURIComponent(option.src);
this.$api.sendRequest({
url: '/api/config/defaultvr',
success: res => {
console.log(res)
if (res.code == 0) {
uni.setNavigationBarTitle({
title:res.data.title
})
this.src = res.data.url
}
},
fail: res => {
}
});
},
methods: {
navigateBack() {
uni.navigateBack({
delta: 1
});
}
}
};
</script>
<style lang="scss">
.navigate-back {
position: absolute;
top: 34rpx;
left: 34rpx;
z-index: 5;
font-size: $font-size-toolbar;
}
</style>
<template>
<view :style="themeColor">
<view class="iconfont iconshang navigate-back" @click="navigateBack"></view>
<web-view :src="src"></web-view>
</view>
<!-- <diy-bottom-nav></diy-bottom-nav> -->
</template>
<script>
export default {
data() {
return {
src: ''
};
},
onLoad(option) {
// this.src = decodeURIComponent(option.src);
this.$api.sendRequest({
url: '/api/config/defaultvr',
success: res => {
console.log(res)
if (res.code == 0) {
uni.setNavigationBarTitle({
title:res.data.title
})
this.src = res.data.url
}
},
fail: res => {
}
});
},
methods: {
navigateBack() {
uni.navigateBack({
delta: 1
});
}
}
};
</script>
<style lang="scss">
.navigate-back {
position: absolute;
top: 34rpx;
left: 34rpx;
z-index: 5;
font-size: $font-size-toolbar;
}
</style>

View File

@@ -1,6 +1,5 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view :style="themeColor">
<view class="iconfont iconshang navigate-back" @click="navigateBack"></view>
<web-view :src="src"></web-view>