Browse Source

feat: 实现多语言国际化支持

refactor: 重构代码以支持i18n国际化
feat(locale): 添加多语言配置文件
feat(components): 国际化组件文本
feat(pages): 国际化页面文本
feat(store): 更新用户信息获取逻辑
docs: 添加国际化配置文档
master
前端-胡立永 2 days ago
parent
commit
b65b9a995c
44 changed files with 1926 additions and 1110 deletions
  1. +60
    -0
      .cursor/rules/index.mdc
  2. +3
    -0
      api/api.js
  3. +4
    -1
      api/http.js
  4. +5
    -5
      components/active/active-item.vue
  5. +34
    -30
      components/base/tabbar.vue
  6. +32
    -10
      components/cart/CardList.vue
  7. +1
    -1
      components/cart/signInQrcodePopup.vue
  8. +5
    -5
      components/travel/travelList.vue
  9. +0
    -130
      components/userShop/userShopCommission.vue
  10. +7
    -7
      components/zhaomu/zhaomu-item.vue
  11. +4
    -4
      components/zhaomu/zlx-item.vue
  12. +3
    -0
      config.js
  13. +389
    -0
      locale/en.json
  14. +76
    -0
      locale/index.js
  15. +65
    -0
      locale/objectLangMap.js
  16. +389
    -0
      locale/zh-Hans.json
  17. +2
    -0
      main.js
  18. +1
    -8
      pages.json
  19. +6
    -6
      pages/index/cart.vue
  20. +36
    -27
      pages/index/center.vue
  21. +36
    -21
      pages/index/index.vue
  22. +0
    -131
      pages/index/order.vue
  23. +1
    -1
      pages_login/fuwutiaokuan.vue
  24. +5
    -5
      pages_login/wxLogin.vue
  25. +15
    -15
      pages_login/wxUserInfo.vue
  26. +4
    -4
      pages_login/yinsixieyi.vue
  27. +8
    -8
      pages_my/activeList.vue
  28. +209
    -205
      pages_my/collection.vue
  29. +1
    -1
      pages_my/guanyuwomen.vue
  30. +19
    -16
      pages_my/qiandao-list.vue
  31. +6
    -6
      pages_my/travelList.vue
  32. +22
    -22
      pages_my/user-info.vue
  33. +45
    -35
      pages_my/user-msg.vue
  34. +3
    -3
      pages_my/zlx-qiandao.vue
  35. +1
    -1
      pages_my/zlx-xieyi.vue
  36. +28
    -26
      pages_order/huodong-detail.vue
  37. +14
    -14
      pages_order/invoiceIssuance.vue
  38. +9
    -8
      pages_order/invoiceRecords.vue
  39. +22
    -22
      pages_order/lvyou-detail.vue
  40. +52
    -24
      pages_order/orderDetails.vue
  41. +11
    -11
      pages_order/orderEvaluation.vue
  42. +246
    -250
      pages_order/payOrder.vue
  43. +29
    -30
      pages_zlx/zlx-form.vue
  44. +18
    -17
      store/store.js

+ 60
- 0
.cursor/rules/index.mdc View File

@ -0,0 +1,60 @@
---
description:
globs:
alwaysApply: true
---
## 当前项目是uniapp开发微信小程序
在你修改locale下的json文件需要根据文件路径进行国际化配置
例如:
文件路径
/components/active/active-item
/pages/index/index
/pages/index/center
/pages_login/wxLogin
en.json
{
"components" : {
"active" : {
"active_item" : {
...
}
}
},
"pages" : {
"index" : {
...
},
"center" : {
...
},
},
"pages_login" : {
"wxLogin" : {
...
},
},
}
并且在国际化替换内容的位置需要留有中文版的注释内容
国际化对象需要在objectLangMap.json中配置,将后端对象多个不同语言的字段进行关联,而不是国际化成中文
例如:
{
//国际化活动
"active" : {
"title" : {
"zh-Hans" : "title",
"en" : "enTitle",
},
...
}
}
使用方式
<view>$ot(item, 'active', 'title')</view>

+ 3
- 0
api/api.js View File

@ -48,6 +48,9 @@ export function api(key, data, callback, loadingTitle) {
if (req.auth) {
if (!uni.getStorageSync('token')) {
utils.toLogin()
store.state.userInfo = {}
store.state.token = ""
uni.removeStorageSync('token')
console.error('需要登录')
return Promise.reject('必须登录')
}


+ 4
- 1
api/http.js View File

@ -35,7 +35,10 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
if(res.statusCode == 401 ||
res.data.message == '操作失败,token非法无效!' ||
res.data.message == '操作失败,用户不存在!'){
store.commit('logout')
// store.commit('logout')
store.state.userInfo = {}
store.state.token = ""
uni.removeStorageSync('token')
console.error('登录过期');
utils.toLogin()
}


+ 5
- 5
components/active/active-item.vue View File

@ -5,18 +5,18 @@
v-for="(item, index) in cardListData" :key="index">
<view class="content" :class="['U','S'].includes(item.state) ? 'content_border' : ''">
<view class="left">
<image :src="item.image && item.image.split(',')[0]" mode="aspectFill">
<image :src="item.image && item.image.split(',')[0]" mode="aspectFill"/>
</view>
<view class="right">
<view class="detailed">
<view class="title">{{item.title}}</view>
<view class="title">{{$ot(item, 'active', 'title')}}</view>
<view class="date">{{ $dayjs(item.startTime).format('YYYY-MM-DD') }}</view>
<view class="address">{{item.address}}</view>
<view class="address">{{$ot(item, 'active', 'address')}}</view>
</view>
<view class="price">
<view class="num-box">{{item.num || 0}}/{{item.sum || 0}}</view>
<view class="btn-box" v-if="item.state == 0">立即报名</view>
<view class="btn-box btn-box2" v-if="item.state == 1">已结束</view>
<view class="btn-box" v-if="item.state == 0">{{$t('components.active.activeItem.signUp')}}</view>
<view class="btn-box btn-box2" v-if="item.state == 1">{{$t('components.active.activeItem.ended')}}</view>
</view>
</view>
</view>


+ 34
- 30
components/base/tabbar.vue View File

@ -30,38 +30,42 @@
},
data() {
return {
list : [
{
"selectedIconPath": "/static/image/tabbar/home-a.png",
"iconPath": "/static/image/tabbar/home.png",
"pagePath": "/pages/index/index",
"title": "首页",
key : 'home',
},
{
"selectedIconPath": "/static/image/tabbar/zhaomu-a.png",
"iconPath": "/static/image/tabbar/zhaomu.png",
"pagePath": "/pages/index/member",
"title": "招募",
key : 'member',
},
{
"selectedIconPath": "/static/image/tabbar/order-a.png",
"iconPath": "/static/image/tabbar/order.png",
"pagePath": "/pages/index/cart",
"title": "订单",
key : 'cart',
},
{
"selectedIconPath": "/static/image/tabbar/center-a.png",
"iconPath": "/static/image/tabbar/center.png",
"pagePath": "/pages/index/center",
"title": "我的",
key : 'center',
}
]
list : []
};
},
mounted() {
// tabbar
this.list = [
{
"selectedIconPath": "/static/image/tabbar/home-a.png",
"iconPath": "/static/image/tabbar/home.png",
"pagePath": "/pages/index/index",
"title": this.$t('components.base.tabbar.home'), //
key : 'home',
},
{
"selectedIconPath": "/static/image/tabbar/zhaomu-a.png",
"iconPath": "/static/image/tabbar/zhaomu.png",
"pagePath": "/pages/index/member",
"title": this.$t('components.base.tabbar.member'), //
key : 'member',
},
{
"selectedIconPath": "/static/image/tabbar/order-a.png",
"iconPath": "/static/image/tabbar/order.png",
"pagePath": "/pages/index/cart",
"title": this.$t('components.base.tabbar.cart'), //
key : 'cart',
},
{
"selectedIconPath": "/static/image/tabbar/center-a.png",
"iconPath": "/static/image/tabbar/center.png",
"pagePath": "/pages/index/center",
"title": this.$t('components.base.tabbar.center'), //
key : 'center',
}
]
},
methods : {
toPath(item, index){
if(item.key == this.select){


+ 32
- 10
components/cart/CardList.vue View File

@ -2,21 +2,23 @@
<view class="cardList">
<view class="container" @click="toOrderDetails(item)" v-for="(item, index) in cardListData" :key="index">
<view class="head">
<text class="orderTime">下单时间{{item.createTime}}</text>
<text class="orderTime">{{$t('components.cart.cardList.orderTime')}}{{item.createTime}}</text>
<text class="orderStatus active">{{ stateText[item.state] }}</text>
<!-- <text class="orderStatus" :class="item.state === 'U' ? 'active' : ''">{{item.stateText}}</text> -->
</view>
<view class="content cardStyle_" :class="['U','S'].includes(item.state) ? 'content_border' : ''">
<view class="left">
<image :src="getImage(item)" mode="aspectFill">
<image :src="getImage(item)" mode="aspectFill"/>
</view>
<view class="right">
<view class="detailed">
<view class="title">{{item.title}}</view>
<view class="title">{{ getTitle(item) }}</view>
<!-- <view class="title">{{ item.title }}</view> -->
<view class="date">{{item.startTime}}</view>
<view class="address">{{item.address}}</view>
<view class="address">{{ getAddress(item) }}</view>
<!-- <view class="address">{{item.address}}</view> -->
</view>
<view class="price"><text>总计</text>¥{{item.payPrice}}</view>
<view class="price"><text>{{$t('components.cart.cardList.total')}}</text>¥{{item.payPrice}}</view>
</view>
</view>
<view class="button-sp-area">
@ -25,18 +27,18 @@
class="mini-btn" size="mini">立即支付</button> -->
<button @click.stop="skip(item,0)" v-if="item.state == 1" :style="{background: '#34312E;', color: '#AFAFAF',margin:'0 30rpx 0 0'}"
class="mini-btn" size="mini">取消活动</button>
class="mini-btn" size="mini">{{$t('components.cart.cardList.cancelActivity')}}</button>
<button @click.stop="skip(item,1)"
v-if="item.state == 1"
:style="{background: '#492623;', color: '#FF3E3F',margin:'0 30rpx 0 0'}"
class="mini-btn" size="mini">活动签到</button>
class="mini-btn" size="mini">{{$t('components.cart.cardList.signIn')}}</button>
<button @click.stop="skip(item,2)" v-if="item.state == 2 && item.isPj == 'N'" :style="{background: '#492623;', color: '#FF3E3F',margin:'0 30rpx 0 0'}"
class="mini-btn" size="mini">评价活动</button>
class="mini-btn" size="mini">{{$t('components.cart.cardList.evaluate')}}</button>
<button @click.stop="skip(item,3)" v-if="item.state == 2" :style="{background: '#49361D;', color: '#FFB245',margin:'0 30rpx 0 0'}"
class="mini-btn" size="mini">开具发票</button>
class="mini-btn" size="mini">{{$t('components.cart.cardList.invoice')}}</button>
</view>
</view>
</view>
@ -52,7 +54,7 @@
},
data() {
return {
stateText : ['', '待参加', '已完成', '已取消'],
stateText : ['', this.$t('components.cart.cardList.states.pending'), this.$t('components.cart.cardList.states.completed'), this.$t('components.cart.cardList.states.cancelled')],
};
},
components: {
@ -76,6 +78,26 @@
getImage(item){
return item.image && item.image.split(',')[0]
},
getTitle(item) {
// 使
if (item.type == 0) {
//
return this.$ot(item.activity, 'active', 'title')
} else {
//
return this.$ot(item.travel, 'travel', 'title')
}
},
getAddress(item) {
// 使
if (item.type == 0) {
//
return this.$ot(item.activity, 'active', 'address')
} else {
//
return this.$ot(item.travel, 'travel', 'address')
}
},
}
};
</script>


+ 1
- 1
components/cart/signInQrcodePopup.vue View File

@ -30,7 +30,7 @@
<view class="lingdui-msg">
<view class="lingdui-msg-name">
<view>{{adminUserInfo.nickName}}</view>
<view class="name-tip">主理人</view>
<view class="name-tip">{{$t('components.cart.signInQrcodePopup.organizer')}}</view>
</view>
<view>
<uv-rate


+ 5
- 5
components/travel/travelList.vue View File

@ -4,19 +4,19 @@
v-for="(item, index) in cardListData"
:key="index" @click="toDetail(item)">
<view class="left">
<image :src="item.image && item.image.split(',')[0]" mode="aspectFill">
<image :src="item.image && item.image.split(',')[0]" mode="aspectFill"></image>
</view>
<view class="right">
<view class="detailed">
<view class="title">{{item.title}}</view>
<view class="title">{{$ot(item, 'travel', 'title')}}</view>
<view class="date">{{ $dayjs(item.startTime).format('YYYY-MM-DD') }}</view>
<view class="address">{{item.address}}</view>
<view class="address">{{$ot(item, 'travel', 'address')}}</view>
</view>
<view class="data">
<text>¥{{item.price}}</text>
<text>{{item.num || 0}}/{{item.sum || 0}}</text>
<text class="btn" v-if="item.state == 0">报名中</text>
<text class="btn-2" v-if="item.state == 1">已结束</text>
<text class="btn" v-if="item.state == 0">{{$t('components.travel.travelList.enrolling')}}</text>
<text class="btn-2" v-if="item.state == 1">{{$t('components.travel.travelList.ended')}}</text>
</view>
</view>
</view>


+ 0
- 130
components/userShop/userShopCommission.vue View File

@ -1,130 +0,0 @@
<template>
<view class="commission">
<image src="/static/image/center/10.png" mode=""></image>
<view class="price">
<view class="title">
总佣金
</view>
<view class="num">
7890.34
</view>
</view>
<view class="font-menu"
v-if="purse">
<view @click="toRunningWater(index)"
v-for="(item, index) in list"
:key="index">{{ item.name }}</view>
</view>
<view class="btn"
v-if="!purse"
@click="toPurse">
提现
</view>
</view>
</template>
<script>
export default {
name: "userShopCommission",
props : {
purse : {
default : false,
},
},
data() {
return {
list : [
{
name : '余额记录',
},
{
name : '提现记录',
},
{
name : '佣金记录',
},
],
};
},
methods : {
//
toPurse(){
uni.navigateTo({
url:'/pages_order/mine/purse'
})
},
//
toRunningWater(index){
uni.navigateTo({
url:'/pages_order/mine/runningWater?status=' + index
})
},
}
}
</script>
<style scoped lang="scss">
.commission {
width: 700rpx;
height: 300rpx;
position: relative;
margin: 20rpx auto;
color: #fff;
image {
width: 700rpx;
height: 300rpx;
position: absolute;
border-radius: 20rpx;
}
.price {
position: absolute;
left: 50rpx;
top: 80rpx;
font-weight: 900;
.title {
font-size: 32rpx;
}
.num {
font-size: 44rpx;
margin-top: 20rpx;
}
}
.font-menu {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 500;
text-align: center;
color: #ffffff;
line-height: 24rpx;
width: 710rpx;
position: absolute;
left: 0;
bottom: 25rpx;
display: flex;
view{
width: 160rpx;
}
}
.btn {
position: absolute;
right: 50rpx;
bottom: 50rpx;
background-color: #FDC440;
width: 160rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 30rpx;
}
}
</style>

+ 7
- 7
components/zhaomu/zhaomu-item.vue View File

@ -7,13 +7,13 @@
</view>
<view class="right">
<view class="detailed">
<view class="title">{{item.title}}</view>
<view class="title">{{$ot(item, 'active', 'title')}}</view>
<view class="date">{{item.startTime}}</view>
<view class="address">
<view class="img-box">
<image src="@/static/image/cart/addressIcon.png" mode=""></image>
</view>
<view>{{item.address}}</view>
<view>{{$ot(item, 'active', 'address')}}</view>
</view>
</view>
<view class="tips-box">
@ -30,23 +30,23 @@
<view class="bottom-box-r"
v-if="!item.openState"
@click="toZhaomu(item)">
参与招募
{{$t('components.zhaomu.zhaomuItem.joinRecruit')}}
</view>
<view class="bottom-box-r"
v-else-if="item.openState == 3"
@click="toZhaomu(item)">
不通过
{{$t('components.zhaomu.zhaomuItem.rejected')}}
</view>
<view class="bottom-box-r"
v-else
>
{{ ['审核中', '已参加'][item.openState - 1] }}
{{ [$t('components.zhaomu.zhaomuItem.reviewing'), $t('components.zhaomu.zhaomuItem.joined')][item.openState - 1] }}
</view>
</view>
<view class="tabs-box" :class="item == 1? 'bzcx-item' : 'ycx-item'">{{item == 1? '保证成行' : '已成行'}}</view>
<view class="tabs-box" :class="item == 1? 'bzcx-item' : 'ycx-item'">{{item == 1? $t('components.zhaomu.zhaomuItem.guaranteed') : $t('components.zhaomu.zhaomuItem.confirmed')}}</view>
</view>
</view>
</template>
@ -95,7 +95,7 @@
this.$api('shopUserAuth',params,res=>{
this.$emit('getData')
if(res.code == 200) {
this.$Toast('参与成功')
this.$Toast(this.$t('components.zhaomu.zhaomuItem.joinSuccess'))
}
})
}


+ 4
- 4
components/zhaomu/zlx-item.vue View File

@ -2,18 +2,18 @@
<view class="cardList">
<view class="content" >
<view class="left">
<image :src="images[0]" mode="aspectFill">
<image :src="images[0]" mode="aspectFill"></image>
</view>
<view class="right">
<view class="detailed">
<view class="title">{{item.title}}</view>
<view class="title">{{$ot(item, 'active', 'title')}}</view>
<view class="date">{{item.createTime}}</view>
<view class="address">{{item.address}}</view>
<view class="address">{{$ot(item, 'active', 'address')}}</view>
</view>
<view class="price" v-if="showBottom">
<view class="num-box">{{ item.doNum || 0 }}/{{ item.num || 0 }}</view>
<view class="btn-box" @click="qiandaoClick"
>开始签到</view>
>{{$t('components.zhaomu.zlxItem.startSignIn')}}</view>
<!-- <view class="btn-box jieshu-btn" v-else>已结束</view> -->
</view>
</view>


+ 3
- 0
config.js View File

@ -12,6 +12,9 @@ const type = 'prod'
// 环境配置
const config = {
local : {
baseUrl : 'http://127.0.0.1:8001/popularize-admin',
},
dev : {
// baseUrl : 'http://test-lzx.natapp1.cc/popularize-admin',
baseUrl : 'http://h5.xzaiyp.top/popularize-admin',


+ 389
- 0
locale/en.json View File

@ -0,0 +1,389 @@
{
"pages": {
"index": {
"index": {
"uv_search_placeholder": "Search for relevant content",
"nav_title": "Home",
"moments_title": "Joy Moments",
"sign_in_activity": "Sign-in Activity",
"sign_in_desc": "Get rewards by signing in",
"view_now": "View Now",
"activity": "Activity",
"travel": "Travel",
"recent": "Recent",
"past": "Past",
"select_area": "Select Area",
"confirm": "Confirm"
},
"cart": {
"title": "My Orders",
"tabs": {
"all": "All",
"pending": "Pending",
"completed": "Completed",
"cancelled": "Cancelled"
},
"confirmCancel": "Cancel this order?"
},
"center": {
"nav_title": "Profile",
"please_login": "Please click to login",
"my_activities": "My Activities",
"pending": "Pending",
"completed": "Completed",
"cancelled": "Cancelled",
"my_tools": "My Tools",
"invoice_records": "Invoice Records",
"my_favorites": "My Favorites",
"about_us": "About Us",
"user_agreement": "User Agreement",
"privacy_policy": "Privacy Policy",
"organizer_agreement": "Organizer Agreement",
"organizer_checkin": "Organizer Check-in",
"logout": "Logout"
}
}
},
"pages_login": {
"wxLogin": {
"wechatLogin": "WeChat Authorization Login",
"cancelLogin": "Cancel Login",
"agreed": "Agreed to ",
"privacyPolicy": "Privacy Policy",
"userAgreement": "User Agreement",
"pleaseAgree": "Please check the privacy agreement"
},
"wxUserInfo": {
"requestInfo": "Request your avatar and nickname",
"avatar": "Avatar",
"nickname": "Nickname",
"gender": "Gender",
"phone": "Phone",
"enterNickname": "Please enter nickname",
"selectGender": "Please select gender",
"enterPhone": "Please enter phone number",
"getPhone": "Get Phone Number",
"confirm": "Confirm",
"male": "Male",
"female": "Female",
"pleaseSelectAvatar": "Please select avatar",
"pleaseEnterNickname": "Please enter nickname",
"pleaseEnterPhone": "Please enter phone number",
"pleaseSelectGender": "Please select gender"
},
"fuwutiaokuan": {
"title": "User Agreement"
},
"yinsixieyi": {
"defaultTitle": "Privacy Policy",
"travelGuide": "Travel Guide",
"paymentGuide": "Payment Guide",
"organizerAgreement": "Organizer Agreement"
}
},
"pages_my": {
"zlx_xieyi": {
"title": "Organizer Agreement"
},
"zlx_qiandao": {
"title": "Organizer Check-in",
"activity": "Activity",
"travel": "Travel"
},
"user_msg": {
"title": "Edit Profile",
"basic_info": "Basic Information",
"username": "Username",
"email": "Email",
"phone": "Phone",
"gender": "Gender",
"nationality": "Nationality",
"birthday": "Birthday",
"address": "Current Address",
"personal_status": "Personal Status",
"education": "Education",
"degree": "Degree",
"school": "School",
"work": "Work",
"industry": "Industry",
"about_me": "About Me",
"save": "Save",
"enter_username": "Please enter username",
"enter_email": "Please enter email",
"enter_phone": "Please enter phone number",
"select_gender": "Please select gender",
"enter_nationality": "Please enter nationality",
"enter_birthday": "Please enter birthday",
"enter_address": "Please enter current address",
"enter_status": "Please enter personal status",
"enter_industry": "Please enter industry",
"enter_about_me": "Please enter self introduction...",
"male": "Male",
"female": "Female",
"bachelor": "Bachelor",
"master": "Master",
"doctor": "Doctor",
"other": "Other",
"save_success": "Save successfully"
},
"user_info": {
"title": "Profile",
"change_avatar": "Click to change avatar",
"nationality": "Nationality",
"degree": "Degree",
"industry": "Industry",
"phone": "Phone",
"gender": "Gender",
"tags": "Tags",
"about_me": "About Me",
"edit_info": "Edit Information",
"not_set": "Not Set",
"years_old": "years old"
},
"travelList": {
"title": "Travel List",
"all": "All",
"enrolling": "Enrolling",
"ended": "Ended",
"time": "Time"
},
"activeList": {
"title": "Activity List",
"all_area": "All Areas",
"enrolling": "Enrolling",
"ended": "Ended",
"time": "Time"
},
"guanyuwomen": {
"title": "About Us"
},
"qiandao_list": {
"title": "Check-in List",
"scan_checkin": "Scan to Check-in",
"early_bird": "Early Bird",
"single_ticket": "Single Ticket",
"premium_ticket": "Premium Ticket"
},
"collection": {
"title": "My Favorites",
"tabs": {
"activity": "Activity",
"travel": "Travel"
},
"confirm_cancel_collection": "Are you sure to cancel the collection?",
"sign_up_now": "Sign Up Now",
"ended": "Ended"
}
},
"pages_order": {
"huodong_detail": {
"title": "Activity Details",
"start_time": "Start Time: ",
"activity_address": "Activity Address: ",
"navigation": "Navigation",
"organizer": "Organizer",
"add_wechat": "Add WeChat",
"activity_description": "Activity Description",
"precautions": "Precautions",
"registration_fee": "Registration Fee",
"collect": "Collect",
"collected": "Collected",
"forward": "Forward",
"sign_up_now": "Sign Up Now",
"ended": "Ended",
"select_activity_status": "Select Activity Status",
"confirm": "Confirm",
"early_bird": "Early Bird",
"single_ticket": "Single Ticket",
"premium_ticket": "Premium Ticket",
"complete_info_required": "Please complete the required information first"
},
"invoice_issuance": {
"title": "Apply for Invoice",
"total": "Total",
"individual": "Individual",
"enterprise": "Enterprise",
"name": "Name",
"enterprise_name": "Enterprise Name",
"id_number": "ID Number",
"tax_number": "Tax Number",
"email": "Email",
"apply": "Apply",
"please_enter": "Please enter content"
},
"invoice_records": {
"title": "Invoice Records",
"standard_ticket": "Standard Ticket",
"states": {
"invoicing": "Invoicing",
"invoiced": "Invoiced",
"failed": "Failed"
}
},
"lvyou_detail": {
"title": "Travel Details",
"start_time": "Start Time: ",
"tour_guide": "Tour Guide",
"add_wechat": "Add WeChat",
"travel_description": "Travel Description",
"registration_fee": "Registration Fee",
"collect": "Collect",
"collected": "Collected",
"forward": "Forward",
"sign_up_now": "Sign Up Now",
"ended": "Ended",
"complete_info_required": "Please complete the required information first",
"tabs": {
"introduction": "Introduction",
"route": "Route",
"cost": "Cost",
"notice": "Notice",
"agent": "Agent"
}
},
"order_details": {
"title": "Order Details",
"total": "Total",
"order_info": "Order Information",
"order_number": "Order Number",
"order_time": "Order Time",
"order_amount": "Order Amount",
"order_status": "Order Status",
"payment_notice": "Payment Notice",
"activity_notice": "Activity Notice",
"travel_notice": "Travel Notice",
"activity_checkin": "Activity Check-in",
"status": {
"unpaid": "Unpaid",
"pending": "Pending",
"completed": "Completed",
"cancelled": "Cancelled"
}
},
"order_evaluation": {
"title": "Activity Evaluation",
"organizer_evaluation": "Organizer Evaluation",
"activity_evaluation": "Activity Evaluation",
"please_enter_content": "Please enter content",
"submit_comment": "Submit Comment",
"please_rate_first": "Please rate before submitting!"
},
"pay_order": {
"title": "Payment Details",
"pending_payment": "Pending Payment",
"price": "Price",
"order_info": "Order Information",
"ticket_quantity": "Ticket Quantity",
"ticket_content": "Ticket Content",
"order_total": "Order Total",
"order_status": "Order Status",
"invitation_code": "Invitation Code",
"enter_invitation_code": "Please enter invitation code",
"payment_notice": "Payment Notice",
"pay_order": "Pay Order",
"payment_success": "Payment Successful",
"status": {
"unpaid": "Unpaid",
"pending": "Pending",
"completed": "Completed",
"cancelled": "Cancelled"
},
"ticket_types": {
"early_bird": "Early Bird",
"single_ticket": "Single Ticket",
"premium_ticket": "Premium Ticket"
}
}
},
"pages_zlx": {
"zlx_form": {
"title": "Organizer Certification",
"basic_info": "Basic Information",
"real_name": "Real Name",
"enter_real_name": "Please enter real name",
"contact_info": "Contact Information",
"enter_contact_info": "Please enter contact information",
"id_card": "ID Card Number",
"enter_id_card": "Please enter ID card number",
"resume_attachment": "Resume Attachment",
"upload_resume": "Upload Resume",
"wechat_qr_code": "WeChat QR Code",
"upload_image": "Upload Image",
"personal_photos_title": "Personal Photos (Including Full Body Shot)",
"agreement_title": "Read and Agree to Agreement",
"agreement_text": "I have read and agree to",
"agreement_link": "Organizer Agreement",
"save": "Save",
"approved": "Approved",
"copy": "Copy",
"copy_success": "Copy Successful",
"save_success": "Save Successful",
"submit_success": "Submit Successful",
"please_agree_agreement": "Please read and agree to the Organizer Agreement first",
"please_enter_name": "Please enter name",
"please_enter_contact": "Please enter contact information",
"please_enter_correct_contact": "Please enter correct contact information",
"please_enter_id_card": "Please enter ID card number",
"please_enter_correct_id_card": "Please enter correct ID card number"
}
},
"common": {
"confirm_logout": "Confirm logout?",
"logging_in": "Logging in...",
"all": "All"
},
"components": {
"base": {
"tabbar": {
"home": "Home",
"member": "Recruit",
"cart": "Orders",
"center": "Mine"
}
},
"active": {
"activeItem": {
"signUp": "Sign Up Now",
"ended": "Ended"
}
},
"travel": {
"travelList": {
"enrolling": "Enrolling",
"ended": "Ended"
}
},
"cart": {
"cardList": {
"orderTime": "Order Time",
"total": "Total",
"cancelActivity": "Cancel Activity",
"signIn": "Sign In",
"evaluate": "Evaluate",
"invoice": "Invoice",
"states": {
"pending": "Pending",
"completed": "Completed",
"cancelled": "Cancelled"
}
},
"signInQrcodePopup": {
"organizer": "Organizer"
}
},
"zhaomu": {
"zlxItem": {
"startSignIn": "Start Sign In"
},
"zhaomuItem": {
"joinRecruit": "Join Recruitment",
"rejected": "Rejected",
"reviewing": "Under Review",
"joined": "Joined",
"guaranteed": "Guaranteed",
"confirmed": "Confirmed",
"joinSuccess": "Successfully Joined"
}
}
}
}

+ 76
- 0
locale/index.js View File

@ -0,0 +1,76 @@
import en from './en.json'//英语语言包
import zhHans from './zh-Hans.json'//英语语言包
import Vue from 'vue'
import VueI18n from 'vue-i18n'
// 国际化字段映射
import objectLangMap from './objectLangMap'
Vue.use(VueI18n)
// 获取系统语言
const systemInfo = uni.getSystemInfoSync();
const systemLang = 'en';
// const systemLang = systemInfo.language || 'en';
console.log(systemInfo.language, systemLang);
// 语言映射,将系统语言映射到我们支持的语言包
const langMap = {
'zh': 'zh-Hans',
'zh_CN': 'zh-Hans',
'zh-Hans': 'zh-Hans',
'zh-Hant': 'zh-Hans', // 暂时都映射到简体中文
'zh-TW': 'zh-Hans',
'zh-HK': 'zh-Hans',
'en': 'en',
'en-US': 'en',
'en-GB': 'en'
};
// 获取语言:优先缓存 -> 系统语言 -> 默认英语
const lang = uni.getStorageSync('language') || langMap[systemLang] || 'en';
// const lang = 'en';
// VueI18n构造函数所需要的配置
const i18nConfig = {
locale: lang,//当前语言
// 所需要用的语言包
messages:{
en,
'zh-Hans' : zhHans,
}
}
//将对象国际化
Vue.prototype.$ot = (obj, type, key) => {
// 如果对象不存在,返回空字符串
if (!obj) return '';
// 获取当前语言
const currentLang = i18n.locale;
// 获取字段映射配置
const typeConfig = objectLangMap[type];
if (!typeConfig) return obj[key] || '';
const fieldConfig = typeConfig[key];
if (!fieldConfig) return obj[key] || '';
// 获取当前语言对应的字段名
const fieldName = fieldConfig[currentLang];
if (!fieldName) return obj[key] || '';
// 返回对象中对应字段的值,如果不存在则返回默认字段的值
return obj[fieldName] || obj[key] || '';
}
const i18n = new VueI18n(i18nConfig)
export default i18n

+ 65
- 0
locale/objectLangMap.js View File

@ -0,0 +1,65 @@
/**
* 对象字段国际化映射配置
* 用于 $ot 函数根据当前语言环境自动选择对应的字段名
*
* 使用方式: $ot(对象, 对象类型, 字段名)
* 例如: $ot(activity, 'active', 'title')
* - 中文环境下会取 activity.title
* - 英文环境下会取 activity.enTitle
*/
export default {
// 活动对象字段映射
"active" : {
"title" : { // 活动标题
"zh-Hans" : "title",
"en" : "enTitle",
},
"address" : { // 活动地址
"zh-Hans" : "address",
"en" : "enAddress",
},
"details" : { // 活动描述/详情
"zh-Hans" : "details",
"en" : "enDetails",
},
"precautions" : { // 活动注意事项
"zh-Hans" : "precautions",
"en" : "enPrecautions",
},
"orderDetails" : { // 订单详情中的活动须知
"zh-Hans" : "orderDetails",
"en" : "orderDetails",
}
},
// 旅行对象字段映射
"travel" : {
"title" : { // 旅行标题
"zh-Hans" : "title",
"en" : "enTitle",
},
"address" : { // 旅行地址
"zh-Hans" : "address",
"en" : "enAddress",
},
"js" : { // 旅行介绍
"zh-Hans" : "js",
"en" : "enJs",
},
"lx" : { // 旅行路线
"zh-Hans" : "lx",
"en" : "enLx",
},
"fy" : { // 旅行费用
"zh-Hans" : "fy",
"en" : "enFy",
},
"xz" : { // 旅行须知
"zh-Hans" : "xz",
"en" : "enXz",
},
"dl" : { // 旅行代理
"zh-Hans" : "dl",
"en" : "enDl",
}
}
}

+ 389
- 0
locale/zh-Hans.json View File

@ -0,0 +1,389 @@
{
"pages": {
"index": {
"index": {
"uv_search_placeholder": "搜索相关内容",
"nav_title": "首页",
"moments_title": "悦动时刻",
"sign_in_activity": "活动签到",
"sign_in_desc": "签到有好礼",
"view_now": "立即查看",
"activity": "活动",
"travel": "旅行",
"recent": "近期",
"past": "往期",
"select_area": "选择地区",
"confirm": "确定"
},
"cart": {
"title": "我的订单",
"tabs": {
"all": "全部",
"pending": "待参加",
"completed": "已完成",
"cancelled": "已取消"
},
"confirmCancel": "是否取消订单?"
},
"center": {
"nav_title": "个人中心",
"please_login": "请点击登录",
"my_activities": "我的活动",
"pending": "待参加",
"completed": "已完成",
"cancelled": "已取消",
"my_tools": "我的工具",
"invoice_records": "开票记录",
"my_favorites": "我的收藏",
"about_us": "关于我们",
"user_agreement": "用户协议",
"privacy_policy": "隐私协议",
"organizer_agreement": "主理人协议",
"organizer_checkin": "主理人签到",
"logout": "退出登录"
}
}
},
"pages_login": {
"wxLogin": {
"wechatLogin": "微信授权登录",
"cancelLogin": "取消登录",
"agreed": "已同意",
"privacyPolicy": "《隐私政策》",
"userAgreement": "《用户协议》",
"pleaseAgree": "请勾选隐私协议"
},
"wxUserInfo": {
"requestInfo": "申请获取你的头像、昵称",
"avatar": "头像",
"nickname": "昵称",
"gender": "性别",
"phone": "手机号",
"enterNickname": "请输入昵称",
"selectGender": "请选择性别",
"enterPhone": "请输入手机号",
"getPhone": "获取电话号码",
"confirm": "确认",
"male": "男",
"female": "女",
"pleaseSelectAvatar": "请选择头像",
"pleaseEnterNickname": "请填写昵称",
"pleaseEnterPhone": "请填写手机号",
"pleaseSelectGender": "请选择性别"
},
"fuwutiaokuan": {
"title": "用户协议"
},
"yinsixieyi": {
"defaultTitle": "隐私协议",
"travelGuide": "旅行需知",
"paymentGuide": "支付需知",
"organizerAgreement": "主理人协议"
}
},
"pages_my": {
"zlx_xieyi": {
"title": "主理人协议"
},
"zlx_qiandao": {
"title": "主理人签到",
"activity": "活动",
"travel": "旅行"
},
"user_msg": {
"title": "编辑资料",
"basic_info": "基础信息",
"username": "用户名称",
"email": "邮箱",
"phone": "手机号",
"gender": "性别",
"nationality": "国籍",
"birthday": "生日",
"address": "现居住址",
"personal_status": "个人状态",
"education": "教育",
"degree": "学历",
"school": "院校",
"work": "工作",
"industry": "行业",
"about_me": "关于我",
"save": "保存",
"enter_username": "请输入用户名称",
"enter_email": "请输入邮箱",
"enter_phone": "请输入手机号",
"select_gender": "请选择性别",
"enter_nationality": "请输入国籍",
"enter_birthday": "请输入生日",
"enter_address": "请输入现居住址",
"enter_status": "请输入个人状态",
"enter_industry": "请输入行业",
"enter_about_me": "请输入自我介绍...",
"male": "男",
"female": "女",
"bachelor": "本科",
"master": "硕士",
"doctor": "博士",
"other": "其他",
"save_success": "保存成功"
},
"user_info": {
"title": "个人资料",
"change_avatar": "点击更换头像",
"nationality": "国籍",
"degree": "学历",
"industry": "行业",
"phone": "电话",
"gender": "性别",
"tags": "标签",
"about_me": "关于我",
"edit_info": "编辑信息",
"not_set": "未设置",
"years_old": "岁"
},
"travelList": {
"title": "旅行列表",
"all": "全部",
"enrolling": "报名中",
"ended": "已结束",
"time": "时间"
},
"activeList": {
"title": "活动列表",
"all_area": "全部地区",
"enrolling": "报名中",
"ended": "已结束",
"time": "时间"
},
"guanyuwomen": {
"title": "关于我们"
},
"qiandao_list": {
"title": "签到列表",
"scan_checkin": "扫码签到",
"early_bird": "早鸟票",
"single_ticket": "单人票",
"premium_ticket": "尊享票"
},
"collection": {
"title": "我的收藏",
"tabs": {
"activity": "活动",
"travel": "旅行"
},
"confirm_cancel_collection": "确认取消收藏吗?",
"sign_up_now": "立即报名",
"ended": "已结束"
}
},
"pages_order": {
"huodong_detail": {
"title": "活动详情",
"start_time": "开始时间:",
"activity_address": "活动地址:",
"navigation": "导航",
"organizer": "主理人",
"add_wechat": "添加微信",
"activity_description": "活动描述",
"precautions": "注意事项",
"registration_fee": "报名费用",
"collect": "收藏",
"collected": "已收藏",
"forward": "转发",
"sign_up_now": "立即报名",
"ended": "已结束",
"select_activity_status": "选择活动状态",
"confirm": "确定",
"early_bird": "早鸟票",
"single_ticket": "单人票",
"premium_ticket": "尊享票",
"complete_info_required": "请您先完善必要信息"
},
"invoice_issuance": {
"title": "申请开票",
"total": "总计",
"individual": "个人",
"enterprise": "企业",
"name": "姓名",
"enterprise_name": "企业名称",
"id_number": "身份证号",
"tax_number": "税号",
"email": "邮箱",
"apply": "申请",
"please_enter": "请输入内容"
},
"invoice_records": {
"title": "开票记录",
"standard_ticket": "标准票",
"states": {
"invoicing": "开票中",
"invoiced": "已开票",
"failed": "开票失败"
}
},
"lvyou_detail": {
"title": "旅行详情",
"start_time": "开始时间:",
"tour_guide": "领队",
"add_wechat": "添加微信",
"travel_description": "旅行描述",
"registration_fee": "报名费用",
"collect": "收藏",
"collected": "已收藏",
"forward": "转发",
"sign_up_now": "立即报名",
"ended": "已结束",
"complete_info_required": "请您先完善必要信息",
"tabs": {
"introduction": "介绍",
"route": "路线",
"cost": "费用",
"notice": "须知",
"agent": "代理"
}
},
"order_details": {
"title": "订单详情",
"total": "总计",
"order_info": "订单信息",
"order_number": "订单编号",
"order_time": "下单时间",
"order_amount": "订单金额",
"order_status": "订单状态",
"payment_notice": "支付须知",
"activity_notice": "活动须知",
"travel_notice": "旅行须知",
"activity_checkin": "活动签到",
"status": {
"unpaid": "未付款",
"pending": "待参加",
"completed": "已完成",
"cancelled": "已取消"
}
},
"order_evaluation": {
"title": "活动评价",
"organizer_evaluation": "主理人评价",
"activity_evaluation": "活动评价",
"please_enter_content": "请输入内容",
"submit_comment": "提交评论",
"please_rate_first": "请评分之后再提交!"
},
"pay_order": {
"title": "支付详情",
"pending_payment": "待支付",
"price": "价格",
"order_info": "订单信息",
"ticket_quantity": "购票数量",
"ticket_content": "购票内容",
"order_total": "订单总金额",
"order_status": "订单状态",
"invitation_code": "邀请码",
"enter_invitation_code": "请输入邀请码",
"payment_notice": "支付须知",
"pay_order": "支付订单",
"payment_success": "支付成功",
"status": {
"unpaid": "未付款",
"pending": "待参加",
"completed": "已完成",
"cancelled": "已取消"
},
"ticket_types": {
"early_bird": "早鸟票",
"single_ticket": "单人票",
"premium_ticket": "尊享票"
}
}
},
"pages_zlx": {
"zlx_form": {
"title": "主理人认证",
"basic_info": "基础信息",
"real_name": "真实姓名",
"enter_real_name": "请输入真实姓名",
"contact_info": "联系方式",
"enter_contact_info": "请输入联系方式",
"id_card": "身份证号",
"enter_id_card": "请输入身份证号",
"resume_attachment": "简历附件",
"upload_resume": "上传简历",
"wechat_qr_code": "微信二维码",
"upload_image": "上传图片",
"personal_photos_title": "个人生活照片(含全身照)",
"agreement_title": "阅读并同意协议",
"agreement_text": "我已经阅读并同意",
"agreement_link": "《主理人协议》",
"save": "保存",
"approved": "已审核通过",
"copy": "复制",
"copy_success": "复制成功",
"save_success": "保存成功",
"submit_success": "提交成功",
"please_agree_agreement": "请先阅读并同意《主理人协议》",
"please_enter_name": "请输入姓名",
"please_enter_contact": "请输入联系方式",
"please_enter_correct_contact": "请输入正确的联系方式",
"please_enter_id_card": "请输入身份证号",
"please_enter_correct_id_card": "请输入正确的身份证号"
}
},
"common": {
"confirm_logout": "确认退出登录吗",
"logging_in": "登录中...",
"all": "全部"
},
"components": {
"base": {
"tabbar": {
"home": "首页",
"member": "招募",
"cart": "订单",
"center": "我的"
}
},
"active": {
"activeItem": {
"signUp": "立即报名",
"ended": "已结束"
}
},
"travel": {
"travelList": {
"enrolling": "报名中",
"ended": "已结束"
}
},
"cart": {
"cardList": {
"orderTime": "下单时间",
"total": "总计",
"cancelActivity": "取消活动",
"signIn": "活动签到",
"evaluate": "评价活动",
"invoice": "开具发票",
"states": {
"pending": "待参加",
"completed": "已完成",
"cancelled": "已取消"
}
},
"signInQrcodePopup": {
"organizer": "主理人"
}
},
"zhaomu": {
"zlxItem": {
"startSignIn": "开始签到"
},
"zhaomuItem": {
"joinRecruit": "参与招募",
"rejected": "不通过",
"reviewing": "审核中",
"joined": "已参加",
"guaranteed": "保证成行",
"confirmed": "已成行",
"joinSuccess": "参与成功"
}
}
}
}

+ 2
- 0
main.js View File

@ -10,6 +10,7 @@ Vue.config.productionTip = false
App.mpType = 'app'
import store from '@/store/store'
import i18n from '@/locale/index.js'
import './config'
import './utils/index.js'
@ -33,6 +34,7 @@ Vue.prototype.$Toast = function(title) {
const app = new Vue({
...App,
store,
i18n,
})
app.$mount()
// #endif


+ 1
- 8
pages.json View File

@ -7,13 +7,6 @@
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/order",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/center",
"style": {
@ -220,7 +213,7 @@
}],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "酒店桌布",
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"navigationStyle": "custom"


+ 6
- 6
pages/index/cart.vue View File

@ -1,7 +1,7 @@
<template>
<view class="cart">
<view class="head-box"></view>
<Navbar title="我的订单" :bgColor="bgColor" leftIconSize="0px" height="100rpx" :titleStyle="{color:fontColor}" />
<Navbar :title="$t('pages.index.cart.title')" :bgColor="bgColor" leftIconSize="0px" height="100rpx" :titleStyle="{color:fontColor}" />
<view class="content contentPosition_">
<uv-sticky offsetTop="220rpx" :bgColor="bgColor">
<uv-tabs :scrollable="false" @click="tabs" :list="tabList" lineWidth="40" :current="tabCurrent"
@ -50,7 +50,7 @@
},
tabList: [{
id: '',
name: '全部'
name: this.$t('pages.index.cart.tabs.all')
},
// {
// id: 0,
@ -58,15 +58,15 @@
// },
{
id: 1,
name: '待参加'
name: this.$t('pages.index.cart.tabs.pending')
},
{
id: 2,
name: '已完成'
name: this.$t('pages.index.cart.tabs.completed')
},
{
id: 3,
name: '已取消'
name: this.$t('pages.index.cart.tabs.cancelled')
},
],
lineBg: require('@/static/image/cart/tabIcon.png'),
@ -129,7 +129,7 @@
if (type == 0) {
uni.showModal({
title: '是否取消订单?',
title: this.$t('pages.index.cart.confirmCancel'),
success : res => {
if(res.confirm){
this.confirm()


+ 36
- 27
pages/index/center.vue View File

@ -1,7 +1,8 @@
<template>
<view class="page">
<view class="head-box"></view>
<uv-navbar title="个人中心" leftIcon=" " :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<uv-navbar :title="$t('pages.index.center.nav_title')" leftIcon=" " :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<!-- 个人中心 -->
<view class="content">
<view class="head" @click="toInfo">
@ -10,7 +11,8 @@
</view>
<view class="info" @click="toInfo">
<view class="vip">
{{isLogin ? userInfo.nickName : '请点击登录'}}
{{isLogin ? userInfo.nickName : $t('pages.index.center.please_login')}}
<!-- 请点击登录 -->
</view>
<view class="tips">
{{ userInfo.phone || '' }}
@ -23,7 +25,8 @@
<view class="myOrder">
<view>我的活动</view>
<view>{{ $t('pages.index.center.my_activities') }}</view>
<!-- 我的活动 -->
</view>
<view class="order">
@ -32,23 +35,27 @@
<view class="boxs"
@click="orderJump(1)">
<image src="@/static/image/center/order-1.png" mode="aspectFill" />
<view>待参加</view>
<view>{{ $t('pages.index.center.pending') }}</view>
<!-- 待参加 -->
</view>
<view class="boxs"
@click="orderJump(2)">
<image src="@/static/image/center/order-2.png" mode="aspectFill" />
<view>已完成</view>
<view>{{ $t('pages.index.center.completed') }}</view>
<!-- 已完成 -->
</view>
<view class="boxs"
@click="orderJump(3)">
<image src="@/static/image/center/order-3.png" mode="aspectFill" />
<view>已取消</view>
<view>{{ $t('pages.index.center.cancelled') }}</view>
<!-- 已取消 -->
</view>
</view>
</view>
<view class="myOrder">
<view>我的工具</view>
<view>{{ $t('pages.index.center.my_tools') }}</view>
<!-- 我的工具 -->
</view>
<view class="user">
<view class="cell-bottom">
@ -89,60 +96,62 @@
data() {
return {
bgColor:'transparent',
cellList:[
cellList:[],
vipType : ['普通会员', '黄金会员', '渠道商'],
vipImage : ['vip_vip', 'vip_user', 'vip_shop']
}
},
onShow() {
if(this.isLogin) {
this.$store.commit('getUserInfo')
}
},
onLoad() {
//
this.cellList = [
{
src:require('@/static/image/center/line-1.png'),
name:'开票记录',
name: this.$t('pages.index.center.invoice_records'), //
url:'/pages_order/invoiceRecords'
},
{
src:require('@/static/image/center/line-2.png'),
name:'我的收藏',
name: this.$t('pages.index.center.my_favorites'), //
url:'/pages_my/collection'
},
{
src:require('@/static/image/center/line-3.png'),
name:'关于我们',
name: this.$t('pages.index.center.about_us'), //
url:'/pages_my/guanyuwomen'
},
{
src:require('@/static/image/center/line-4.png'),
name:'用户协议',
name: this.$t('pages.index.center.user_agreement'), //
url:'/pages_login/fuwutiaokuan'
},
{
src:require('@/static/image/center/line-5.png'),
name:'隐私协议',
name: this.$t('pages.index.center.privacy_policy'), //
url:'/pages_login/yinsixieyi'
},
{
src:require('@/static/image/center/line-6.png'),
name:'主理人协议',
name: this.$t('pages.index.center.organizer_agreement'), //
url:'/pages_my/zlx-xieyi'
},
{
src:require('@/static/image/center/line-7.png'),
name:'主理人签到',
name: this.$t('pages.index.center.organizer_checkin'), //
url:'/pages_my/zlx-qiandao',
role : true,
},
{
src: '/static/image/center/line-5.png',
name:'退出登录',
name: this.$t('pages.index.center.logout'), // 退
commit : 'logout',
auth : true,
}
],
vipType : ['普通会员', '黄金会员', '渠道商'],
vipImage : ['vip_vip', 'vip_user', 'vip_shop']
}
},
onShow() {
if(this.isLogin) {
this.$store.commit('getUserInfo')
}
},
onLoad() {
]
},
onPageScroll(e) {
if(e.scrollTop > 50) {


+ 36
- 21
pages/index/index.vue View File

@ -11,7 +11,8 @@
<image class="sjx-img" src="@/static/image/home/sjx-icon.png" mode="widthFix"></image>
</view>
<view class="search-box-r">
<uv-search @search="search" placeholder="搜索相关内容" v-model="params.title" shape="square" :showAction="false" color="#fff" placeholderColor="#BDABAC" :clearabled="false" searchIconColor="#fff" searchIconSize="50rpx" bgColor="#4A2A2B" height="63rpx"></uv-search>
<uv-search @search="search" :placeholder="$t('pages.index.index.uv_search_placeholder')" v-model="params.title" shape="square" :showAction="false" color="#fff" placeholderColor="#BDABAC" :clearabled="false" searchIconColor="#fff" searchIconSize="50rpx" bgColor="#4A2A2B" height="63rpx"></uv-search>
<!-- 搜索相关内容 -->
</view>
</view>
<view class="swipe-box">
@ -24,15 +25,19 @@
</view>
<view class="ydsk-box">
<view class="ydsk-box-title">悦动时刻</view>
<view class="ydsk-box-title">{{ $t('pages.index.index.moments_title') }}</view>
<!-- 悦动时刻 -->
<view class="ydsk-box-gird">
<view class="gird-l" @click="skip('')">
<view class="left-box">
<view class="title-box">
<view>活动签到</view>
<view>签到有好礼</view>
<view>{{ $t('pages.index.index.sign_in_activity') }}</view>
<!-- 活动签到 -->
<view>{{ $t('pages.index.index.sign_in_desc') }}</view>
<!-- 签到有好礼 -->
</view>
<view class="btn-box">立即查看</view>
<view class="btn-box">{{ $t('pages.index.index.view_now') }}</view>
<!-- 立即查看 -->
</view>
<image class="hdqd-img" :src="configList.index_sign" mode="widthFix"></image>
<!-- <image class="hdqd-img" src="@/static/image/home/hdqd-img.png" mode="widthFix"></image> -->
@ -41,9 +46,11 @@
<view class="hd-box" @click="skip('activeList')">
<view class="left-box">
<view class="title-box">
活动
{{ $t('pages.index.index.activity') }}
<!-- 活动 -->
</view>
<view class="btn-box">立即查看</view>
<view class="btn-box">{{ $t('pages.index.index.view_now') }}</view>
<!-- 立即查看 -->
</view>
<image class="hdqd-img" :src="configList.index_huodong" mode="widthFix"></image>
<!-- <image class="hdqd-img" src="@/static/image/home/hd-img.png" mode="widthFix"></image> -->
@ -51,9 +58,11 @@
<view class="hd-box lx-box" @click="skip('travelList')">
<view class="left-box">
<view class="title-box">
旅行
{{ $t('pages.index.index.travel') }}
<!-- 旅行 -->
</view>
<view class="btn-box">立即查看</view>
<view class="btn-box">{{ $t('pages.index.index.view_now') }}</view>
<!-- 立即查看 -->
</view>
<image class="hdqd-img" :src="configList.index_lvxing" mode="widthFix"></image>
</view>
@ -111,7 +120,8 @@
<view class="popup-cont">
<view class="popup-title">
<view></view>
<view>选择地区</view>
<view>{{ $t('pages.index.index.select_area') }}</view>
<!-- 选择地区 -->
<uv-icon name="close" color="#fff" @click="$refs.popup.close();"></uv-icon>
</view>
<view class="popup-list">
@ -132,11 +142,12 @@
</view>
<view class="confirm-box">
<uv-button @click="clickArea"
text="确定" color="#381615"
:text="$t('pages.index.index.confirm')" color="#381615"
shape="circle"
:customStyle="{
color:'#FF5858'
}"></uv-button>
<!-- 确定 -->
</view>
</view>
</uv-popup>
@ -171,14 +182,8 @@
navTitle:'',
keyword:'',
list: [],
hdList: [
{ id: 0, name: '近期' },
{ id: 1, name: '往期' },
],
typeList: [
{ id: 0, name: '活动' },
{ id: 1, name: '旅行' },
],
hdList: [],
typeList: [],
type : 0,
lineBg: require('@/static/image/cart/tabIcon.png'),
cardListData: [],
@ -189,7 +194,7 @@
onPageScroll(e) {
if(e.scrollTop > 50) {
this.bgColor = '#49070c'
this.navTitle = '首页'
this.navTitle = this.$t('pages.index.index.nav_title') //
}else{
this.bgColor = 'transparent'
this.navTitle = ''
@ -201,9 +206,19 @@
this.getActivityPageList()
},
computed : {
...mapState(['areaList']),
...mapState(['areaList', 'selectArea']),
},
onLoad() {
//
this.hdList = [
{ id: 0, name: this.$t('pages.index.index.recent') }, //
{ id: 1, name: this.$t('pages.index.index.past') }, //
]
this.typeList = [
{ id: 0, name: this.$t('pages.index.index.activity') }, //
{ id: 1, name: this.$t('pages.index.index.travel') }, //
]
this.getBanner()
// this.getLocationDetail()
this.$store.commit('getArea', list => {


+ 0
- 131
pages/index/order.vue View File

@ -1,131 +0,0 @@
<template>
<view class="page">
<navbar
title="订单中心"
leftClick
@leftClick="$utils.navigateBack"
/>
<uv-tabs :list="tabs"
:activeStyle="{color : '#A3D250', fontWeight : 600}"
lineColor="#A3D250"
lineHeight="8rpx"
lineWidth="50rpx"
:current="current"
:scrollable="false"
@click="clickTabs"></uv-tabs>
</view>
</template>
<script>
export default {
// mixins : [mixinsList, mixinsOrder],
components : {
},
computed : {
},
data() {
return {
}
},
onLoad(args) {
},
onShow() {
},
methods: {
}
}
</script>
<style scoped lang="scss">
.page{
}
.list {
.item {
width: calc(100% - 40rpx);
background-color: #fff;
margin: 20rpx;
box-sizing: border-box;
border-radius: 16rpx;
padding: 30rpx;
.top {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
.service {}
.status {
font-size: 26rpx;
font-weight: 600;
}
}
.content {
display: flex;
margin: 10rpx 0;
.left {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
image {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
}
}
.right {
width: calc(100% - 160rpx);
color: #777;
font-size: 24rpx;
padding-left: 20rpx;
line-height: 40rpx;
background-color: #F8F8F8;
}
}
.bottom {
display: flex;
justify-content: space-between;
font-size: 25rpx;
.price {
font-weight: 900;
text {
color: #ff780099;
font-size: 30rpx;
}
}
.b1 {
border: 1px solid #777;
color: #777;
box-sizing: border-box;
}
.b2 {
background: $uni-color;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
view {
margin: 12rpx;
border-radius: 28rpx;
padding: 16rpx 48rpx;
margin-bottom: 0;
}
}
}
}
</style>

+ 1
- 1
pages_login/fuwutiaokuan.vue View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="head-box"></view>
<uv-navbar autoBack title="用户协议" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<uv-navbar autoBack :title="$t('pages_login.fuwutiaokuan.title')" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<view class="content" style="color: #fff!important;">
<uv-parse :content="content"></uv-parse>
</view>


+ 5
- 5
pages_login/wxLogin.vue View File

@ -11,12 +11,12 @@
<!-- 登录按钮 -->
<view @click="login" class="login-btn">
<!-- <uni-icons type="weixin" size="30" color="#fff"></uni-icons> -->
<text class="wx">微信授权登录</text>
<text class="wx">{{$t('pages_login.wxLogin.wechatLogin')}}</text>
</view>
<view @click="toHome"
class="uni-uncolor-btn">
<text class="wx">取消登录</text>
<text class="wx">{{$t('pages_login.wxLogin.cancelLogin')}}</text>
</view>
<!-- 隐私政策 -->
@ -26,8 +26,8 @@
<uv-checkbox size="30rpx"
shape="circle" active-color="#05C160" :name="privacy"></uv-checkbox>
</uv-checkbox-group>
已同意<text class="privacy-title" @click="jump(1)">隐私政策</text>
<text class="privacy-title" @click="jump(2)">用户协议</text>
{{$t('pages_login.wxLogin.agreed')}}<text class="privacy-title" @click="jump(1)">{{$t('pages_login.wxLogin.privacyPolicy')}}</text>
<text class="privacy-title" @click="jump(2)">{{$t('pages_login.wxLogin.userAgreement')}}</text>
</uv-radio-group>
</view>
@ -51,7 +51,7 @@
if(this.consent.length <= 0){
return uni.showToast({
icon: "none",
title: "请勾选隐私协议"
title: this.$t('pages_login.wxLogin.pleaseAgree')
})
}
this.$store.commit('login')


+ 15
- 15
pages_login/wxUserInfo.vue View File

@ -7,13 +7,13 @@
{{ configList.logo_name }}
</view>
<view class="title">
申请获取你的头像昵称
{{$t('pages_login.wxUserInfo.requestInfo')}}
</view>
<button class="chooseAvatar" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<view class="line">
<view class="">
头像
{{$t('pages_login.wxUserInfo.avatar')}}
</view>
<view class="">
<image :src="userInfoForm.headImage" v-if="userInfoForm.headImage" style="width: 60rpx;height: 60rpx;"
@ -24,20 +24,20 @@
</button>
<view class="line">
<view class="">
昵称
{{$t('pages_login.wxUserInfo.nickname')}}
</view>
<view class="">
<input type="nickname" placeholder="请输入昵称" style="text-align: right;" id="nickName"
<input type="nickname" :placeholder="$t('pages_login.wxUserInfo.enterNickname')" style="text-align: right;" id="nickName"
v-model="userInfoForm.nickName" />
</view>
</view>
<view class="line">
<view class="">
性别
{{$t('pages_login.wxUserInfo.gender')}}
</view>
<view class="">
<input
placeholder="请选择性别"
:placeholder="$t('pages_login.wxUserInfo.selectGender')"
disabled
@click="$refs.sexPicker.open()"
style="text-align: right;"
@ -46,12 +46,12 @@
</view>
<view class="line">
<view class="">
手机号
{{$t('pages_login.wxUserInfo.phone')}}
</view>
<view class=""
v-if="userInfoForm.phone">
<input placeholder="请输入手机号" style="text-align: right;"
<input :placeholder="$t('pages_login.wxUserInfo.enterPhone')" style="text-align: right;"
disabled
v-model="userInfoForm.phone" />
</view>
@ -62,7 +62,7 @@
class="getPhoneNumber"
open-type="getPhoneNumber"
@getphonenumber="getPhone">
获取电话号码
{{$t('pages_login.wxUserInfo.getPhone')}}
</button>
</view>
</view>
@ -70,7 +70,7 @@
<uv-picker ref="sexPicker" :columns="sexcolumns" @confirm="sexConfirm"></uv-picker>
<view class="btn" @click="submit">
确认
{{$t('pages_login.wxUserInfo.confirm')}}
</view>
</view>
</template>
@ -86,7 +86,7 @@
sex : '',
},
sexcolumns:[
['男','女']
[this.$t('pages_login.wxUserInfo.male'), this.$t('pages_login.wxUserInfo.female')]
],
};
},
@ -150,10 +150,10 @@
self.userInfoForm.nickName = nickName
if (self.$utils.verificationAll(self.userInfoForm, {
headImage: '请选择头像',
nickName: '请填写昵称',
phone: '请填写昵称',
sex: '请选择性别',
headImage: self.$t('pages_login.wxUserInfo.pleaseSelectAvatar'),
nickName: self.$t('pages_login.wxUserInfo.pleaseEnterNickname'),
phone: self.$t('pages_login.wxUserInfo.pleaseEnterPhone'),
sex: self.$t('pages_login.wxUserInfo.pleaseSelectGender'),
})) {
return
}


+ 4
- 4
pages_login/yinsixieyi.vue View File

@ -2,7 +2,7 @@
<view>
<view class="head-box"></view>
<uv-navbar autoBack
:title="title[key] || '隐私协议'"
:title="title[key] || $t('pages_login.yinsixieyi.defaultTitle')"
leftIconColor="#fff"
:bgColor="bgColor"
height="100rpx"
@ -20,9 +20,9 @@
bgColor:'transparent',
content:'',
title : {
withdrawal_instructions : '旅行需知',
recharge_instructions : '支付需知',
vip_text : '主理人协议',
withdrawal_instructions : this.$t('pages_login.yinsixieyi.travelGuide'),
recharge_instructions : this.$t('pages_login.yinsixieyi.paymentGuide'),
vip_text : this.$t('pages_login.yinsixieyi.organizerAgreement'),
},
key : '',
}


+ 8
- 8
pages_my/activeList.vue View File

@ -1,7 +1,7 @@
<template>
<view class="travelList">
<view class="head-box"></view>
<uv-navbar autoBack title="活动列表" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<uv-navbar autoBack :title="$t('pages_my.activeList.title')" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<view class="content">
<view class="drop">
<uv-drop-down ref="dropDown" text-color="#fff" text-size="30rpx" sign="dropDown_1" text-active-color="#fff"
@ -113,44 +113,44 @@
// { name: 'order', label: '', value: 'new' }
activeName: 'state',
state: {
label: '报名中',
label: this.$t('pages_my.activeList.enrolling'),
value: '0',
activeIndex: 0,
color: '#999',
activeColor: '#FF4546',
child: [
{
label: '报名中',
label: this.$t('pages_my.activeList.enrolling'),
value: '0'
},
{
label: '已结束',
label: this.$t('pages_my.activeList.ended'),
value: '1'
},
]
},
timeStr: {
label: '时间',
label: this.$t('pages_my.activeList.time'),
value: 'all',
activeIndex: 0,
color: '#999',
activeColor: '#FF4546',
child: [
{
label: '时间',
label: this.$t('pages_my.activeList.time'),
value: 'all'
}
]
},
cityId: {
label: '全部地区',
label: this.$t('pages_my.activeList.all_area'),
value: 'allAddress',
activeIndex: 0,
color: '#999',
activeColor: '#FF4546',
child: [
{
label: '全部地区',
label: this.$t('pages_my.activeList.all_area'),
value: 'allAddress'
},
]


+ 209
- 205
pages_my/collection.vue View File

@ -1,40 +1,42 @@
<template>
<view class="invoiceIssuance">
<view class="head-box"></view>
<Navbar title="我的收藏" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx"
:leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" />
<view class="content contentPosition_">
<uv-sticky offsetTop="220rpx" :bgColor="bgColor">
<uv-tabs :scrollable="false" @click="tabs" :list="tabList" lineWidth="40" :current="tabCurrent"
:lineColor="`url(${lineBg}) 100% 100%`"
:activeStyle="{color: '#FD5C5C', fontWeight: 'bold',transform: 'scale(1.05)'}"
:inactiveStyle="{color: '#999', transform: 'scale(1)'}"
itemStyle="padding-left: 15px; padding-right: 15px; height: 44px;"></uv-tabs>
</uv-sticky>
<view class="info cardStyle_"
@click="toDetail(item)"
v-for="(item, index) in cardListData" :key="index">
<view class="left">
<image :src="
item[typeKey[item.type]].image &&
item[typeKey[item.type]].image.split(',')[0]" alt="">
</view>
<view class="right">
<view class="detailed">
<view class="title">{{item[typeKey[item.type]].title}}</view>
<view class="date">{{item[typeKey[item.type]].startTime}}</view>
<view class="address">{{item[typeKey[item.type]].address}}</view>
</view>
<view class="data">
<view>{{item[typeKey[item.type]].num}}/{{item[typeKey[item.type]].sum}}</view>
<view class="btn-box" v-if="item[typeKey[item.type]].state == 0">立即报名</view>
<view class="btn-box btn-box2" v-if="item[typeKey[item.type]].state == 1">已结束</view>
</view>
</view>
<i class="icon" @click.stop="collect(item)"></i>
</view>
<uv-load-more :status="status" fontSize="24rpx" dashed line />
<!-- <view class="info cardStyle_">
<view class="invoiceIssuance">
<view class="head-box"></view>
<Navbar :title="$t('pages_my.collection.title')" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx"
:leftIconColor="leftIconColor" :titleStyle="{ color: fontColor }" /><!-- 我的收藏 -->
<view class="content contentPosition_">
<uv-sticky offsetTop="220rpx" :bgColor="bgColor">
<uv-tabs :scrollable="false" @click="tabs" :list="tabList" lineWidth="40" :current="tabCurrent"
:lineColor="`url(${lineBg}) 100% 100%`"
:activeStyle="{ color: '#FD5C5C', fontWeight: 'bold', transform: 'scale(1.05)' }"
:inactiveStyle="{ color: '#999', transform: 'scale(1)' }"
itemStyle="padding-left: 15px; padding-right: 15px; height: 44px;"></uv-tabs>
</uv-sticky>
<view class="info cardStyle_" @click="toDetail(item)" v-for="(item, index) in cardListData" :key="index">
<view class="left">
<image :src="item[typeKey[item.type]].image &&
item[typeKey[item.type]].image.split(',')[0]" alt="" />
</view>
<view class="right">
<view class="detailed">
<!-- <view class="title">{{ item[typeKey[item.type]].title }}</view>
<view class="date">{{ item[typeKey[item.type]].startTime }}</view>
<view class="address">{{ item[typeKey[item.type]].address }}</view> -->
<view class="title">{{ $ot(item[typeKey[item.type]], typeKey2[item.type], 'title') }}</view>
<view class="date">{{ item[typeKey[item.type]].startTime }}</view>
<view class="address">{{ $ot(item[typeKey[item.type]], typeKey2[item.type], 'address') }}</view>
</view>
<view class="data">
<view>{{ item[typeKey[item.type]].num }}/{{ item[typeKey[item.type]].sum }}</view>
<view class="btn-box" v-if="item[typeKey[item.type]].state == 0">{{ $t('pages_my.collection.sign_up_now') }}</view><!-- 立即报名 -->
<view class="btn-box btn-box2" v-if="item[typeKey[item.type]].state == 1">{{ $t('pages_my.collection.ended') }}</view><!-- 已结束 -->
</view>
</view>
<i class="icon" @click.stop="collect(item)"></i>
</view>
<uv-load-more :status="status" fontSize="24rpx" dashed line />
<!-- <view class="info cardStyle_">
<view class="left">
<image src="https://img0.baidu.com/it/u=4274003247,920124130&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1031" alt="">
</view>
@ -51,181 +53,183 @@
</view>
<i class="icon"></i>
</view> -->
</view>
</view>
</view>
</view>
</template>
<script>
import Navbar from '@/pages/components/Navbar.vue'
import {
globalMixin
} from '../pages/mixins/globalMixin';
export default {
mixins: [globalMixin],
components: {
Navbar
},
computed: {
customStyle1() {
return {
height: '30rpx',
color: '#FF4546',
}
}
},
data() {
return {
lineBg: require('@/static/image/cart/tabIcon.png'),
status:"loading",
tabCurrent:0,
params: {
pageNo: 1,
pageSize: 10,
type:0,
},
totalPage: '',
cardListData: [],
tabList: [
{
id: 0,
name: '活动'
},
{
id: 1,
name: '旅行'
},
],
typeKey : ['activityObject', 'travelObject'],
}
},
onReachBottom() {
if (this.params.pageNo >= this.totalPage) return
this.params.pageNo++
this.collectPageList()
},
onLoad() {
this.collectPageList()
},
onPullDownRefresh() {
this.params.pageNo = 1
this.cardListData = []
this.collectPageList()
},
methods: {
tabs(e) {
this.tabCurrent = e.index
this.cardListData = []
this.params.pageNo = 1
this.collectPageList()
},
collectPageList() {
this.params.type = this.tabCurrent
this.$api('collectPageList', this.params, res => {
uni.stopPullDownRefresh()
if (res.code == 200) {
this.totalPage = res.result.pages
this.cardListData = [...this.cardListData, ...res.result.records]
if(this.params.pageNo >= this.totalPage) {
this.status = "nomore"
}else {
this.status = "loadmore"
}
}
})
},
toDetail(item) {
if(item.type == 0) {//
uni.navigateTo({
url: `/pages_order/huodong-detail?activityId=${item.activityObject.id}`
})
}else{//
uni.navigateTo({
url: `/pages_order/lvyou-detail?travelId=${item.travelObject.id}`
})
}
},
collect(item){
uni.showModal({
title: '确认取消收藏吗?',
success : res => {
if(!res.confirm) return
this.$api('collect', {
id : item[this.typeKey[item.type]].id,
type : item.type,
}, res => {
if(res.code == 200){
this.cardListData = []
this.params.pageNo = 1
this.collectPageList()
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
}
})
},
}
}
import Navbar from '@/pages/components/Navbar.vue'
import {
globalMixin
} from '../pages/mixins/globalMixin';
export default {
mixins: [globalMixin],
components: {
Navbar
},
computed: {
customStyle1() {
return {
height: '30rpx',
color: '#FF4546',
}
}
},
data() {
return {
lineBg: require('@/static/image/cart/tabIcon.png'),
status: "loading",
tabCurrent: 0,
params: {
pageNo: 1,
pageSize: 10,
type: 0,
},
totalPage: '',
cardListData: [],
tabList: [
{
id: 0,
name: this.$t('pages_my.collection.tabs.activity') //
},
{
id: 1,
name: this.$t('pages_my.collection.tabs.travel') //
},
],
typeKey: ['activityObject', 'travelObject'],
typeKey2: ['active', 'travel'],
}
},
onReachBottom() {
if (this.params.pageNo >= this.totalPage) return
this.params.pageNo++
this.collectPageList()
},
onLoad() {
this.collectPageList()
},
onPullDownRefresh() {
this.params.pageNo = 1
this.cardListData = []
this.collectPageList()
},
methods: {
tabs(e) {
this.tabCurrent = e.index
this.cardListData = []
this.params.pageNo = 1
this.collectPageList()
},
collectPageList() {
this.params.type = this.tabCurrent
this.$api('collectPageList', this.params, res => {
uni.stopPullDownRefresh()
if (res.code == 200) {
this.totalPage = res.result.pages
this.cardListData = [...this.cardListData, ...res.result.records]
if (this.params.pageNo >= this.totalPage) {
this.status = "nomore"
} else {
this.status = "loadmore"
}
}
})
},
toDetail(item) {
if (item.type == 0) { //
uni.navigateTo({
url: `/pages_order/huodong-detail?activityId=${item.activityObject.id}`
})
} else { //
uni.navigateTo({
url: `/pages_order/lvyou-detail?travelId=${item.travelObject.id}`
})
}
},
collect(item) {
uni.showModal({
title: this.$t('pages_my.collection.confirm_cancel_collection'), //
success: res => {
if (!res.confirm) return
this.$api('collect', {
id: item[this.typeKey[item.type]].id,
type: item.type,
}, res => {
if (res.code == 200) {
this.cardListData = []
this.params.pageNo = 1
this.collectPageList()
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
}
})
},
}
}
</script>
<style scoped lang="scss">
.invoiceIssuance {
.content {
.info {
position: relative;
margin: 10rpx 32rpx 36rpx;
border-radius: 26rpx;
.invoiceIssuance {
.content {
.info {
position: relative;
margin: 10rpx 32rpx 36rpx;
border-radius: 26rpx;
.icon {
position: absolute;
right: 0;
top: 0;
display: block;
width: 66rpx;
height: 56rpx;
background: red;
background: url('@/static/image/icon.png') no-repeat;
background-size: 100% 100%;
}
.right {
.data {
display: flex;
justify-content: space-between;
align-items: center;
.icon {
position: absolute;
right: 0;
top: 0;
display: block;
width: 66rpx;
height: 56rpx;
background: red;
background: url('@/static/image/icon.png') no-repeat;
background-size: 100% 100%;
}
.mini-btn {
display: flex;
align-items: center;
margin: 0;
background: linear-gradient(to right, #FE5E5E, #E41522);
height: 45rpx;
width: 181rpx;
color: #fff;
border-radius: 60rpx;
padding-bottom: 10rpx;
}
.right {
.data {
display: flex;
justify-content: space-between;
align-items: center;
.btn-box {
width: 180rpx;
height: 54rpx;
background: url('@/static/image/member/btn-2.png') no-repeat;
background-size: 100% 100%;
font-weight: 500;
font-size: 23rpx;
color: #FFFFFF;
text-align: center;
line-height: 54rpx;
}
.mini-btn {
display: flex;
align-items: center;
margin: 0;
background: linear-gradient(to right, #FE5E5E, #E41522);
height: 45rpx;
width: 181rpx;
color: #fff;
border-radius: 60rpx;
padding-bottom: 10rpx;
}
.btn-box {
width: 180rpx;
height: 54rpx;
background: url('@/static/image/member/btn-2.png') no-repeat;
background-size: 100% 100%;
font-weight: 500;
font-size: 23rpx;
color: #FFFFFF;
text-align: center;
line-height: 54rpx;
}
.btn-box2 {
background: #34312E;
color: #AFAFAF;
border-radius: 60rpx;
}
}
}
}
}
}
.btn-box2 {
background: #34312E;
color: #AFAFAF;
border-radius: 60rpx;
}
}
}
}
}
}
</style>

+ 1
- 1
pages_my/guanyuwomen.vue View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="head-box"></view>
<uv-navbar autoBack title="关于我们" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<uv-navbar autoBack :title="$t('pages_my.guanyuwomen.title')" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<view class="content" style="color: #fff!important;">
<uv-parse :content="content"></uv-parse>
</view>


+ 19
- 16
pages_my/qiandao-list.vue View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="head-box"></view>
<uv-navbar autoBack title="签到列表" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<uv-navbar autoBack :title="$t('pages_my.qiandao_list.title')" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<view class="content">
<zlx-item
@ -21,7 +21,7 @@
</view>
<view class="btn-box">
<uv-button @click="saoma" text="扫码签到" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button>
<uv-button @click="saoma" :text="$t('pages_my.qiandao_list.scan_checkin')" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button>
</view>
</view>
</template>
@ -44,20 +44,7 @@
detail : {
activityInfo : {},
},
typeList:[
{
name:'早鸟票',
price:168
},
{
name:'单人票',
price:198.01
},
{
name:'尊享票',
price:268
}
],
typeList:[],
type : 0,
}
},
@ -69,6 +56,22 @@
}
},
onLoad({id, type}) {
//
this.typeList = [
{
name: this.$t('pages_my.qiandao_list.early_bird'),
price: 168
},
{
name: this.$t('pages_my.qiandao_list.single_ticket'),
price: 198.01
},
{
name: this.$t('pages_my.qiandao_list.premium_ticket'),
price: 268
}
]
this.queryParams.recruitId = id
this.queryParams.pageSize = 20
this.queryParams.type = type


+ 6
- 6
pages_my/travelList.vue View File

@ -1,7 +1,7 @@
<template>
<view class="travelList">
<view class="head-box"></view>
<Navbar title="旅行列表" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx" :leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" />
<Navbar :title="$t('pages_my.travelList.title')" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx" :leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" />
<view class="content contentPosition_">
<view class="drop">
<uv-drop-down
@ -101,24 +101,24 @@
// { name: 'state', label: '', value: 'new' }
activeName: 'state',
state: {
label: '全部',
label: this.$t('pages_my.travelList.all'),
value: 'all',
activeIndex: 0,
color: '#999',
activeColor: '#FF4546',
child: [{
label: '全部',
label: this.$t('pages_my.travelList.all'),
value: 'all'
}, {
label: '报名中',
label: this.$t('pages_my.travelList.enrolling'),
value: '0'
}, {
label: '已结束',
label: this.$t('pages_my.travelList.ended'),
value: '1'
}]
},
timeStr: {
label: '时间',
label: this.$t('pages_my.travelList.time'),
value: 'all',
activeIndex: 0,
color: '#999',


+ 22
- 22
pages_my/user-info.vue View File

@ -1,13 +1,13 @@
<template>
<view>
<view class="head-box"></view>
<uv-navbar autoBack title="个人资料" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<uv-navbar autoBack :title="$t('pages_my.user_info.title')" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<view class="content">
<button class="chooseAvatar" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<view class="img-box">
<image :src="info.headImage" mode=""></image>
<view>点击更换头像</view>
<view>{{ $t('pages_my.user_info.change_avatar') }}</view>
</view>
<!-- <view class="line">
<view class="">
@ -27,59 +27,59 @@
<image v-if="info.sex == '男'" src="@/static/image/center/nan-icon.png" mode=""></image>
<image v-else src="@/static/image/center/nv-icon.png" mode=""></image>
</view>
<view class="age-box" v-if="calculateAge">{{calculateAge}}</view>
<view class="age-box" v-else>未设置</view>
<view class="age-box" v-if="calculateAge">{{calculateAge}}{{ $t('pages_my.user_info.years_old') }}</view>
<view class="age-box" v-else>{{ $t('pages_my.user_info.not_set') }}</view>
<!-- <image src="@/static/image/center/nv-icon.png" mode=""></image> -->
</view>
<view class="form-box">
<view class="form-box-line">
<view class="label-box">
<image src="./static/user-icon-1.png" mode="widthFix"></image>
<view>国籍</view>
<view>{{ $t('pages_my.user_info.nationality') }}</view>
</view>
<view class="value-box">
{{info.city || '未设置'}}
{{info.city || $t('pages_my.user_info.not_set')}}
</view>
</view>
<view class="form-box-line">
<view class="label-box">
<image src="./static/user-icon-2.png" mode="widthFix"></image>
<view>学历</view>
<view>{{ $t('pages_my.user_info.degree') }}</view>
</view>
<view class="value-box">
{{info.shcool || '未设置'}}
{{info.shcool || $t('pages_my.user_info.not_set')}}
</view>
</view>
<view class="form-box-line">
<view class="label-box">
<image src="./static/user-icon-3.png" mode="widthFix"></image>
<view>行业</view>
<view>{{ $t('pages_my.user_info.industry') }}</view>
</view>
<view class="value-box">
{{info.workValue || '未设置'}}
{{info.workValue || $t('pages_my.user_info.not_set')}}
</view>
</view>
<view class="form-box-line">
<view class="label-box">
<image src="./static/user-icon-4.png" mode="widthFix"></image>
<view>电话</view>
<view>{{ $t('pages_my.user_info.phone') }}</view>
</view>
<view class="value-box">
{{info.phone || '未设置'}}
{{info.phone || $t('pages_my.user_info.not_set')}}
</view>
</view>
<view class="form-box-line">
<view class="label-box">
<image src="./static/user-icon-5.png" mode="widthFix"></image>
<view>性别</view>
<view>{{ $t('pages_my.user_info.gender') }}</view>
</view>
<view class="value-box">
{{info.sex || '未设置'}}
{{info.sex || $t('pages_my.user_info.not_set')}}
</view>
</view>
</view>
<view class="tips-box">
<view class="title-box">标签</view>
<view class="title-box">{{ $t('pages_my.user_info.tags') }}</view>
<view class="tips-val">
<view class="tips-item tips-1" v-for="(val,i) in stateArr" :key="i">{{val}}</view>
<!-- <view class="tips-item tips-2">985</view> -->
@ -89,12 +89,12 @@
</view>
</view>
<view class="about-box">
<uv-divider text="关于我" textSize="28rpx"></uv-divider>
<view class="about-box-val">{{info.details || '未设置'}}</view>
<uv-divider :text="$t('pages_my.user_info.about_me')" textSize="28rpx"></uv-divider>
<view class="about-box-val">{{info.details || $t('pages_my.user_info.not_set')}}</view>
</view>
</view>
<view class="btn-box">
<uv-button text="编辑信息" @click="editClick" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button>
<uv-button :text="$t('pages_my.user_info.edit_info')" @click="editClick" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button>
</view>
</view>
</template>
@ -158,10 +158,10 @@
self.info.headImage = url
this.$api('updateInfo',this.info, res => {
if (res.code == 200) {
uni.showToast({
title:'保存成功',
icon:'none'
})
uni.showToast({
title: this.$t('pages_my.user_msg.save_success'),
icon:'none'
})
}
})
})


+ 45
- 35
pages_my/user-msg.vue View File

@ -1,90 +1,90 @@
<template>
<view>
<view class="head-box"></view>
<uv-navbar autoBack title="编辑资料" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<uv-navbar autoBack :title="$t('pages_my.user_msg.title')" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<view class="content">
<view class="title-box">基础信息</view>
<view class="title-box">{{ $t('pages_my.user_msg.basic_info') }}</view>
<view class="form-box">
<view class="form-box-line">
<view class="label-box">用户名称</view>
<view class="label-box">{{ $t('pages_my.user_msg.username') }}</view>
<view class="value-box">
<uv-input placeholder="请输入用户名称" inputAlign="right" v-model="info.nickName" border="none" color="#CCCCCC"></uv-input>
<uv-input :placeholder="$t('pages_my.user_msg.enter_username')" inputAlign="right" v-model="info.nickName" border="none" color="#CCCCCC"></uv-input>
</view>
</view>
<view class="form-box-line">
<view class="label-box">邮箱</view>
<view class="label-box">{{ $t('pages_my.user_msg.email') }}</view>
<view class="value-box">
<uv-input placeholder="请输入邮箱" inputAlign="right" v-model="info.email" border="none" color="#CCCCCC"></uv-input>
<uv-input :placeholder="$t('pages_my.user_msg.enter_email')" inputAlign="right" v-model="info.email" border="none" color="#CCCCCC"></uv-input>
</view>
</view>
<view class="form-box-line">
<view class="label-box">手机号</view>
<view class="label-box">{{ $t('pages_my.user_msg.phone') }}</view>
<view class="value-box">
<uv-input placeholder="请输入手机号" inputAlign="right" v-model="info.phone" border="none" color="#CCCCCC"></uv-input>
<uv-input :placeholder="$t('pages_my.user_msg.enter_phone')" inputAlign="right" v-model="info.phone" border="none" color="#CCCCCC"></uv-input>
</view>
</view>
<view class="form-box-line">
<view class="label-box">性别</view>
<view class="label-box">{{ $t('pages_my.user_msg.gender') }}</view>
<view class="value-box" @click="$refs.sexPicker.open();">
<uv-input placeholder="请选择性别" readonly inputAlign="right" v-model="info.sex" border="none" color="#CCCCCC"></uv-input>
<uv-input :placeholder="$t('pages_my.user_msg.select_gender')" readonly inputAlign="right" v-model="info.sex" border="none" color="#CCCCCC"></uv-input>
</view>
</view>
<view class="form-box-line">
<view class="label-box">国籍</view>
<view class="label-box">{{ $t('pages_my.user_msg.nationality') }}</view>
<view class="value-box" @click="$refs.cityPicker.open()">
<uv-input placeholder="请输入国籍" readonly inputAlign="right" v-model="info.city" border="none" color="#CCCCCC"></uv-input>
<uv-input :placeholder="$t('pages_my.user_msg.enter_nationality')" readonly inputAlign="right" v-model="info.city" border="none" color="#CCCCCC"></uv-input>
</view>
</view>
<view class="form-box-line">
<view class="label-box">生日</view>
<view class="label-box">{{ $t('pages_my.user_msg.birthday') }}</view>
<view class="value-box" @click="$refs.datetimePicker.open()">
<uv-input placeholder="请输入生日" readonly inputAlign="right" v-model="info.yearDate" border="none" color="#CCCCCC"></uv-input>
<uv-input :placeholder="$t('pages_my.user_msg.enter_birthday')" readonly inputAlign="right" v-model="info.yearDate" border="none" color="#CCCCCC"></uv-input>
</view>
</view>
<view class="form-box-line">
<view class="label-box">现居住址</view>
<view class="label-box">{{ $t('pages_my.user_msg.address') }}</view>
<view class="value-box">
<uv-input placeholder="请输入现居住址" inputAlign="right" v-model="info.address" border="none" color="#CCCCCC"></uv-input>
<uv-input :placeholder="$t('pages_my.user_msg.enter_address')" inputAlign="right" v-model="info.address" border="none" color="#CCCCCC"></uv-input>
</view>
</view>
<view class="form-box-line">
<view class="label-box">个人状态</view>
<view class="label-box">{{ $t('pages_my.user_msg.personal_status') }}</view>
<view class="value-box">
<uv-input placeholder="请输入个人状态" inputAlign="right" v-model="info.state" border="none" color="#CCCCCC"></uv-input>
<uv-input :placeholder="$t('pages_my.user_msg.enter_status')" inputAlign="right" v-model="info.state" border="none" color="#CCCCCC"></uv-input>
</view>
</view>
</view>
<view class="title-box">教育</view>
<view class="title-box">{{ $t('pages_my.user_msg.education') }}</view>
<view class="form-box">
<view class="form-title">学历</view>
<view class="form-title">{{ $t('pages_my.user_msg.degree') }}</view>
<view class="choose-box">
<view class="choose-item" :class="info.shcool == item ? 'choose-class' :''" v-for="(item,i) in xueliList" :key="i" @click="info.shcool = item">{{item}}</view>
</view>
<view class="form-title">院校</view>
<view class="form-title">{{ $t('pages_my.user_msg.school') }}</view>
<view class="choose-box">
<view class="choose-item" :class="info.shcoolType == item.title ? 'choose-class' :''" v-for="(item,i) in yuanxiaoList" :key="i" @click="info.shcoolType = item.title">{{item.title}}</view>
</view>
</view>
<view class="title-box">工作</view>
<view class="title-box">{{ $t('pages_my.user_msg.work') }}</view>
<view class="form-box">
<view class="form-box-line">
<view class="label-box">行业</view>
<view class="label-box">{{ $t('pages_my.user_msg.industry') }}</view>
<view class="value-box">
<uv-input placeholder="请输入行业" inputAlign="right" v-model="info.workValue" border="none" color="#CCCCCC"></uv-input>
<uv-input :placeholder="$t('pages_my.user_msg.enter_industry')" inputAlign="right" v-model="info.workValue" border="none" color="#CCCCCC"></uv-input>
</view>
</view>
</view>
<view class="title-box">关于我</view>
<view class="title-box">{{ $t('pages_my.user_msg.about_me') }}</view>
<view class="form-box">
<uv-textarea v-model="info.details" :customStyle="{background: 'transparent',border:'none'}" height="380rpx" placeholder="请输入自我介绍..."></uv-textarea>
<uv-textarea v-model="info.details" :customStyle="{background: 'transparent',border:'none'}" height="380rpx" :placeholder="$t('pages_my.user_msg.enter_about_me')"></uv-textarea>
</view>
</view>
<view class="btn-box">
<uv-button text="保存" @click="saveClick" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button>
<uv-button :text="$t('pages_my.user_msg.save')" @click="saveClick" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button>
</view>
<uv-picker ref="sexPicker" :columns="sexcolumns" @confirm="sexConfirm"></uv-picker>
<uv-picker ref="cityPicker" keyName="country" :columns="citycolumns" @confirm="cityConfirm"></uv-picker>
@ -117,11 +117,9 @@
},
xueliIndex:0,
yuanxiaoIndex:0,
xueliList:['本科','硕士','博士','其他'],
xueliList:[],
yuanxiaoList:[],
sexcolumns:[
['男','女']
],
sexcolumns:[],
citycolumns:[],
maxDate:new Date().getTime(),
value: Number(new Date())
@ -135,6 +133,18 @@
}
},
onLoad() {
//
this.xueliList = [
this.$t('pages_my.user_msg.bachelor'),
this.$t('pages_my.user_msg.master'),
this.$t('pages_my.user_msg.doctor'),
this.$t('pages_my.user_msg.other')
]
this.sexcolumns = [[
this.$t('pages_my.user_msg.male'),
this.$t('pages_my.user_msg.female')
]]
this.getUserInfo()
this.getnationalityPageList()
this.getlabelPageList()
@ -171,10 +181,10 @@
}
this.$api('updateInfo',this.info, res => {
if (res.code == 200) {
uni.showToast({
title:'保存成功',
icon:'none'
})
uni.showToast({
title: this.$t('pages_my.user_msg.save_success'),
icon:'none'
})
setTimeout(()=>{
uni.navigateBack()
},1500)


+ 3
- 3
pages_my/zlx-qiandao.vue View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="head-box"></view>
<uv-navbar autoBack title="主理人签到" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<uv-navbar autoBack :title="$t('pages_my.zlx_qiandao.title')" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<uv-sticky offsetTop="350rpx" :bgColor="bgColor">
<uv-tabs :scrollable="false" @click="tabs" :list="tabList" lineWidth="40" :current="tabCurrent"
@ -39,11 +39,11 @@
tabList: [
{
id: 0,
name: '活动'
name: this.$t('pages_my.zlx_qiandao.activity')
},
{
id: 1,
name: '旅行'
name: this.$t('pages_my.zlx_qiandao.travel')
},
],
}


+ 1
- 1
pages_my/zlx-xieyi.vue View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="head-box"></view>
<uv-navbar autoBack title="主理人协议" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<uv-navbar autoBack :title="$t('pages_my.zlx_xieyi.title')" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<view class="content" style="color: #fff!important;">
<uv-parse :content="content"></uv-parse>
</view>


+ 28
- 26
pages_order/huodong-detail.vue View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="head-box"></view>
<uv-navbar autoBack title="活动详情" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<uv-navbar autoBack :title="$t('pages_order.huodong_detail.title')" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar><!-- -->
<view class="content">
<view class="content-head">
@ -14,13 +14,13 @@
<!-- <image class="image-box" :src="imageArr" mode="aspectFill"></image> -->
<view class="msg-box">
<view class="msg-box-title">{{activityDetails.title}}</view>
<view class="msg-box-time">开始时间{{activityDetails.startTime}}</view>
<view class="msg-box-title">{{$ot(activityDetails, 'active', 'title')}}</view>
<view class="msg-box-time">{{$t('pages_order.huodong_detail.start_time')}}{{activityDetails.startTime}}</view><!-- 开始时间 -->
<view class="msg-box-address">
<view class="msg-box-address-text">活动地址{{activityDetails.address}}</view>
<view class="msg-box-address-text">{{$t('pages_order.huodong_detail.activity_address')}}{{$ot(activityDetails, 'active', 'address')}}</view><!-- 活动地址 -->
<view class="address-icon" @click="daohang">
<image src="@/static/image/home/address-icon-2.png" mode="aspectFill"></image>
<view>导航</view>
<view>{{$t('pages_order.huodong_detail.navigation')}}</view><!-- 导航 -->
</view>
</view>
<view class="lingdui-box">
@ -28,7 +28,7 @@
<view class="lingdui-msg">
<view class="lingdui-msg-name">
<view>{{adminUserInfo.nickName}}</view>
<view class="name-tip">主理人</view>
<view class="name-tip">{{$t('pages_order.huodong_detail.organizer')}}</view><!-- 主理人 -->
</view>
<view>
<uv-rate :count="count"
@ -36,15 +36,15 @@
v-model="numValue" size="23" activeColor="#FFA200"></uv-rate>
</view>
</view>
<view class="add-wx" @click="$refs.ewmpopup.open();">添加微信</view>
<view class="add-wx" @click="$refs.ewmpopup.open();">{{$t('pages_order.huodong_detail.add_wechat')}}</view><!-- 添加微信 -->
</view>
</view>
</view>
<view class="lv-miaoshu">
<view class="title-box">活动描述</view>
<view class="title-box">{{$t('pages_order.huodong_detail.activity_description')}}</view><!-- 活动描述 -->
<view class="value-box">
<view class="uv-content lv-msg-box">
<uv-parse :content="activityDetails.details"></uv-parse>
<uv-parse :content="$ot(activityDetails, 'active', 'details')"></uv-parse>
</view>
</view>
@ -53,10 +53,10 @@
当金黄的落叶轻柔地铺满了小城的每个角落我们知道最温柔的季节已悄然而至在这个收获的季节里我们诚挚邀请您加入我们的秋日私旅
</view>
</view> -->
<view class="title-box">注意事项</view>
<view class="title-box">{{$t('pages_order.huodong_detail.precautions')}}</view><!-- 注意事项 -->
<view class="value-box">
<view class="lv-msg-box">
<uv-parse :content="activityDetails.precautions"></uv-parse>
<uv-parse :content="$ot(activityDetails, 'active', 'precautions')"></uv-parse>
</view>
</view>
</view>
@ -64,7 +64,7 @@
<view class="bottom-box">
<view class="price-box">
<view class="peice-val"><text></text>{{activityDetails.price}}</view>
<view>报名费用</view>
<view>{{$t('pages_order.huodong_detail.registration_fee')}}</view><!-- 报名费用 -->
</view>
<view class="caozuo-box">
@ -73,20 +73,20 @@
v-if="!isCollect">
<image src="./static/shoucang-icon.png"
mode=""></image>
<text>收藏</text>
<text>{{$t('pages_order.huodong_detail.collect')}}</text><!-- 收藏 -->
</view>
<view class="caozuo-item border-r isCollect"
@click="collect"
style=""
v-else>
<text>已收藏</text>
<text>{{$t('pages_order.huodong_detail.collected')}}</text><!-- 已收藏 -->
</view>
<button type="primary" style="background-color: transparent;height: 100rpx;font-size: 20rpx;padding: 0;" open-type="share" >
<view class="caozuo-item">
<image src="./static/zhuanfa-icon.png" mode=""></image>
<text style="line-height: initial;">转发</text>
<text style="line-height: initial;">{{$t('pages_order.huodong_detail.forward')}}</text><!-- 转发 -->
</view>
</button>
</view>
@ -95,18 +95,18 @@
<view class="btn-box"
v-if="activityDetails.state == 0"
@click="toBaoming">立即报名</view>
@click="toBaoming">{{$t('pages_order.huodong_detail.sign_up_now')}}</view><!-- 立即报名 -->
<view class="btn-box-2"
v-if="activityDetails.state == 1"
>已结束</view>
>{{$t('pages_order.huodong_detail.ended')}}</view><!-- 已结束 -->
</view>
<uv-popup ref="popup" mode="bottom" bgColor="">
<view class="popup-cont">
<view class="popup-title">
<view></view>
<view>选择活动状态</view>
<view>{{$t('pages_order.huodong_detail.select_activity_status')}}</view><!-- 选择活动状态 -->
<uv-icon name="close" color="#fff" @click="$refs.popup.close();"></uv-icon>
</view>
<view class="popup-list">
@ -121,7 +121,7 @@
</view>
</view>
<view class="confirm-box">
<uv-button @click="confirmClick(chooseIndex)" text="确定" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button>
<uv-button @click="confirmClick(chooseIndex)" :text="$t('pages_order.huodong_detail.confirm')" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button><!-- -->
</view>
</view>
</uv-popup>
@ -178,7 +178,7 @@
if (res.from === 'button') {
//
return {
title:this.activityDetails.title,
title: this.$ot(this.activityDetails, 'active', 'title'),
path: `/pages_order/huodong-detail?activityId=${this.activityId}`,
imageUrl: this.imageArr[0],
success: function(res) {
@ -192,7 +192,7 @@
}
//
return {
title:this.activityDetails.title,
title: this.$ot(this.activityDetails, 'active', 'title'),
path: `/pages_order/huodong-detail?activityId=${this.activityId}`,
imageUrl: this.imageArr[0],
success: function(res) {
@ -226,6 +226,8 @@
uni.openLocation({
latitude: Number(this.activityDetails.latitude),
longitude: Number(this.activityDetails.longitude),
name: this.$ot(this.activityDetails, 'active', 'title'),
address: this.$ot(this.activityDetails, 'active', 'address'),
success: function () {
console.log('success');
},
@ -255,21 +257,21 @@
if(res.result.activityInfo.birdPrice){
this.typeList.push({
price : res.result.activityInfo.birdPrice,
name : '早鸟票',
name : this.$t('pages_order.huodong_detail.early_bird'), //
type : 0,
})
}
if(res.result.activityInfo.personPrice){
this.typeList.push({
price : res.result.activityInfo.personPrice,
name : '单人票',
name : this.$t('pages_order.huodong_detail.single_ticket'), //
type : 1,
})
}
if(res.result.activityInfo.expensivePrice){
this.typeList.push({
price : res.result.activityInfo.expensivePrice,
name : '尊享票',
name : this.$t('pages_order.huodong_detail.premium_ticket'), //
type : 2,
})
}
@ -307,7 +309,7 @@
!this.userInfo.phone ||
!this.userInfo.sex){
uni.showToast({
title: '请您先完善必要信息',
title: this.$t('pages_order.huodong_detail.complete_info_required'), //
icon: 'none'
})
setTimeout(uni.navigateTo, 800, {
@ -493,7 +495,7 @@
}
}
.lv-miaoshu {
margin-top: 440rpx;
margin-top: 480rpx;
.value-box {
background: #1B1713;
border-radius: 27rpx;


+ 14
- 14
pages_order/invoiceIssuance.vue View File

@ -1,19 +1,19 @@
<template>
<view class="invoiceIssuance">
<view class="head-box"></view>
<Navbar title="申请开票" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx" :leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" />
<Navbar :title="$t('pages_order.invoice_issuance.title')" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx" :leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" /><!-- 申请开票 -->
<view class="content contentPosition_">
<view class="info cardStyle_">
<view class="left">
<image src="https://img0.baidu.com/it/u=4274003247,920124130&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1031" alt="">
<image src="https://img0.baidu.com/it/u=4274003247,920124130&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1031" alt="" />
</view>
<view class="right">
<view class="detailed">
<view class="title">{{activityItem.title}}</view>
<view class="title">{{$ot(activityItem, 'active', 'title')}}</view>
<view class="date">{{activityItem.startTime}}</view>
<view class="address">{{activityItem.address}}</view>
<view class="address">{{$ot(activityItem, 'active', 'address')}}</view>
</view>
<view class="price"><text>总计</text>¥{{activityItem.price}}</view>
<view class="price"><text>{{$t('pages_order.invoice_issuance.total')}}</text>¥{{activityItem.price}}</view><!-- 总计 -->
</view>
</view>
<view class="choice">
@ -27,23 +27,23 @@
labelColor="#fff"
activeColor="#FF4546"
iconPlacement="right">
<uv-radio name="0" label="个人"></uv-radio>
<uv-radio name="1" label="企业"></uv-radio>
<uv-radio name="0" :label="$t('pages_order.invoice_issuance.individual')"></uv-radio><!-- -->
<uv-radio name="1" :label="$t('pages_order.invoice_issuance.enterprise')"></uv-radio><!-- -->
</uv-radio-group>
</view>
<view class="iptInfo" v-if="radioValue">
<uv-form-item :label="radioValue === '0' ? '姓名' : '企业名称'" labelWidth="180rpx" borderBottom>
<uv-input placeholder="请输入内容" fontSize="29rpx" color="#fff" v-model="invoicingInfo.name" border="none"></uv-input>
<uv-form-item :label="radioValue === '0' ? $t('pages_order.invoice_issuance.name') : $t('pages_order.invoice_issuance.enterprise_name')" labelWidth="180rpx" borderBottom><!-- 姓名/企业名称 -->
<uv-input :placeholder="$t('pages_order.invoice_issuance.please_enter')" fontSize="29rpx" color="#fff" v-model="invoicingInfo.name" border="none"></uv-input><!-- 请输入内容 -->
</uv-form-item>
<uv-form-item :label="radioValue === '0' ? '身份证号' : '税号'" labelWidth="180rpx" borderBottom>
<uv-input placeholder="请输入内容" fontSize="29rpx" color="#fff" v-model="invoicingInfo.no" border="none"></uv-input>
<uv-form-item :label="radioValue === '0' ? $t('pages_order.invoice_issuance.id_number') : $t('pages_order.invoice_issuance.tax_number')" labelWidth="180rpx" borderBottom><!-- 身份证号/税号 -->
<uv-input :placeholder="$t('pages_order.invoice_issuance.please_enter')" fontSize="29rpx" color="#fff" v-model="invoicingInfo.no" border="none"></uv-input><!-- 请输入内容 -->
</uv-form-item>
<uv-form-item label="邮箱" labelWidth="180rpx" borderBottom>
<uv-input placeholder="请输入内容" fontSize="29rpx" color="#fff" v-model="invoicingInfo.emil" border="none"></uv-input>
<uv-form-item :label="$t('pages_order.invoice_issuance.email')" labelWidth="180rpx" borderBottom><!-- 邮箱 -->
<uv-input :placeholder="$t('pages_order.invoice_issuance.please_enter')" fontSize="29rpx" color="#fff" v-model="invoicingInfo.emil" border="none"></uv-input><!-- 请输入内容 -->
</uv-form-item>
</view>
<view style="padding: 0 35rpx 65rpx;">
<uv-button @click="toInvoiceRecords" :custom-style="customStyle" type="primary" shape="circle" color="#381615" text="申请"></uv-button>
<uv-button @click="toInvoiceRecords" :custom-style="customStyle" type="primary" shape="circle" color="#381615" :text="$t('pages_order.invoice_issuance.apply')"></uv-button><!-- -->
</view>
<uv-toast ref="toast"></uv-toast>
</view>


+ 9
- 8
pages_order/invoiceRecords.vue View File

@ -1,26 +1,26 @@
<template>
<view class='invoiceRecords'>
<view class="head-box"></view>
<Navbar title="开票记录" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx" :leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" />
<Navbar :title="$t('pages_order.invoice_records.title')" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx" :leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" /><!-- 开票记录 -->
<view class="content contentPosition_">
<view class="info cardStyle_" v-for="(item, index) in list" :key="index">
<view class="left" v-if="item.noType == 0">
<image :src="item.activityList[0] &&
item.activityList[0].image &&
item.activityList[0].image.split(',')[0]" alt="">
item.activityList[0].image.split(',')[0]" alt=""/>
</view>
<view class="left" v-if="item.noType == 1">
<image :src="item.travelList[0] &&
item.travelList[0].image &&
item.travelList[0].image.split(',')[0]" alt="">
item.travelList[0].image.split(',')[0]" alt=""/>
</view>
<view class="right">
<view class="detailed">
<view class="title" v-if="item.noType == 0">
{{item.activityList[0] && item.activityList[0].title}}
{{item.activityList[0] && $ot(item.activityList[0], 'active', 'title')}}
</view>
<view class="title" v-if="item.noType == 1">
{{item.travelList[0] && item.travelList[0].title}}
{{item.travelList[0] && $ot(item.travelList[0], 'travel', 'title')}}
</view>
<view class="date">{{item.createTime}}</view>
<view class="date"
@ -28,9 +28,9 @@
<view class="emil">{{item.emil}}</view>
</view>
<view class="data">
<text>标准票</text>
<text>{{$t('pages_order.invoice_records.standard_ticket')}}</text><!-- 标准票 -->
<text>×1</text>
<text class="btn">{{ state[item.state] }}</text>
<text class="btn">{{ $t(`pages_order.invoice_records.states.${stateKeys[item.state]}`) }}</text>
</view>
</view>
</view>
@ -51,7 +51,8 @@ export default {
data() {
return {
mixinsListApi : 'getInvoicePageList',
state : ['开票中', '已开票', '开票失败'],
state : ['开票中', '已开票', '开票失败'], //
stateKeys : ['invoicing', 'invoiced', 'failed'], //
};
},
components: {


+ 22
- 22
pages_order/lvyou-detail.vue View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="head-box"></view>
<uv-navbar autoBack title="旅行详情" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
<uv-navbar autoBack :title="$t('pages_order.lvyou_detail.title')" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar><!-- -->
<view class="content">
<view class="content-head">
@ -15,14 +15,14 @@
<!-- <image class="image-box" :src="travelDetails.travel.image" mode="aspectFill"></image> -->
<view class="msg-box">
<view class="msg-box-title">{{travelDetails.travel.title}}</view>
<view class="msg-box-time">开始时间{{travelDetails.travel.startTime}}</view>
<view class="msg-box-title">{{$ot(travelDetails.travel, 'travel', 'title')}}</view>
<view class="msg-box-time">{{$t('pages_order.lvyou_detail.start_time')}}{{travelDetails.travel.startTime}}</view><!-- 开始时间 -->
<view class="lingdui-box">
<image class="use-img" :src="travelDetails.adminUserInfo.headImage" mode=""></image>
<view class="lingdui-msg">
<view class="lingdui-msg-name">
<view>{{travelDetails.adminUserInfo.nickName}}</view>
<view class="name-tip">领队</view>
<view class="name-tip">{{$t('pages_order.lvyou_detail.tour_guide')}}</view><!-- 领队 -->
</view>
<view>
<uv-rate :count="count"
@ -30,7 +30,7 @@
v-model="travelDetails.adminUser.num" size="23" activeColor="#FFA200"></uv-rate>
</view>
</view>
<view class="add-wx" @click="$refs.ewmpopup.open()">添加微信</view>
<view class="add-wx" @click="$refs.ewmpopup.open()">{{$t('pages_order.lvyou_detail.add_wechat')}}</view><!-- 添加微信 -->
</view>
</view>
</view>
@ -40,7 +40,7 @@
</view>
<view class="lv-miaoshu">
<view class="title-box">旅行描述</view>
<view class="title-box">{{$t('pages_order.lvyou_detail.travel_description')}}</view><!-- 旅行描述 -->
<view class="value-box">
<view class="tabs-box">
<uv-tabs :list="list" @click="tabsClick" lineColor="#FE5E5E" :activeStyle="{color:'#FE5E5E',fontSize:'29rpx',fontWeight: 'bold'}" :inactiveStyle="{color:'#D6D6D6',fontSize:'29rpx',fontWeight: 'bold'}"></uv-tabs>
@ -54,7 +54,7 @@
<view class="bottom-box">
<view class="price-box">
<view class="peice-val"><text></text>{{travelDetails.travel.price}}</view>
<view>报名费用</view>
<view>{{$t('pages_order.lvyou_detail.registration_fee')}}</view><!-- 报名费用 -->
</view>
<view class="caozuo-box">
<view class="caozuo-item border-r"
@ -62,30 +62,30 @@
v-if="!isCollect">
<image src="./static/shoucang-icon.png"
mode=""></image>
<text>收藏</text>
<text>{{$t('pages_order.lvyou_detail.collect')}}</text><!-- 收藏 -->
</view>
<view class="caozuo-item border-r isCollect"
@click="collect"
style=""
v-else>
<text>已收藏</text>
<text>{{$t('pages_order.lvyou_detail.collected')}}</text><!-- 已收藏 -->
</view>
<button type="primary" style="background-color: transparent;height: 100rpx;font-size: 20rpx;padding: 0;" open-type="share" >
<view class="caozuo-item">
<image src="./static/zhuanfa-icon.png" mode=""></image>
<text style="line-height: initial;">转发</text>
<text style="line-height: initial;">{{$t('pages_order.lvyou_detail.forward')}}</text><!-- 转发 -->
</view>
</button>
</view>
<view class="btn-box"
v-if="travelDetails.travel.state == 0"
@click="toBaoming">立即报名</view>
@click="toBaoming">{{$t('pages_order.lvyou_detail.sign_up_now')}}</view><!-- 立即报名 -->
<view class="btn-box-2"
v-if="travelDetails.travel.state == 1"
>已结束</view>
>{{$t('pages_order.lvyou_detail.ended')}}</view><!-- 已结束 -->
</view>
<uv-popup ref="ewmpopup" mode="center" round="30rpx">
<view class="pop-cont">
@ -109,23 +109,23 @@
current:0,
list:[
{
name:'介绍',
name: this.$t('pages_order.lvyou_detail.tabs.introduction'), //
key:'js'
},
{
name:'路线',
name: this.$t('pages_order.lvyou_detail.tabs.route'), // 线
key:'lx'
},
{
name:'费用',
name: this.$t('pages_order.lvyou_detail.tabs.cost'), //
key:'fy'
},
{
name:'须知',
name: this.$t('pages_order.lvyou_detail.tabs.notice'), //
key:'xz'
},
{
name:'代理',
name: this.$t('pages_order.lvyou_detail.tabs.agent'), //
key:'dl'
},
],
@ -138,7 +138,7 @@
if (res.from === 'button') {
//
return {
title:this.travelDetails.travel.title,
title: this.$ot(this.travelDetails.travel, 'travel', 'title'),
path: `/pages_order/lvyou-detail?travelId=${this.travelId}`,
imageUrl: this.travelDetails.travel.image,
success: function(res) {
@ -152,7 +152,7 @@
}
//
return {
title:this.travelDetails.title,
title: this.$ot(this.travelDetails.travel, 'travel', 'title'),
path: `/pages_order/lvyou-detail?travelId=${this.travelId}`,
imageUrl: this.travelDetails.travel.image,
success: function(res) {
@ -191,7 +191,7 @@
!this.userInfo.sex){
uni.showToast({
title: '请您先完善必要信息',
title: this.$t('pages_order.lvyou_detail.complete_info_required'), //
icon: 'none'
})
@ -243,7 +243,7 @@
},
tabsClick(val) {
this.current = val.index
this.content = this.travelDetails.travel[this.list[this.current].key]
this.content = this.$ot(this.travelDetails.travel, 'travel', this.list[this.current].key)
},
travelInfo(travelId) {
let data = {travelId}
@ -254,7 +254,7 @@
if(res.code==200) {
this.travelDetails = res.result
this.isCollect = res.result.collect
this.content = res.result.travel[this.list[this.current].key]
this.content = this.$ot(res.result.travel, 'travel', this.list[this.current].key)
}
})
}


+ 52
- 24
pages_order/orderDetails.vue View File

@ -1,7 +1,7 @@
<template>
<view class="orderDetails">
<Navbar title="订单详情" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx"
:leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" />
<Navbar :title="$t('pages_order.order_details.title')" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx"
:leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" /><!-- 订单详情 -->
<view class="content">
<view class="baseInfo cardBackground_">
<view class="statusBox">
@ -10,51 +10,53 @@
</view>
<view class="info grayBg cardStyle_">
<view class="left">
<image :src="images" >
<image :src="images" />
</view>
<view class="right">
<view class="detailed">
<view class="title">{{dataInfo.title}}</view>
<view class="title">{{getTitle()}}</view>
<view class="date">{{dataInfo.startTime}}</view>
<view class="address">{{dataInfo.address}}</view>
<view class="address">{{getAddress()}}</view>
</view>
<view class="price"><text>总计</text>¥{{dataInfo.payPrice}}</view>
<view class="price"><text>{{$t('pages_order.order_details.total')}}</text>¥{{dataInfo.payPrice}}</view><!-- 总计 -->
</view>
</view>
</view>
<view class="orderInfo">
<view class="title">订单信息</view>
<view class="title">{{$t('pages_order.order_details.order_info')}}</view><!-- 订单信息 -->
<view class="details">
<uv-cell :border="false" titleStyle="{color: 'red'}" title="订单编号" :value="showOrderId"></uv-cell>
<uv-cell :border="false" titleStyle="{color: 'red'}" title="下单时间" :value="dataInfo.createTime"></uv-cell>
<uv-cell :border="false" titleStyle="{color: 'red'}" title="订单金额" :value="'¥' + dataInfo.payPrice"></uv-cell>
<uv-cell :border="false" titleStyle="{color: 'red'}" title="订单状态" :value="orderStatus"></uv-cell>
<uv-cell :border="false" titleStyle="{color: 'red'}" :title="$t('pages_order.order_details.order_number')" :value="showOrderId"></uv-cell><!-- -->
<uv-cell :border="false" titleStyle="{color: 'red'}" :title="$t('pages_order.order_details.order_time')" :value="dataInfo.createTime"></uv-cell><!-- -->
<uv-cell :border="false" titleStyle="{color: 'red'}" :title="$t('pages_order.order_details.order_amount')" :value="'¥' + dataInfo.payPrice"></uv-cell><!-- -->
<uv-cell :border="false" titleStyle="{color: 'red'}" :title="$t('pages_order.order_details.order_status')" :value="orderStatus"></uv-cell><!-- -->
</view>
</view>
<view class="tips">
<view class="title">支付须知</view>
<view class="title">{{$t('pages_order.order_details.payment_notice')}}</view><!-- 支付须知 -->
<view class="details">
<uv-parse :content="configList.recharge_instructions"></uv-parse>
</view>
</view>
<view class="tips" v-if="dataInfo.type == 0">
<view class="title">活动须知</view>
<view class="title">{{$t('pages_order.order_details.activity_notice')}}</view><!-- 活动须知 -->
<view class="details">
<uv-parse :content="configList.huodong_text"></uv-parse>
<uv-parse :content="getHuodongText()"></uv-parse>
<!-- <uv-parse :content="configList.huodong_text"></uv-parse> -->
</view>
</view>
<view class="tips" v-else-if="dataInfo.type == 1">
<view class="title">旅行须知</view>
<view class="title">{{$t('pages_order.order_details.travel_notice')}}</view><!-- 旅行须知 -->
<view class="details">
<uv-parse :content="configList.withdrawal_instructions"></uv-parse>
<uv-parse :content="getLvyouText()"></uv-parse>
<!-- <uv-parse :content="configList.withdrawal_instructions"></uv-parse> -->
</view>
</view>
</view>
<view style="padding: 65rpx 35rpx;"
@click="open"
v-if="dataInfo.state == 1">
<uv-button :custom-style="customStyle" type="primary" shape="circle" color="#381615" text="活动签到"></uv-button>
<uv-button :custom-style="customStyle" type="primary" shape="circle" color="#381615" :text="$t('pages_order.order_details.activity_checkin')"></uv-button><!-- -->
</view>
<signInQrcodePopup ref="signInQrcodePopup"/>
@ -80,7 +82,8 @@
dataInfo: {},
customStyle:{
color:'#FF5858'
}
},
detail : {},
}
},
onLoad(e) {
@ -89,18 +92,16 @@
},
computed:{
orderStatus() {
let text = ""
let state = this.dataInfo.state
if( state == 0) {
text = '未付款'
return this.$t('pages_order.order_details.status.unpaid') //
}else if(state == 1) {
text = '待参加'
return this.$t('pages_order.order_details.status.pending') //
}else if(state == 2) {
text = '已完成'
return this.$t('pages_order.order_details.status.completed') //
}else{
text = '已取消'
return this.$t('pages_order.order_details.status.cancelled') //
}
return text
},
showOrderId() {//0 1
let id = ""
@ -120,12 +121,39 @@
this.$api('orderInfo',{orderId:this.orderId},res=>{
if(res.code == 200) {
this.dataInfo = res.result.orderDetails
this.detail = res.result
}
})
},
open(){
this.$refs.signInQrcodePopup.open(this.orderId)
},
getTitle() {
// 使
if (this.dataInfo.type == 0) {
//
return this.$ot(this.detail.activity, 'active', 'title')
} else {
//
return this.$ot(this.detail.travel, 'travel', 'title')
}
},
getAddress() {
// 使
if (this.dataInfo.type == 0) {
//
return this.$ot(this.detail.activity, 'active', 'address')
} else {
//
return this.$ot(this.detail.travel, 'travel', 'address')
}
},
getHuodongText() {
return this.$ot(this.detail.activity, 'active', 'orderDetails')
},
getLvyouText() {
return this.$ot(this.detail.travel, 'travel', 'xz')
},
}
}
</script>


+ 11
- 11
pages_order/orderEvaluation.vue View File

@ -1,19 +1,19 @@
<template>
<view class="orderEvaluation">
<Navbar
title="活动评价"
:title="$t('pages_order.order_evaluation.title')"
:autoBack="true"
:bgColor="bgColor"
leftIconSize="18px"
height="100rpx"
:leftIconColor="leftIconColor"
:titleStyle="{ color: fontColor }"
/>
/><!-- -->
<view class="content">
<view class="baseInfo cardBackground_">
<view class="statusBox">
<i></i>
<view class="status">主理人评价</view>
<view class="status">{{$t('pages_order.order_evaluation.organizer_evaluation')}}</view><!-- 主理人评价 -->
</view>
<view class="info grayBg">
<view class="score">
@ -25,14 +25,14 @@
border="none"
v-model="evaluate"
:maxlength="-1"
placeholder="请输入内容"
></uv-textarea>
:placeholder="$t('pages_order.order_evaluation.please_enter_content')"
></uv-textarea><!-- -->
</view>
</view>
<view class="baseInfo cardBackground_" style="margin-top: 32rpx">
<view class="statusBox">
<i></i>
<view class="status">活动评价</view>
<view class="status">{{$t('pages_order.order_evaluation.activity_evaluation')}}</view><!-- 活动评价 -->
</view>
<view class="info grayBg">
<view class="score">
@ -48,8 +48,8 @@
border="none"
v-model="userEvaluate"
:maxlength="-1"
placeholder="请输入内容"
></uv-textarea>
:placeholder="$t('pages_order.order_evaluation.please_enter_content')"
></uv-textarea><!-- -->
</view>
</view>
</view>
@ -60,8 +60,8 @@
type="primary"
shape="circle"
color="#381615"
text="提交评论"
></uv-button>
:text="$t('pages_order.order_evaluation.submit_comment')"
></uv-button><!-- -->
</view>
<uv-toast ref="toast"></uv-toast>
</view>
@ -94,7 +94,7 @@ export default {
this.$refs.toast.show({
type: 'error',
icon: false,
message: '请评分之后再提交!'
message: this.$t('pages_order.order_evaluation.please_rate_first') //
})
return;
}


+ 246
- 250
pages_order/payOrder.vue View File

@ -1,273 +1,269 @@
<template>
<view class="orderDetails">
<Navbar title="支付详情" :autoBack="true" :bgColor="bgColor" leftIconSize="18px" height="100rpx"
:leftIconColor="leftIconColor" :titleStyle="{color:fontColor}" />
<view class="content">
<view class="baseInfo cardBackground_">
<view class="statusBox">
<i></i>
<view class="status">待支付</view>
</view>
<view class="info grayBg cardStyle_">
<view class="left">
<image :src="images" mode="aspectFill">
</view>
<view class="right">
<view class="detailed">
<view class="title">{{dataInfo.title}}</view>
<view class="date">{{dataInfo.startTime}}</view>
<view class="address">{{dataInfo.address}}</view>
</view>
<view class="price"><text>价格</text>¥{{dataInfo.payPrice}}</view>
</view>
</view>
</view>
<view class="orderInfo">
<view class="title">订单信息</view>
<view class="details">
<uv-cell :border="false"
title="购票数量">
<template #value>
<uv-number-box v-model="num"/>
</template>
</uv-cell>
<uv-cell :border="false"
title="购票内容"
:value="typeList[dataInfo.typePrice].name"
/>
<uv-cell :border="false"
title="订单总金额" :value="'¥' + (dataInfo.payPrice * num)"></uv-cell>
<uv-cell :border="false"
title="订单状态" :value="orderStatus"></uv-cell>
<uv-cell :border="false"
v-if="dataInfo.type == 0"
title="邀请码">
<template #value>
<input type="text"
style="color: #fff;"
placeholder="请输入邀请码" v-model="code"/>
</template>
</uv-cell>
</view>
<view class="orderDetails">
<Navbar :title="$t('pages_order.pay_order.title')" :autoBack="true" :bgColor="bgColor" leftIconSize="18px"
height="100rpx" :leftIconColor="leftIconColor" :titleStyle="{ color: fontColor }" /><!-- 支付详情 -->
<view class="content">
<view class="baseInfo cardBackground_">
<view class="statusBox">
<i></i>
<view class="status">{{ $t('pages_order.pay_order.pending_payment') }}</view><!-- 待支付 -->
</view>
<view class="info grayBg cardStyle_">
<view class="left">
<image :src="images" mode="aspectFill" />
</view>
<view class="right">
<view class="detailed">
<view class="title">{{ getTitle() }}</view>
<view class="date">{{ dataInfo.startTime }}</view>
<view class="address">{{ getAddress() }}</view>
</view>
<view class="price"><text>{{ $t('pages_order.pay_order.price') }}</text>¥{{ dataInfo.payPrice }}
</view><!-- 价格 -->
</view>
</view>
</view>
<view class="orderInfo">
<view class="title">{{ $t('pages_order.pay_order.order_info') }}</view><!-- 订单信息 -->
<view class="details">
</view>
<view class="tips">
<view class="title">支付须知</view>
<view class="details">
<uv-parse :content="configList.recharge_instructions"></uv-parse>
</view>
</view>
</view>
<view style="padding: 65rpx 35rpx;">
<uv-button
:custom-style="customStyle"
type="primary"
shape="circle"
color="#381615"
@click="confirmClick"
text="支付订单"></uv-button>
</view>
</view>
<uv-cell :border="false" :title="$t('pages_order.pay_order.ticket_quantity')"><!-- 购票数量 -->
<template #value>
<uv-number-box v-model="num" />
</template>
</uv-cell>
<uv-cell :border="false" :title="$t('pages_order.pay_order.ticket_content')"
:value="ticketName" /><!-- 购票内容 -->
<uv-cell :border="false" :title="$t('pages_order.pay_order.order_total')"
:value="'¥' + (dataInfo.payPrice * num)"></uv-cell><!-- -->
<uv-cell :border="false" :title="$t('pages_order.pay_order.order_status')"
:value="orderStatus"></uv-cell><!-- -->
<uv-cell :border="false" v-if="dataInfo.type == 0"
:title="$t('pages_order.pay_order.invitation_code')"><!-- 邀请码 -->
<template #value>
<input type="text" style="color: #fff;"
:placeholder="$t('pages_order.pay_order.enter_invitation_code')"
v-model="code" /><!-- 请输入邀请码 -->
</template>
</uv-cell>
</view>
</view>
<view class="tips">
<view class="title">{{ $t('pages_order.pay_order.payment_notice') }}</view><!-- 支付须知 -->
<view class="details">
<uv-parse :content="configList.recharge_instructions"></uv-parse>
</view>
</view>
</view>
<view style="padding: 65rpx 35rpx;">
<uv-button :custom-style="customStyle" type="primary" shape="circle" color="#381615" @click="confirmClick"
:text="$t('pages_order.pay_order.pay_order')"></uv-button><!-- -->
</view>
</view>
</template>
<script>
import Navbar from '@/pages/components/Navbar.vue'
import {
globalMixin
} from '../pages/mixins/globalMixin';
import Navbar from '@/pages/components/Navbar.vue'
import {
globalMixin
} from '../pages/mixins/globalMixin';
export default {
mixins: [globalMixin],
components: {
Navbar
},
data() {
return {
orderId: '',
dataInfo: {},
customStyle: {
color: '#FF5858'
},
num: 1,
code: '',//
}
},
onLoad(e) {
this.orderId = e.id
this.getorderInfo()
},
computed: {
orderStatus() {
let state = this.dataInfo.state
const statusKeys = [
'pages_order.pay_order.status.unpaid', //
'pages_order.pay_order.status.pending', //
'pages_order.pay_order.status.completed', //
'pages_order.pay_order.status.cancelled' //
]
return this.$t(statusKeys[state] || statusKeys[3])
},
ticketName() {
const typeIndex = this.dataInfo.typePrice || 0
const typeKeys = [
'pages_order.pay_order.ticket_types.early_bird', //
'pages_order.pay_order.ticket_types.single_ticket', //
'pages_order.pay_order.ticket_types.premium_ticket' //
]
return this.$t(typeKeys[typeIndex] || typeKeys[0])
},
showOrderId() {//0 1
let id = ""
if (this.dataInfo.type == 0) {
id = this.dataInfo.activityOrderId
} else {
id = this.dataInfo.travelOrderId
}
return id
},
images() {
return this.dataInfo.image && this.dataInfo.image.split(',')[0]
},
},
methods: {
getTitle() {
if (!this.dataInfo) return ''
return this.dataInfo.type == 0
? this.$ot(this.dataInfo.activity, 'active', 'title')
: this.$ot(this.dataInfo.travel, 'travel', 'title')
},
getAddress() {
if (!this.dataInfo) return ''
return this.dataInfo.type == 0
? this.$ot(this.dataInfo.activity, 'active', 'address')
: this.$ot(this.dataInfo.travel, 'travel', 'address')
},
getorderInfo() {
this.$api('orderInfo', { orderId: this.orderId }, res => {
if (res.code == 200) {
this.dataInfo = res.result.orderDetails
}
})
},
confirmClick(typePrice) {
this.$api('createOrderPay', {
id: this.orderId,
num: this.num,
code: this.code,
}, res => {
if (res.code === 200) {
uni.requestPaymentWxPay(res)
.then(res => {
uni.showToast({
title: this.$t('pages_order.pay_order.payment_success'), //
icon: 'none'
})
export default {
mixins: [globalMixin],
components: {
Navbar
},
data() {
return {
orderId:'',
dataInfo: {},
customStyle:{
color:'#FF5858'
},
num : 1,
code : '',//
typeList:[
{
name:'早鸟票',
price:168
},
{
name:'单人票',
price:198.01
},
{
name:'尊享票',
price:268
}
],
}
},
onLoad(e) {
this.orderId = e.id
this.getorderInfo()
},
computed:{
orderStatus() {
let text = ""
let state = this.dataInfo.state
if( state == 0) {
text = '未付款'
}else if(state == 1) {
text = '待参加'
}else if(state == 2) {
text = '已完成'
}else{
text = '已取消'
}
return text
},
showOrderId() {//0 1
let id = ""
if(this.dataInfo.type == 0) {
id = this.dataInfo.activityOrderId
}else{
id = this.dataInfo.travelOrderId
}
return id
},
images(){
return this.dataInfo.image && this.dataInfo.image.split(',')[0]
},
},
methods:{
getorderInfo() {
this.$api('orderInfo',{orderId:this.orderId},res=>{
if(res.code == 200) {
this.dataInfo = res.result.orderDetails
}
})
},
confirmClick(typePrice) {
this.$api('createOrderPay',{
id:this.orderId,
num : this.num,
code : this.code,
},res=>{
if(res.code === 200) {
uni.requestPaymentWxPay(res)
.then(res => {
uni.showToast({
title: '支付成功',
icon: 'none'
})
setTimeout(uni.switchTab, 800, {
url: '/pages/index/cart'
})
}).catch(n => {
setTimeout(uni.navigateBack, 800, -1)
})
}
})
}
}
}
setTimeout(uni.switchTab, 800, {
url: '/pages/index/cart'
})
}).catch(n => {
setTimeout(uni.navigateBack, 800, -1)
})
}
})
}
}
}
</script>
<style scoped lang="scss">
.orderDetails {
padding-bottom: 80rpx;
}
.details {
padding: 50rpx 40rpx;
.orderDetails {
padding-bottom: 80rpx;
}
.details {
padding: 50rpx 40rpx;
/deep/.uv-cell {
.uv-cell__body {
padding: 0rpx;
padding-bottom: 30rpx;
}
/deep/.uv-cell {
.uv-cell__body {
padding: 0rpx;
padding-bottom: 30rpx;
}
&:last-child {
.uv-cell__body {
padding-bottom: 0rpx;
}
}
&:last-child {
.uv-cell__body {
padding-bottom: 0rpx;
}
}
.uv-cell__body__content {
.uv-cell__title-text {
color: $uni-text-color-grey !important;
font-size: 28rpx
}
}
.uv-cell__body__content {
.uv-cell__title-text {
color: $uni-text-color-grey !important;
font-size: 28rpx
}
}
.uv-cell__value {
color: #DCDCDC !important;
font-size: 28rpx
}
.uv-cell__value {
color: #DCDCDC !important;
font-size: 28rpx
}
}
}
}
}
.orderDetails {
margin-top: 40rpx;
.orderDetails {
margin-top: 40rpx;
/deep/.uv-navbar__content__title {
color: #fff;
}
/deep/.uv-navbar__content__title {
color: #fff;
}
.content {
padding: 0 35rpx;
color: #fff;
padding-top: calc(var(--status-bar-height) + 110rpx);
.content {
padding: 0 35rpx;
color: #fff;
padding-top: calc(var(--status-bar-height) + 110rpx);
.baseInfo {
.statusBox {
display: flex;
align-items: center;
padding: 33rpx 47rpx 24rpx;
.baseInfo {
.statusBox {
display: flex;
align-items: center;
padding: 33rpx 47rpx 24rpx;
i {
background: url('@/static/image/cart/U-status.png') no-repeat;
background-size: 100% 100%;
display: block;
width: 39rpx;
height: 34rpx;
margin-right: 15rpx;
}
i {
background: url('@/static/image/cart/U-status.png') no-repeat;
background-size: 100% 100%;
display: block;
width: 39rpx;
height: 34rpx;
margin-right: 15rpx;
}
.status {
font-size: 32rpx;
}
}
}
.status {
font-size: 32rpx;
}
}
}
.orderInfo,
.tips {
.title {
font-size: 29rpx;
padding-bottom: 26rpx;
margin-top: 36rpx;
}
.orderInfo,
.tips {
.title {
font-size: 29rpx;
padding-bottom: 26rpx;
margin-top: 36rpx;
}
.details {
background-color: $uni-color-card-background;
border-radius: 26rpx;
}
}
.details {
background-color: $uni-color-card-background;
border-radius: 26rpx;
}
}
.tips {
.details {
p {
color: #CCC;
font-size: 25rpx;
line-height: 50rpx;
}
}
}
}
}
.tips {
.details {
p {
color: #CCC;
font-size: 25rpx;
line-height: 50rpx;
}
}
}
}
}
</style>

+ 29
- 30
pages_zlx/zlx-form.vue View File

@ -2,11 +2,11 @@
<view class="page">
<view class="head-box"></view>
<uv-navbar autoBack
title="主理人认证"
:title="$t('pages_zlx.zlx_form.title')"
leftIconColor="#fff"
:bgColor="bgColor"
height="100rpx"
:titleStyle="{color:'#fff'}"></uv-navbar>
:titleStyle="{color:'#fff'}"></uv-navbar><!-- -->
<view class="content">
<view class="user-box">
@ -18,34 +18,34 @@
</view>
<view class="id-box">
<text>ID:{{userInfo.id}}</text>
<text class="copy-text" @click.stop="copy">复制</text>
<text class="copy-text" @click.stop="copy">{{$t('pages_zlx.zlx_form.copy')}}</text><!-- 复制 -->
</view>
</view>
</view>
<view class="base-msg">
<view class="title-box">基础信息</view>
<view class="title-box">{{$t('pages_zlx.zlx_form.basic_info')}}</view><!-- 基础信息 -->
<view class="form-box">
<view class="form-box-line">
<view class="label-box">真实姓名</view>
<view class="label-box">{{$t('pages_zlx.zlx_form.real_name')}}</view><!-- 真实姓名 -->
<view class="value-box">
<uv-input placeholder="请输入真实姓名" v-model="info.name" border="none" color="#fff"></uv-input>
<uv-input :placeholder="$t('pages_zlx.zlx_form.enter_real_name')" v-model="info.name" border="none" color="#fff"></uv-input><!-- 请输入真实姓名 -->
</view>
</view>
<view class="form-box-line">
<view class="label-box">联系方式</view>
<view class="label-box">{{$t('pages_zlx.zlx_form.contact_info')}}</view><!-- 联系方式 -->
<view class="value-box">
<uv-input placeholder="请输入联系方式" v-model="info.phone" type="number" border="none" color="#fff"></uv-input>
<uv-input :placeholder="$t('pages_zlx.zlx_form.enter_contact_info')" v-model="info.phone" type="number" border="none" color="#fff"></uv-input><!-- 请输入联系方式 -->
</view>
</view>
<view class="form-box-line">
<view class="label-box">身份证号</view>
<view class="label-box">{{$t('pages_zlx.zlx_form.id_card')}}</view><!-- 身份证号 -->
<view class="value-box">
<uv-input placeholder="请输入身份证号" type="idcard" v-model="info.cardNo" border="none" color="#fff"></uv-input>
<uv-input :placeholder="$t('pages_zlx.zlx_form.enter_id_card')" type="idcard" v-model="info.cardNo" border="none" color="#fff"></uv-input><!-- 请输入身份证号 -->
</view>
</view>
<view class="form-box-line">
<view class="label-box">简历附件</view>
<view class="label-box">{{$t('pages_zlx.zlx_form.resume_attachment')}}</view><!-- 简历附件 -->
<view class="value-box">
<!-- <uv-input placeholder=" "
@ -59,23 +59,23 @@
</view>
<view class="upload-btn"
@click="uploadFile">上传简历</view>
@click="uploadFile">{{$t('pages_zlx.zlx_form.upload_resume')}}</view><!-- 上传简历 -->
</view>
</view>
<view class="form-box-line">
<view class="label-box">微信二维码</view>
<view class="label-box">{{$t('pages_zlx.zlx_form.wechat_qr_code')}}</view><!-- 微信二维码 -->
<view class="value-box">
<view style="width: 80rpx;height: 80rpx;">
<uv-image v-if="info.img" :src="info.img" width="80rpx" height="80rpx" @click="bigImg"></uv-image>
</view>
<view class="upload-btn" @click="upImg">上传图片</view>
<view class="upload-btn" @click="upImg">{{$t('pages_zlx.zlx_form.upload_image')}}</view><!-- 上传图片 -->
</view>
</view>
</view>
</view>
<view class="xie-box">
<view class="title-box">个人生活照片含全身照</view>
<view class="title-box">{{$t('pages_zlx.zlx_form.personal_photos_title')}}</view><!-- 个人生活照片含全身照 -->
<view class="xie-box-val">
<uv-upload
:fileList="fileList"
@ -83,7 +83,6 @@
:maxCount="9"
width="180rpx"
height="180rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
</uv-upload>
@ -91,12 +90,12 @@
</view>
<view class="xie-box">
<view class="title-box">阅读并同意协议</view>
<view class="title-box">{{$t('pages_zlx.zlx_form.agreement_title')}}</view><!-- 阅读并同意协议 -->
<view class="xie-box-val">
<view class="val-text">
<view>我已经阅读并同意</view>
<view>{{$t('pages_zlx.zlx_form.agreement_text')}}</view><!-- 我已经阅读并同意 -->
<view class="xieyi-val"
@click="$utils.navigateTo('/pages_login/yinsixieyi?key=vip_text')">主理人协议</view>
@click="$utils.navigateTo('/pages_login/yinsixieyi?key=vip_text')">{{$t('pages_zlx.zlx_form.agreement_link')}}</view><!-- 主理人协议 -->
</view>
<view class="choose-box" @click="isAgree = !isAgree">
<view class="normol-box" v-if="!isAgree"></view>
@ -107,11 +106,11 @@
</view>
<view class="btn-box" v-if="info.state != 1">
<uv-button text="保存" color="#381615" shape="circle" :customStyle="btnCustomStyle" @click="confrim"></uv-button>
<uv-button :text="$t('pages_zlx.zlx_form.save')" color="#381615" shape="circle" :customStyle="btnCustomStyle" @click="confrim"></uv-button><!-- 保存 -->
</view>
<view class="btn-box" v-else>
<uv-button text="已审核通过" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button>
<uv-button :text="$t('pages_zlx.zlx_form.approved')" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button><!-- -->
</view>
</view>
</template>
@ -199,7 +198,7 @@
this.$api('updateInfo',this.info, res => {
if (res.code == 200) {
uni.showToast({
title:'保存成功',
title: this.$t('pages_zlx.zlx_form.save_success'), //
icon:'none'
})
}
@ -233,19 +232,19 @@
data:this.userInfo.id,
success: () => {
uni.showToast({
title:'复制成功',
title: this.$t('pages_zlx.zlx_form.copy_success'), //
icon:'none'
})
}
})
},
confrim() {
if(!this.isAgree) return this.$Toast('请先阅读并同意《主理人协议》')
if(!this.info.name) return this.$Toast('请输入姓名')
if(!this.info.phone) return this.$Toast('请输入联系方式')
if(!this.$utils.verificationPhone(this.info.phone)) return this.$Toast('请输入正确的联系方式')
if(!this.info.cardNo) return this.$Toast('请输入身份证号')
if(this.info.cardNo.length != 18) return this.$Toast('请输入正确的身份证号')
if(!this.isAgree) return this.$Toast(this.$t('pages_zlx.zlx_form.please_agree_agreement')) //
if(!this.info.name) return this.$Toast(this.$t('pages_zlx.zlx_form.please_enter_name')) //
if(!this.info.phone) return this.$Toast(this.$t('pages_zlx.zlx_form.please_enter_contact')) //
if(!this.$utils.verificationPhone(this.info.phone)) return this.$Toast(this.$t('pages_zlx.zlx_form.please_enter_correct_contact')) //
if(!this.info.cardNo) return this.$Toast(this.$t('pages_zlx.zlx_form.please_enter_id_card')) //
if(this.info.cardNo.length != 18) return this.$Toast(this.$t('pages_zlx.zlx_form.please_enter_correct_id_card')) //
let params = {
name:this.info.name,
phone:this.info.phone,
@ -258,7 +257,7 @@
// if(!this.info.image) return this.$Toast('')
this.$api('joinRecruit',params,res=>{
if(res.code == 200) {
this.$Toast('提交成功')
this.$Toast(this.$t('pages_zlx.zlx_form.submit_success')) //
setTimeout(uni.navigateBack, 800, -1)
}
})


+ 18
- 17
store/store.js View File

@ -4,6 +4,7 @@ import Vuex from 'vuex'
Vue.use(Vuex); //vue的插件机制
import api from '@/api/api.js'
import i18n from '@/locale/index.js'
//Vuex.Store 构造器选项
const store = new Vuex.Store({
@ -42,7 +43,7 @@ const store = new Vuex.Store({
},
login(state,commit){
uni.showLoading({
title: '登录中...'
title: i18n.t('common.logging_in') // 登录中...
})
uni.login({
success(res) {
@ -87,17 +88,17 @@ const store = new Vuex.Store({
uni.setStorageSync('userInfo',JSON.stringify(res.result))
state.userInfo = res.result
// if(!state.userInfo.nickName ||
// !state.userInfo.headImage ||
// !state.userInfo.phone ||
// !state.userInfo.sex){
// uni.showToast({
// title: '请您先完善必要信息'
// })
// uni.navigateTo({
// url: '/pages_login/wxUserInfo'
// })
// }
if(!state.userInfo.nickName ||
!state.userInfo.headImage ||
!state.userInfo.phone ||
!state.userInfo.sex){
uni.showToast({
title: i18n.t('pages_order.huodong_detail.complete_info_required') // 请您先完善必要信息
})
uni.navigateTo({
url: '/pages_login/wxUserInfo'
})
}
}
})
},
@ -113,7 +114,7 @@ const store = new Vuex.Store({
// 退出登录
logout(state){
uni.showModal({
title: '确认退出登录吗',
title: i18n.t('common.confirm_logout'), // 确认退出登录吗
success(r) {
if (r.confirm) {
state.userInfo = {}
@ -131,10 +132,10 @@ const store = new Vuex.Store({
api('getArea', res => {
if(res.code == 200){
res.result.unshift({
city : '全部',
id : '',
})
res.result.unshift({
city : i18n.t('common.all'), // 全部
id : '',
})
state.areaList = res.result
fn && fn(res.result)


Loading…
Cancel
Save