Replace all inline hardcoded Chinese strings in multiple Vue pages with corresponding language package keys, to unify text management and support multi-language switching.
279 lines
10 KiB
Vue
279 lines
10 KiB
Vue
<template>
|
||
<view :style="themeColor">
|
||
<view v-if="info" style="background-color: #fff;">
|
||
|
||
<view class="invite_adv">
|
||
<image :src="$util.img('public/uniapp/member/invite/top_bg.png')" mode="widthFix"></image>
|
||
|
||
<view class="desc" @click="openRulePopup" v-if="info.remark != ''">
|
||
<text class="iconfont icon-bangzhu"></text>
|
||
{{ $lang('invite.activityRule') }}
|
||
</view>
|
||
<image class="font" :src="$util.img('public/uniapp/member/invite/top_font.png')" mode="widthFix" show-menu-by-longpress />
|
||
<view class="time">
|
||
{{ $lang('invite.activityTime') }}:{{ $util.timeStampTurnTime(info.start_time, 1) }}{{ $lang('invite.to') }}{{ $util.timeStampTurnTime(info.end_time, 1) }}
|
||
</view>
|
||
|
||
<view class="btn" :style="{ 'background-image': 'url(' + $util.img('public/uniapp/member/invite/top_btn.png') + ')' }" @click="openSharePopup">{{ $lang('invite.inviteNow') }}</view>
|
||
</view>
|
||
<view class="content invite-list">
|
||
<view class="title">{{ $lang('invite.myFriends') }}</view>
|
||
<block v-if="inviteList.length > 0">
|
||
<view class="invitelist_block">
|
||
<view class="invitelist">
|
||
<view class="list-item" v-for="(item, index) in inviteList" :key="index">
|
||
<view class="img color-base-border">
|
||
<image mode="aspectFit" :src="item.headimg == '' ? $util.img($util.getDefaultImage().head) : $util.img(item.headimg)" show-menu-by-longpress />
|
||
</view>
|
||
<view class="list-left">
|
||
<view class="info">
|
||
<view class="name font-size-tag">{{ item.source_member_nickname }}</view>
|
||
<view class="time font-size-activity-tag color-tip">
|
||
{{ $util.timeStampTurnTime(item.create_time) }}
|
||
</view>
|
||
</view>
|
||
<view class="prize color-base-text font-size-activity-tag">
|
||
<block v-if="item.balance > 0">{{ item.balance }}{{ $lang('invite.cashRedPacket') }}</block>
|
||
<block v-if="(item.point > 0 || item.coupon_num) && item.balance > 0">+</block>
|
||
<block v-if="item.point > 0">{{ parseInt(item.point) }}{{ $lang('invite.point') }}</block>
|
||
<block v-if="item.point > 0 && item.balance > 0 && item.coupon_num > 0">+
|
||
</block>
|
||
<block v-if="item.coupon_num > 0">{{ item.coupon_num }}{{ $lang('invite.couponCount') }}</block>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="more_invite color-tip font-size-tag " @click="moreList" v-if="isClick && total_num > page">
|
||
{{ $lang('invite.viewMore') }}
|
||
<text class="iconfont icon-iconangledown"></text>
|
||
</view>
|
||
<view class="more_invite color-tip font-size-tag " @click="moreList" v-if="!isClick && inviteList.length > 5 && total_num <= page">{{ $lang('invite.noMoreData') }}</view>
|
||
</view>
|
||
</block>
|
||
<block v-else>
|
||
<view class="empty">
|
||
<view class="tip">{{ $lang('invite.noInviteTip') }}</view>
|
||
<view class="tip">{{ $lang('invite.noInviteSub') }}</view>
|
||
</view>
|
||
</block>
|
||
</view>
|
||
<view class="content">
|
||
<view class="title">{{ $lang('invite.inviteReward') }}</view>
|
||
<view class="invite_active">
|
||
<view class="list">
|
||
<view class="item" v-if="$util.inArray('balance', info.type) != -1">
|
||
<image :src="$util.img('public/uniapp/member/invite/coupon_bg.png')" mode="aspectFill"/>
|
||
<view class="desc">
|
||
<view class="price">
|
||
<text class="font-size-base">{{ $lang('common.currencySymbol') }}</text>
|
||
<text>{{ info.balance }}</text>
|
||
</view>
|
||
<view class="type">{{ $lang('invite.cashRedPacket') }}</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="item" v-if="$util.inArray('point', info.type) != -1">
|
||
<image :src="$util.img('public/uniapp/member/invite/coupon_bg.png')" mode="aspectFill"/>
|
||
<view class="desc">
|
||
<view class="price">
|
||
<text>{{ parseInt(info.point) }}</text>
|
||
</view>
|
||
<view class="type">{{ $lang('invite.point') }}</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="item margin_right_none" v-if="$util.inArray('coupon', info.type) != -1">
|
||
<image :src="$util.img('public/uniapp/member/invite/coupon_bg.png')" mode="aspectFill">
|
||
</image>
|
||
<view class="desc">
|
||
<view class="price">
|
||
<text>{{ info.coupon.split(',').length }}</text>
|
||
{{ $lang('invite.couponUnit') }}
|
||
</view>
|
||
<view class="type">{{ $lang('invite.coupon') }}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="desc">
|
||
<view class="title_desc color-tip">{{ $lang('invite.shareDesc') }}</view>
|
||
<view class="desc_list">
|
||
<view class="" v-if="$util.inArray('balance', info.type) != -1">
|
||
<text>●</text>
|
||
{{ $lang('invite.getBalanceReward', { amount: info.balance }) }}
|
||
</view>
|
||
<view class="" v-if="$util.inArray('point', info.type) != -1">
|
||
<text>●</text>
|
||
{{ $lang('invite.getPointReward', { point: info.point }) }}
|
||
</view>
|
||
<view class="" v-if="$util.inArray('coupon', info.type) != -1">
|
||
<text>●</text>
|
||
{{ $lang('invite.getCouponReward', { count: info.coupon.split(',').length }) }}
|
||
</view>
|
||
|
||
<view class="" v-if="info.max_fetch == 0">
|
||
<text>●</text>
|
||
{{ $lang('invite.noLimit') }}
|
||
</view>
|
||
<view class="" v-else>
|
||
<text>●</text>
|
||
{{ $lang('invite.limitDesc', { max: info.max_fetch }) }}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="content">
|
||
<view class="title">{{ $lang('invite.howToInvite') }}</view>
|
||
<view class="invite_active">
|
||
<view class="step">
|
||
<view>
|
||
<view class="img">
|
||
<image :src="$util.img('public/uniapp/member/invite/fenxiang.png')" mode="aspectFit" show-menu-by-longpress />
|
||
</view>
|
||
<view class="text">{{ $lang('invite.shareLink') }}</view>
|
||
</view>
|
||
<view>
|
||
<image :src="$util.img('public/uniapp/member/invite/jiantou.png')" class="jiantou" show-menu-by-longpress ></image>
|
||
</view>
|
||
<view>
|
||
<view class="img">
|
||
<image :src="$util.img('public/uniapp/member/invite/shouji.png')" mode="aspectFit" show-menu-by-longpress />
|
||
</view>
|
||
<view class="text">{{ $lang('invite.friendEnter') }}</view>
|
||
</view>
|
||
<view>
|
||
<image :src="$util.img('public/uniapp/member/invite/jiantou.png')" class="jiantou" show-menu-by-longpress ></image>
|
||
</view>
|
||
<view>
|
||
<view class="img">
|
||
<image :src="$util.img('public/uniapp/member/invite/hongbao.png')" mode="aspectFit" show-menu-by-longpress />
|
||
</view>
|
||
<view class="text">{{ $lang('invite.friendRegister') }}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 海报 -->
|
||
<view @touchmove.prevent.stop>
|
||
<uni-popup ref="posterPopup" type="bottom" class="poster-layer">
|
||
<template v-if="poster != '-1'">
|
||
<view>
|
||
<view class="image-wrap">
|
||
<image :src="$util.img(poster)" mode="widthFix" show-menu-by-longpress />
|
||
</view>
|
||
<!-- #ifdef MP || APP-PLUS -->
|
||
<view class="save" @click="savePoster()">{{ $lang('invite.savePoster') }}</view>
|
||
<!-- #endif -->
|
||
<!-- #ifdef H5 -->
|
||
<view class="save">{{ $lang('invite.longPressSave') }}</view>
|
||
<!-- #endif -->
|
||
</view>
|
||
<view class="close iconfont icon-close" @click="closePosterPopup()"></view>
|
||
</template>
|
||
<view v-else class="msg">{{ posterMsg }}</view>
|
||
</uni-popup>
|
||
</view>
|
||
|
||
<!-- 分享弹窗 -->
|
||
<view @touchmove.prevent.stop>
|
||
<uni-popup ref="sharePopup" type="bottom" class="share-popup">
|
||
<view>
|
||
<view class="share-title">{{ $lang('invite.share') }}</view>
|
||
<view class="share-content">
|
||
<!-- #ifdef MP -->
|
||
<view class="share-box">
|
||
<button class="share-btn" :plain="true" open-type="share">
|
||
<view class="iconfont icon-share-friend"></view>
|
||
<text>{{ $lang('invite.shareToFriend') }}</text>
|
||
</button>
|
||
</view>
|
||
<!-- #endif -->
|
||
<view class="share-box" @click="openPosterPopup">
|
||
<button class="share-btn" :plain="true">
|
||
<view class="iconfont icon-pengyouquan"></view>
|
||
<text>{{ $lang('invite.generatePoster') }}</text>
|
||
</button>
|
||
</view>
|
||
<!-- #ifdef H5 -->
|
||
<view class="share-box" @click="copyUrl">
|
||
<button class="share-btn" :plain="true">
|
||
<view class="iconfont icon-fuzhilianjie"></view>
|
||
<text>{{ $lang('invite.copyLink') }}</text>
|
||
</button>
|
||
</view>
|
||
<!-- #endif -->
|
||
</view>
|
||
<view class="share-footer" @click="closeSharePopup"><text>{{ $lang('invite.cancelShare') }}</text></view>
|
||
</view>
|
||
</uni-popup>
|
||
</view>
|
||
|
||
<!-- 弹出规则 -->
|
||
<view @touchmove.prevent.stop>
|
||
<uni-popup ref="rulePopup" type="bottom">
|
||
<view class="tips-layer">
|
||
<view class="head" @click="closeRulePopup()">
|
||
<view class="title">{{ $lang('invite.activityRule') }}</view>
|
||
<text class="iconfont icon-close"></text>
|
||
</view>
|
||
<view class="body">
|
||
<view class="detail margin-bottom">{{ info.remark }}</view>
|
||
</view>
|
||
</view>
|
||
</uni-popup>
|
||
</view>
|
||
</view>
|
||
<ns-empty v-else :text="$lang('invite.noData')"></ns-empty>
|
||
<ns-login ref="login"></ns-login>
|
||
<loading-cover ref="loadingCover"></loading-cover>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import inviteFriends from './public/js/invite_friends.js';
|
||
export default {
|
||
data() {
|
||
return {
|
||
inviteList: [],
|
||
info: null,
|
||
page: 1,
|
||
page_size: 5,
|
||
total_num: 0,
|
||
isClick: true,
|
||
poster: '-1', //海报
|
||
posterMsg: '' //海报错误信息
|
||
};
|
||
},
|
||
onLoad(option) {
|
||
this.getBaseInfo();
|
||
if (this.storeToken) {
|
||
this.getList();
|
||
} else {
|
||
this.$nextTick(() => {
|
||
this.$refs.login.open('/pages_tool/member/invite_friends');
|
||
});
|
||
}
|
||
},
|
||
onShow() {},
|
||
mixins: [inviteFriends],
|
||
onReady() {}
|
||
};
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
@import './public/css/invite_friends.scss';
|
||
</style>
|
||
|
||
<style lang="scss" scoped>
|
||
::v-deep .uni-popup__wrapper.bottom {
|
||
border-radius: 24rpx 24rpx 0 0;
|
||
}
|
||
</style>
|
||
|
||
<style scoped>
|
||
.poster-layer>>>.uni-popup__wrapper-box {
|
||
max-height: initial !important;
|
||
}
|
||
</style>
|