refactor: 重构代码以支持i18n国际化 feat(locale): 添加多语言配置文件 feat(components): 国际化组件文本 feat(pages): 国际化页面文本 feat(store): 更新用户信息获取逻辑 docs: 添加国际化配置文档master
@ -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> |
@ -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> |
@ -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" | |||
} | |||
} | |||
} | |||
} |
@ -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 |
@ -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", | |||
} | |||
} | |||
} |
@ -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": "参与成功" | |||
} | |||
} | |||
} | |||
} |
@ -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,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> |