Commit be3dbdc9 authored by chenwei's avatar chenwei

Merge branch 'feature' into 'release'

fenxiang

See merge request !8
parents 5eb1bd53 34046dae
...@@ -4,10 +4,13 @@ ...@@ -4,10 +4,13 @@
let Authorization = uni.getStorageSync('Authorization') let Authorization = uni.getStorageSync('Authorization')
if((!Authorization || Authorization == '')){ if((!Authorization || Authorization == '')){
if(this.$route.path != '/pages/register/register' && this.$route.path != '/pages/activityShare/index' ){
uni.redirectTo({ uni.redirectTo({
url: './pages/login/login' url: './pages/login/login'
}) })
} }
}
if(Authorization && !this.$store.state.userInfo){ if(Authorization && !this.$store.state.userInfo){
this.$store.dispatch('updateUserInfo') this.$store.dispatch('updateUserInfo')
} }
......
...@@ -303,6 +303,12 @@ ...@@ -303,6 +303,12 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/activityShare/index",
"style": {
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {
......
<template>
<view class="activity_detail">
<view class="detail">
<dHeader :title="language=='zh'?'活动详情':'activity Detasil'"></dHeader>
<view class="title">{{language=='zh' ?detailInfo.titleZh:detailInfo.titleEn }}</view>
<view class="container">
<img class="coverImg" :src="language=='zh' ?detailInfo.coverImageZh:detailInfo.coverImageEn" alt="" srcset="">
<view class="activityDesc" v-html="language=='zh' ?detailInfo.extraShare.activityDescZh:detailInfo.extraShare.activityDescEn"></view>
</view>
</view>
</view>
</template>
<script>
import dHeader from "../../components/dHeader/index.vue"
export default {
components: {
dHeader
},
data() {
return {
id: null,
memberCode:"",
detailInfo: {
extraShare:{
activityDescZh:''
}
},
language:"zh"
}
},
onLoad(route) {
console.log(route)
this.id = route.id
this.memberCode = route.memberId
this.getDetail()
},
computed: {
locale() {
return this.$lang.locale
},
detail() {
return this.$lang.lang.detail
}
},
methods: {
// 获取详情
getDetail() {
this.$request
.post("/app-api/member/score-rule/get", { id: this.id })
.then(({ code, data }) => {
if (code === 0 && data) {
this.detailInfo = data
this.handleTriggerShare()
}
})
},
handleTriggerShare(){
this.$request
.get("/app-api/member/score-rule/trigger/share", {userId: this.memberCode, ruleId:this.id })
.then(({ code, data }) => {
if (code === 0 && data) {
this.detailInfo = data
}
})
}
// 时间范围返回
}
}
</script>
<style lang="scss">
.activityDesc{
padding: 20upx;
}
.activity_detail{
max-width: 750upx;
.title{
padding: 20upx;
font-size: 16px;
font-weight: 600;
}
.coverImg{
width: 100%;
}
}
page {
/* #ifdef H5 */
padding-top: 140upx;
/* #endif */
/* #ifdef APP-PLUS */
padding-top: calc(var(--status-bar-height) + 100upx);
/* #endif */
background-color: #d4e5fe;
}
.container {
// padding: 20upx;
// background-color: #fff;
// border-radius: 20upx;
}
.img-box {
width: 100%;
height: 400upx;
display: flex;
justify-content: center;
align-items: center;
.img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.container-main {
padding: 12upx;
}
.activity-title {
font-size: 28upx;
height: 84upx;
display: flex;
align-items: center;
color: var(--c2);
}
.activity-remark {
font-size: 24upx;
color: #7f7f7f;
}
.activity-cell {
margin-top: 20upx;
width: 100%;
display: flex;
justify-content: space-between;
}
.cell-label {
font-size: 24upx;
color: #7f7f7f;
}
.cell-content {
display: flex;
align-items: center;
flex-wrap: wrap;
font-size: 24upx;
color: #7f7f7f;
}
.cell-image {
width: 24upx;
height: 24upx;
}
.cell-text {
margin-left: 6upx;
font-weight: 600;
font-size: 26upx;
color: #000;
}
</style>
<template> <template>
<view class="int"> <view class="int">
<view <view
class="int-content"
v-for="item in activityList" v-for="item in activityList"
:key="item.id" :key="item.id"
@click="toDetail(item.id)" class="contentBox"
> >
<view class="int-content" @click="toDetail(item.id)">
<view class="int-content-left"> <view class="int-content-left">
<view class="content-tag"> <view class="content-tag">
<view class="tag-text">{{ locale === 'zh' ? item.typeZh : item.typeEn }}</view> <view class="tag-text">{{ locale === 'zh' ? item.typeZh : item.typeEn }}</view>
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
<view class="content-text">{{ locale === 'zh' ? item.descZh : item.descEn }}</view> <view class="content-text">{{ locale === 'zh' ? item.descZh : item.descEn }}</view>
</view> </view>
</view> </view>
<view v-if="item.type == 3||item.type == 4" class="btn" @click="handleCopyBtn(item, $event)">
{{ $lang.lang.integral.copy }}
</view>
</view>
</view> </view>
</template> </template>
...@@ -39,6 +43,41 @@ export default { ...@@ -39,6 +43,41 @@ export default {
} }
}, },
methods: { methods: {
getCopyText(item) {
if (item.type == 3) {
return `${this.locale === 'zh' ? item.extraRecommend.shareContentZh : item.extraRecommend.shareContentEn} ${item.recommendUrl} `
} else if (item.type == 4) {
return `${this.locale === 'zh' ? item.titleZh
: item.titleEn} ${item.extraShare.activityUrl}?id=${item.id}&memberId=${this.$store.getters.id}&language=${this.locale}`
}
},
handleCopyBtn(item ,e){
this.$request
.post('/app-api/member/score-rule/share-record/create', { memberId: this.$store.getters.id,
ruleId: item.id })
.then(({ code, data }) => {
if (code == 0 && data) {
const str =this.getCopyText(item)
uni.setClipboardData({
data:str,
success:()=>{
uni.showToast({
title:this.$lang.lang.notices.copySuccess,
icon:"none",
})
}
})
// uni.navigateTo({
// url: '/pages/activityShare/index?id=' + item.id + '&memberId=' + this.$store.getters.id+ '&language='+this.locale
// })
}
})
},
toDetail(id) { toDetail(id) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/activity_detail/activity_detail?id=' + id url: '/pages/activity_detail/activity_detail?id=' + id
...@@ -47,7 +86,7 @@ export default { ...@@ -47,7 +86,7 @@ export default {
// 获取活动列表 // 获取活动列表
getActivityList() { getActivityList() {
this.$request this.$request
.post('/app-api/member/score-rule/list', { platform: 2 }) .post('/app-api/member/score-rule/list', { platform: 2,memberId:this.$store.getters.id })
.then(({ code, data }) => { .then(({ code, data }) => {
// console.log(res) // console.log(res)
if (code == 0 && data) { if (code == 0 && data) {
...@@ -60,6 +99,19 @@ export default { ...@@ -60,6 +99,19 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.contentBox{
position: relative;
.btn{
position: absolute;
right: 6px;
bottom: 10upx;
padding: 2upx 12px;
border-radius: 100px;
font-size: 20upx;
border: 1px solid #5382fe;
color: #5382fe;
}
}
.int { .int {
padding: 30upx 0; padding: 30upx 0;
height: inherit; height: inherit;
......
...@@ -161,6 +161,7 @@ export default { ...@@ -161,6 +161,7 @@ export default {
areaData: [], areaData: [],
areaName: [], areaName: [],
loginType: 1, loginType: 1,
closePopup:true,
leviteInfo: '', leviteInfo: '',
mobile: '', mobile: '',
password: '', password: '',
......
<template> <template>
<view class="main"> <view class="main">
<!-- #ifdef H5 -->
<view class="downloadBox" v-if="closePopup">
<image class="logoImg"
src="/static/img/logo.76c4d986.png"
></image>
<view class="textAlert">捷道国际货运APP</view>
<view class="downloadBtn" @click="handleDownload">立即下载</view>
<view class="closeBtn-l" @click="closePopup= false">X</view>
</view>
<!-- #endif -->
<view class="login-top"> <view class="login-top">
<image <image
src="../../static/img/back.png" src="../../static/img/back.png"
...@@ -126,6 +136,7 @@ export default { ...@@ -126,6 +136,7 @@ export default {
}, },
data() { data() {
return { return {
closePopup: true,
areaIndex: 0, areaIndex: 0,
mobile: "", mobile: "",
password: "", password: "",
...@@ -140,8 +151,18 @@ export default { ...@@ -140,8 +151,18 @@ export default {
}, },
onLoad() { onLoad() {
this.Country(); this.Country();
this.referralCode= this.$route.query.code
}, },
methods: { methods: {
handleDownload(){
if (uni.getSystemInfoSync().platform === 'android') {
console.log('运行Android上')
window.open('https://www.pgyer.com/qHcSOD1F', "_blank")
} else {
window.open('https://apps.apple.com/cn/app/e-c-logistics/id6466407990', "_blank")
console.log('运行iOS上')
}
},
showUser() { showUser() {
this.$refs.userment.open(); this.$refs.userment.open();
}, },
...@@ -289,4 +310,39 @@ export default { ...@@ -289,4 +310,39 @@ export default {
</script> </script>
<style> <style>
@import url(../../static/css/register.css); @import url(../../static/css/register.css);
.downloadBox{
height: 100upx;
position: absolute;
top: 0;
left: 0;
width: 100%;
background: #373333c7;
padding: 10upx 54upx;
display: flex;
z-index: 10;
align-items: center;
}
.textAlert{
padding: 0 40upx;
color: #fff;
}
.logoImg{
height: 60upx;
width: 60upx;
}
.downloadBtn{
background: #5BA8DC;
padding: 4upx 20upx;
color:#fff ;
font-size: 36upx;
border-radius: 100px;
}
.closeBtn-l{
color: #fff;
font-size: 24upx;
padding: 8px;
top: 0px;
position: absolute;
right: 70px;
}
</style> </style>
...@@ -31,38 +31,38 @@ import finsh from './en/finsh.js' ...@@ -31,38 +31,38 @@ import finsh from './en/finsh.js'
import orderInfo from './en/orderInfo.js' import orderInfo from './en/orderInfo.js'
import price from './en/price.js' import price from './en/price.js'
import site from './en/site.js' import site from './en/site.js'
export default{ export default {
notices, notices,
auth, auth,
addressInfo, addressInfo,
boxException, boxException,
changeTel, changeTel,
companyInfo, companyInfo,
complaint, complaint,
complaintAdd, complaintAdd,
consult, consult,
coupon, coupon,
create, create,
docException, docException,
detail, detail,
ecash, ecash,
editEmail, editEmail,
editPsd, editPsd,
exception, exception,
forget, forget,
help, help,
index, index,
integral, integral,
levite, levite,
light, light,
login, login,
log, log,
msg, msg,
myInfo, myInfo,
notice, notice,
order, order,
finsh, finsh,
orderInfo, orderInfo,
price, price,
site, site,
} }
export default { export default {
"info": "my integral", copy: 'copy',
"headerTitle": "Honorable", info: 'my integral',
"spend": "redeemed points are", headerTitle: 'Honorable',
"available": "The available credits are", spend: 'redeemed points are',
"logPoints": "points log", available: 'The available credits are',
"logExchange": "exchange log", logPoints: 'points log',
"redeemGifts": "redeem gifts", logExchange: 'exchange log',
"pointsCampaign": "points campaign", redeemGifts: 'redeem gifts',
"pointsRemark": "Points can be redeemed differently at different outlets", pointsCampaign: 'points campaign',
"outlets": "Please select a location", pointsRemark: 'Points can be redeemed differently at different outlets',
"orderMail": "Confirm the order", outlets: 'Please select a location',
"code": "Get a verification code", orderMail: 'Confirm the order',
"codePlaceloader": "Please enter a verification code", code: 'Get a verification code',
"codeError": "The verification code is incorrect", codePlaceloader: 'Please enter a verification code',
"remark": "Please enter a comment", codeError: 'The verification code is incorrect',
"submitOrder": "Submit your order", remark: 'Please enter a comment',
"redeemType": "Redemption Method", submitOrder: 'Submit your order',
"activityTime": "Event time", redeemType: 'Redemption Method',
"textLength": "Enter up to 100 words", activityTime: 'Event time',
"totalScore1": "integral", textLength: 'Enter up to 100 words',
"addAddress": "new address for additional shipments", totalScore1: 'integral',
"totalScoreError": "Insufficient points", addAddress: 'new address for additional shipments',
"to": "to" totalScoreError: 'Insufficient points',
to: 'to',
} }
...@@ -31,38 +31,38 @@ import finsh from './zh/finsh.js' ...@@ -31,38 +31,38 @@ import finsh from './zh/finsh.js'
import orderInfo from './zh/orderInfo.js' import orderInfo from './zh/orderInfo.js'
import price from './zh/price.js' import price from './zh/price.js'
import site from './zh/site.js' import site from './zh/site.js'
export default{ export default {
notices, notices,
auth, auth,
addressInfo, addressInfo,
boxException, boxException,
changeTel, changeTel,
companyInfo, companyInfo,
complaint, complaint,
complaintAdd, complaintAdd,
consult, consult,
coupon, coupon,
create, create,
docException, docException,
detail, detail,
ecash, ecash,
editEmail, editEmail,
editPsd, editPsd,
exception, exception,
forget, forget,
help, help,
index, index,
integral, integral,
levite, levite,
light, light,
login, login,
log, log,
msg, msg,
myInfo, myInfo,
notice, notice,
order, order,
finsh, finsh,
orderInfo, orderInfo,
price, price,
site, site,
} }
export default { export default {
"info": "我的积分", copy: '复制',
"headerTitle": "尊贵的", info: '我的积分',
"spend": "已兑换积分为", headerTitle: '尊贵的',
"available": "可用积分为", spend: '已兑换积分为',
"logPoints": "积分日志", available: '可用积分为',
"logExchange": "兑换日志", logPoints: '积分日志',
"redeemGifts": "兑换礼品", logExchange: '兑换日志',
"pointsCampaign": "积分活动", redeemGifts: '兑换礼品',
"pointsRemark": "不同网点兑换积分不同", pointsCampaign: '积分活动',
"outlets": "请选择网点", pointsRemark: '不同网点兑换积分不同',
"orderMail": "确定订单", outlets: '请选择网点',
"code": "获取验证码", orderMail: '确定订单',
"codePlaceloader": "请输入验证码", code: '获取验证码',
"codeError": "验证码错误", codePlaceloader: '请输入验证码',
"remark": "请输入备注", codeError: '验证码错误',
"submitOrder": "提交订单", remark: '请输入备注',
"redeemType": "兑换方式", submitOrder: '提交订单',
"activityTime": "活动时间", redeemType: '兑换方式',
"textLength": "最多输入100字", activityTime: '活动时间',
"totalScore1": "积分", textLength: '最多输入100字',
"addAddress": "新增收货地址", totalScore1: '积分',
"totalScoreError": "积分不足", addAddress: '新增收货地址',
"to": "" totalScoreError: '积分不足',
to: '',
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment