Commit 1c0ae7a3 authored by chenwei's avatar chenwei

复制分享和推荐 功能

parent 4bdadadf
...@@ -570,80 +570,80 @@ export default { ...@@ -570,80 +570,80 @@ export default {
view: "view", view: "view",
}, },
orderdetail: { orderdetail: {
orderNo: 'orderNo', orderNo: "orderNo",
deliveryDate: 'deliveryDate', deliveryDate: "deliveryDate",
transport: 'transportation', transport: "transportation",
channel: 'Delivery channels', channel: "Delivery channels",
startTitle: 'Original warehouse', startTitle: "Original warehouse",
destTitle: 'Destination warehouse', destTitle: "Destination warehouse",
startAddress: 'startAddress', startAddress: "startAddress",
consignorName: 'consignorName', consignorName: "consignorName",
consignorCompany: 'consignorCompany', consignorCompany: "consignorCompany",
consignorNameEn: 'English consignorName', consignorNameEn: "English consignorName",
consignorCompanyEn: 'English consignorCompany', consignorCompanyEn: "English consignorCompany",
consignorPhone: 'consignorPhone', consignorPhone: "consignorPhone",
consignorEmail: 'consignorEmail', consignorEmail: "consignorEmail",
consigneeName: 'consigneeName', consigneeName: "consigneeName",
consigneeCompany: 'consigneeCompany', consigneeCompany: "consigneeCompany",
consigneeNameEn: 'English consigneeName', consigneeNameEn: "English consigneeName",
consigneeCompanyEn: ' English consigneeCompany', consigneeCompanyEn: " English consigneeCompany",
consigneeEmail: 'consigneeEmail', consigneeEmail: "consigneeEmail",
consigneePhone: 'consigneePhone', consigneePhone: "consigneePhone",
marks: 'marks', marks: "marks",
isCargoControl: 'Is cargo on hold', isCargoControl: "Is cargo on hold",
baseInfo: 'baseInfo', baseInfo: "baseInfo",
transportInfo: 'transport', transportInfo: "transport",
costVO: 'orderInfo', costVO: "orderInfo",
box: 'CTNS', box: "CTNS",
is: 'yes', is: "yes",
no: 'no', no: "no",
warehouseNum: 'warehouseNum', warehouseNum: "warehouseNum",
entry: 'receipt data ', entry: "receipt data ",
warehouseType: 'warehouseType', warehouseType: "warehouseType",
customsType: 'Customs declaration', customsType: "Customs declaration",
isCollection: 'collection', isCollection: "collection",
activeFirst: 'Details of the goods', activeFirst: "Details of the goods",
activeSecond: 'Order status', activeSecond: "Order status",
activeThree: 'Packing list', activeThree: "Packing list",
prodTitleZh: 'Chinese item name', prodTitleZh: "Chinese item name",
prodTitleEn: 'English item name', prodTitleEn: "English item name",
brand: 'brand', brand: "brand",
num: 'num', num: "num",
sumNum: 'sumNum', sumNum: "sumNum",
unit: 'unit', unit: "unit",
worth: 'worth', worth: "worth",
material: 'material', material: "material",
volume: 'volume(m3)', volume: "volume(m3)",
weight: 'weight(kg)', weight: "weight(kg)",
noData: 'noData', noData: "noData",
notOrderData: 'notOrderData', notOrderData: "notOrderData",
showWarehouseReceipt: 'showWarehouseReceipt', showWarehouseReceipt: "showWarehouseReceipt",
showLadingBill: 'showLadingBill', showLadingBill: "showLadingBill",
hiddenText: 'Show', hiddenText: "Show",
showText: 'Hide', showText: "Hide",
transInfo: 'Transportation information', transInfo: "Transportation information",
own: "selp pickup", own: "selp pickup",
toRoom: "to door", toRoom: "to door",
typeName:"value-added services", typeName: "value-added services",
service: "Gether transpotation", service: "Gether transpotation",
oversears: "overseas cargo", oversears: "overseas cargo",
consignor: "consignor", consignor: "consignor",
consignee: "consignee", consignee: "consignee",
objectport:'Destination port customs clearance', objectport: "Destination port customs clearance",
ourUndertakes:'Our company undertakes', ourUndertakes: "Our company undertakes",
customerUndertakes:'Customer Undertaking', customerUndertakes: "Customer Undertaking",
tiedanPrice:"Does the bill of lading display the price", tiedanPrice: "Does the bill of lading display the price",
warehouseName:"Warehouse", warehouseName: "Warehouse",
externalWarehouse:'External warehouse', externalWarehouse: "External warehouse",
estLoading:"Loading time", estLoading: "Loading time",
loadingAddress:"Loading address", loadingAddress: "Loading address",
creator:'creator', creator: "creator",
customerManage:"Customer Manager", customerManage: "Customer Manager",
prodTitle:"item name", prodTitle: "item name",
inWarehouseInfo:"Warehouse entry information", inWarehouseInfo: "Warehouse entry information",
packing:"packing", packing: "packing",
tiandanExpressNO:"prefill express tracking number", tiandanExpressNO: "prefill express tracking number",
feeData:'Fee data' feeData: "Fee data",
}, },
customer: { customer: {
none: "none", none: "none",
...@@ -882,6 +882,7 @@ export default { ...@@ -882,6 +882,7 @@ export default {
createTime: "createTime", createTime: "createTime",
}, },
integral: { integral: {
copyBtn: "Copy",
headerTitle: "Distinguished", headerTitle: "Distinguished",
spend: "Redeemed points are", spend: "Redeemed points are",
available: "Available credits are", available: "Available credits are",
......
...@@ -554,80 +554,80 @@ export default { ...@@ -554,80 +554,80 @@ export default {
view: "查看", view: "查看",
}, },
orderdetail: { orderdetail: {
orderNo: '订单编号', orderNo: "订单编号",
deliveryDate: '送货时间', deliveryDate: "送货时间",
transport: '运输方式', transport: "运输方式",
channel: '出货渠道', channel: "出货渠道",
startTitle: '始发仓', startTitle: "始发仓",
destTitle: '目的仓', destTitle: "目的仓",
startAddress: '地址', startAddress: "地址",
consignorName: '发货人', consignorName: "发货人",
consignorCompany: '发货人公司名称', consignorCompany: "发货人公司名称",
consignorNameEn: '发货人英文名称', consignorNameEn: "发货人英文名称",
consignorCompanyEn: '发货人公司英文名称', consignorCompanyEn: "发货人公司英文名称",
consignorPhone: '发货人电话', consignorPhone: "发货人电话",
consignorEmail: '发货人邮箱', consignorEmail: "发货人邮箱",
consigneeName: '收货人', consigneeName: "收货人",
consigneeCompany: '公司名称', consigneeCompany: "公司名称",
consigneeNameEn: '英文名称', consigneeNameEn: "英文名称",
consigneeCompanyEn: '公司英文名称', consigneeCompanyEn: "公司英文名称",
consigneeEmail: '邮箱', consigneeEmail: "邮箱",
consigneePhone: '电话', consigneePhone: "电话",
marks: '唛头', marks: "唛头",
isCargoControl: '是否控货', isCargoControl: "是否控货",
baseInfo: '基础', baseInfo: "基础",
transportInfo: '运输', transportInfo: "运输",
costVO: '填单信息', costVO: "填单信息",
box: '', box: "",
is: '', is: "",
no: '', no: "",
warehouseNum: '仓库实测', warehouseNum: "仓库实测",
entry: '收款数据', entry: "收款数据",
warehouseType: '入仓类型', warehouseType: "入仓类型",
customsType: '单证报关', customsType: "单证报关",
isCollection: '代收货款', isCollection: "代收货款",
activeFirst: '货物详情', activeFirst: "货物详情",
activeSecond: '订单动态', activeSecond: "订单动态",
activeThree: '运单资料/提货单', activeThree: "运单资料/提货单",
prodTitleZh: '中文品名', prodTitleZh: "中文品名",
prodTitleEn: '英文品名', prodTitleEn: "英文品名",
brand: '品牌', brand: "品牌",
num: '填单件数', num: "填单件数",
sumNum: '入仓件数', sumNum: "入仓件数",
unit: '单位', unit: "单位",
worth: '货值', worth: "货值",
material: '材质', material: "材质",
volume: '体积(m3)', volume: "体积(m3)",
weight: '重量(kg)', weight: "重量(kg)",
noData: '暂无数据', noData: "暂无数据",
notOrderData: '暂无订单动态数据', notOrderData: "暂无订单动态数据",
showWarehouseReceipt: '查看入仓单', showWarehouseReceipt: "查看入仓单",
showLadingBill: '查看提货单', showLadingBill: "查看提货单",
hiddenText: '隐藏', hiddenText: "隐藏",
showText: '展示', showText: "展示",
transInfo: '运输信息', transInfo: "运输信息",
own: "自提", own: "自提",
toRoom: "送货上门", toRoom: "送货上门",
typeName:"增值服务", typeName: "增值服务",
service: "集运", service: "集运",
oversears: "海外仓", oversears: "海外仓",
consignor: "发货人", consignor: "发货人",
consignee: "收货人", consignee: "收货人",
objectport:'目的港清关', objectport: "目的港清关",
ourUndertakes:'我司承接', ourUndertakes: "我司承接",
customerUndertakes:'客户承接', customerUndertakes: "客户承接",
tiedanPrice:"提单是否显示价格", tiedanPrice: "提单是否显示价格",
warehouseName:"仓库", warehouseName: "仓库",
externalWarehouse:'外部仓', externalWarehouse: "外部仓",
estLoading:"装柜时间", estLoading: "装柜时间",
loadingAddress:"装柜地址", loadingAddress: "装柜地址",
creator:'创建人', creator: "创建人",
customerManage:"客户经理", customerManage: "客户经理",
prodTitle:"品名", prodTitle: "品名",
inWarehouseInfo:"入仓信息", inWarehouseInfo: "入仓信息",
packing:"包装", packing: "包装",
tiandanExpressNO:"填单快递单号", tiandanExpressNO: "填单快递单号",
feeData:'收费数据' feeData: "收费数据",
}, },
customer: { customer: {
none: "", none: "",
...@@ -1146,6 +1146,7 @@ export default { ...@@ -1146,6 +1146,7 @@ export default {
prompt: "提示", prompt: "提示",
}, },
integral: { integral: {
copyBtn: "复制",
headerTitle: "尊贵的", headerTitle: "尊贵的",
spend: "已兑换积分为", spend: "已兑换积分为",
available: "可用积分为", available: "可用积分为",
...@@ -1153,8 +1154,8 @@ export default { ...@@ -1153,8 +1154,8 @@ export default {
logExchange: "兑换日志", logExchange: "兑换日志",
redeemGifts: "兑换礼品", redeemGifts: "兑换礼品",
pointsCampaign: "积分活动", pointsCampaign: "积分活动",
pointsTitle: "选择兑换网", pointsTitle: "选择提货",
pointsRemark: "不同点兑换积分不同", pointsRemark: "不同提货点兑换积分不同",
outlets: "请选择网点", outlets: "请选择网点",
remainder: `剩余{value}份`, remainder: `剩余{value}份`,
orderMail: "确定订单", orderMail: "确定订单",
......
...@@ -4,20 +4,30 @@ ...@@ -4,20 +4,30 @@
v-for="item in list" v-for="item in list"
:key="item.id" :key="item.id"
class="int-content" class="int-content"
@click="toDetail(item.id)"
> >
<div class="int-content-left"> <div class="box" @click="toDetail(item.id)">
<div class="content-tag"> <div class="int-content-left">
<div class="tag-text">{{ locale === 'zh_CN' ? item.typeZh : item.typeEn }}</div> <div class="content-tag">
<div class="tag-text">
{{ locale === "zh_CN" ? item.typeZh : item.typeEn }}
</div>
</div>
<img
class="content-image"
:src="locale === 'zh_CN' ? item.coverImageZh : item.coverImageEn"
>
</div>
<div class="int-content-right">
<div class="content-title">
{{ locale === "zh_CN" ? item.titleZh : item.titleEn }}
</div>
<div class="content-text">
{{ locale === "zh_CN" ? item.descZh : item.descEn }}
</div>
</div> </div>
<img
class="content-image"
:src="locale === 'zh_CN' ? item.coverImageZh : item.coverImageEn"
>
</div> </div>
<div class="int-content-right"> <div v-if="item.type == 3||item.type == 4" :class="'copyBtn copyBtn'+item.id" :data-clipboard-text="getCopyText(item)" @click="handleCopyBtn(item, $event)">
<div class="content-title">{{ locale === 'zh_CN' ? item.titleZh : item.titleEn }}</div> {{ $t("integral.copyBtn") }}
<div class="content-text">{{ locale === 'zh_CN' ? item.descZh : item.descEn }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -25,6 +35,7 @@ ...@@ -25,6 +35,7 @@
<script> <script>
import { integralActivityList } from '@/api/integral' import { integralActivityList } from '@/api/integral'
import ClipboardJS from 'clipboard'
export default { export default {
name: 'IntegralActivity', name: 'IntegralActivity',
data() { data() {
...@@ -41,10 +52,35 @@ export default { ...@@ -41,10 +52,35 @@ export default {
this.getIntegralList() this.getIntegralList()
}, },
methods: { methods: {
getCopyText(item) {
if (item.type == 3) {
return `${this.locale === 'zh_CN' ? item.extraRecommend.shareContentZh : item.extraRecommend.shareContentEn} ${item.recommendUrl} `
} else if (item.type == 4) {
return `${this.locale === 'zh_CN' ? item.titleZh
: item.titleEn} ${item.extraShare.activityUrl} `
}
},
// 复制按钮
handleCopyBtn(item, e) {
const clipboard = new ClipboardJS(`.copyBtn${item.id}`)
this.$nextTick(() => {
clipboard.on('success', () => {
this.$message.success(this.$t('复制成功'))
clipboard.destroy()
})
clipboard.on('error', () => {
this.$message.error(this.$t('复制失败'))
clipboard.destroy()
})
})
},
// 获取活动列表 // 获取活动列表
async getIntegralList() { async getIntegralList() {
try { try {
const { code, data } = await integralActivityList({ platform: 3 }) const { code, data } = await integralActivityList({
platform: 3,
memberId: this.$store.getters.id
})
if (code !== 0) return if (code !== 0) return
this.list = data this.list = data
} catch (err) { } catch (err) {
...@@ -65,6 +101,10 @@ export default { ...@@ -65,6 +101,10 @@ export default {
height: inherit; height: inherit;
overflow-y: auto; overflow-y: auto;
} }
.box{
display: flex;
width: 100%;
}
.int-content { .int-content {
margin-bottom: 10px; margin-bottom: 10px;
width: 100%; width: 100%;
...@@ -73,6 +113,17 @@ export default { ...@@ -73,6 +113,17 @@ export default {
padding: 0 15px; padding: 0 15px;
box-sizing: border-box; box-sizing: border-box;
border-bottom: 1px solid #e7e7e7; border-bottom: 1px solid #e7e7e7;
position: relative;
.copyBtn{
position: absolute;
right: 0;
bottom: 10px;
border: 1px solid #2c78eb;
color:#2c78eb;
font-size: 14px;
padding: 4px 20px;
border-radius: 100px;
}
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
...@@ -86,15 +137,19 @@ export default { ...@@ -86,15 +137,19 @@ export default {
height: 100px; height: 100px;
} }
} }
.int-content-right { .int-content-right {
flex: 1; flex: 1;
height: inherit; height: inherit;
padding-left: 10px; padding-left: 10px;
box-sizing: border-box; box-sizing: border-box;
position: relative;
.content-title { .content-title {
font-size: 14px; font-size: 14px;
color: #333; color: #333;
margin-bottom: 10px; margin-bottom: 10px;
} }
.content-text { .content-text {
font-size: 12px; font-size: 12px;
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
}" }"
class="cascader" class="cascader"
:options="nodeList" :options="nodeList"
@visible-change="changeSelect"
:placeholder="$t('integral.outlets')" :placeholder="$t('integral.outlets')"
@visible-change="changeSelect"
/> />
</div> </div>
<div class="list"> <div class="list">
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
class="imgs" class="imgs"
:src="language == 'zh_CN' ? item.imgZh : item.imgEn" :src="language == 'zh_CN' ? item.imgZh : item.imgEn"
alt="" alt=""
/> >
<div class="gift-tag"> <div class="gift-tag">
<div class="tags"> <div class="tags">
<img class="tag-image" src="@/assets/integral/score.png" /> <img class="tag-image" src="@/assets/integral/score.png">
<div class="tag-text">{{ item.pointsRequire }}</div> <div class="tag-text">{{ item.pointsRequire }}</div>
</div> </div>
</div> </div>
...@@ -62,9 +62,10 @@ ...@@ -62,9 +62,10 @@
</template> </template>
<script> <script>
import { integralList, getBranchList } from "@/api/integral"; import { integralList, getBranchList } from '@/api/integral'
export default { export default {
name: "IntegralExchange", name: 'IntegralExchange',
data() { data() {
return { return {
list: [], list: [],
...@@ -72,72 +73,73 @@ export default { ...@@ -72,72 +73,73 @@ export default {
nodeList: [], nodeList: [],
selectedNodeId: null, selectedNodeId: null,
checkStrictly: true, checkStrictly: true,
cascaderState: true, cascaderState: true
}; }
}, },
computed: { computed: {
language() { language() {
this.cascaderState = false; // eslint-disable-next-line vue/no-side-effects-in-computed-properties
this.cascaderState = false
this.$nextTick(() => { this.$nextTick(() => {
this.cascaderState = true; this.cascaderState = true
}); })
return this.$store.getters.language; return this.$store.getters.language
}, }
}, },
watch: { watch: {
selectedNodeId(val) { selectedNodeId(val) {
if (val && val.length > 2) { if (val && val.length > 2) {
this.nodeId = val[val.length - 1]; this.nodeId = val[val.length - 1]
this.getIntegralList(); this.getIntegralList()
} }
}, }
}, },
created() { created() {
this.getIntegralList(); this.getIntegralList()
this.getNodeInfo(); this.getNodeInfo()
}, },
methods: { methods: {
changeSelect() { changeSelect() {
this.checkStrictly = false; this.checkStrictly = false
}, },
// 获取礼品列表 // 获取礼品列表
async getIntegralList() { async getIntegralList() {
try { try {
const memberId = this.$store.getters.id; const memberId = this.$store.getters.id
const { code, data } = await integralList({ const { code, data } = await integralList({
memberId, memberId,
nodeId: this.nodeId, nodeId: this.nodeId
}); })
if (code !== 0) return; if (code !== 0) return
this.list = data.list; this.list = data.list
if (!this.nodeId) { if (!this.nodeId) {
if (data.city) { if (data.city) {
this.selectedNodeId = [data.country, data.city]; this.selectedNodeId = [data.country, data.city]
} else { } else {
this.selectedNodeId = [data.country]; this.selectedNodeId = [data.country]
} }
} }
} catch (err) { } catch (err) {
console.log(err); console.log(err)
} }
}, },
// 获取网点信息 // 获取网点信息
async getNodeInfo() { async getNodeInfo() {
try { try {
const { code, data } = await getBranchList(); const { code, data } = await getBranchList()
if (code !== 0) return; if (code !== 0) return
this.nodeList = data; this.nodeList = data
console.log(data); console.log(data)
} catch (err) { } catch (err) {
console.log(err); console.log(err)
} }
}, },
// 跳转详情 // 跳转详情
toDetail(id) { toDetail(id) {
this.$router.push({ path: `/jiedao/jd-exchange-operate`, query: { id } }); this.$router.push({ path: `/jiedao/jd-exchange-operate`, query: { id }})
}, }
}, }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template> <template>
<div class="integral"> <div class="integral">
<div class="header"> <div class="header">
<div />
<div class="header-content"> <div class="header-content">
<div class="content-box"> <div class="content-box">
<div class="avatar"> <div class="avatar">
<img class="imgs" src="@/assets/integral/vip_avatar.png" alt="" /> <img class="imgs" src="@/assets/integral/vip_avatar.png" alt="">
</div> </div>
<div class="content-text"> <div class="content-text">
<div class="text-vip"> <div class="text-vip">
...@@ -18,13 +17,13 @@ ...@@ -18,13 +17,13 @@
</div> </div>
</div> </div>
<div class="content-image"> <div class="content-image">
<img v-if="levelIcon" class="imgs" :src="levelIcon" alt="" /> <img v-if="levelIcon" class="imgs" :src="levelIcon" alt="">
<img <img
v-else v-else
class="imgs" class="imgs"
src="@/assets/integral/vip_avatar.png" src="@/assets/integral/vip_avatar.png"
alt="" alt=""
/> >
</div> </div>
</div> </div>
<div class="content-divider"> <div class="content-divider">
...@@ -65,14 +64,14 @@ ...@@ -65,14 +64,14 @@
</div> </div>
</template> </template>
<script> <script>
import IntegralExchange from "./components/IntegralExchange.vue"; import IntegralExchange from './components/IntegralExchange.vue'
import IntegralActivity from "./components/IntegralActivity.vue"; import IntegralActivity from './components/IntegralActivity.vue'
import { getMemberInfo } from "@/api/integral"; import { getMemberInfo } from '@/api/integral'
export default { export default {
name: "JdIntegral", name: 'JdIntegral',
components: { components: {
IntegralExchange, IntegralExchange,
IntegralActivity, IntegralActivity
}, },
data() { data() {
return { return {
...@@ -80,8 +79,8 @@ export default { ...@@ -80,8 +79,8 @@ export default {
// 会员积分信息 // 会员积分信息
integralInfo: {}, integralInfo: {},
// 会员图标 // 会员图标
levelIcon: "", levelIcon: ''
}; }
}, },
computed: { computed: {
score() { score() {
...@@ -91,40 +90,40 @@ export default { ...@@ -91,40 +90,40 @@ export default {
(this.integralInfo.totalScore / this.integralInfo.upperCount) * 100 (this.integralInfo.totalScore / this.integralInfo.upperCount) * 100
), ),
100 100
); )
} }
return 0; return 0
}, }
}, },
created() { created() {
this.getIntegralInfo(); this.getIntegralInfo()
const { loginUser } = this.$store.state.user; const { loginUser } = this.$store.state.user
if (loginUser) { if (loginUser) {
const userScoreLevelInfo = loginUser.userScoreLevelInfo; const userScoreLevelInfo = loginUser.userScoreLevelInfo
this.levelIcon = userScoreLevelInfo.levelIcon; this.levelIcon = userScoreLevelInfo.levelIcon
console.log(this.levelIcon); console.log(this.levelIcon)
} }
}, },
methods: { methods: {
// 跳转 日志 // 跳转 日志
toJump(val) { toJump(val) {
const path = const path =
val === 1 ? "/jiedao/jd-integral-log" : "/jiedao/jd-exchange-log"; val === 1 ? '/jiedao/jd-integral-log' : '/jiedao/jd-exchange-log'
this.$router.push({ path }); this.$router.push({ path })
}, },
// 获取个人积分信息 // 获取个人积分信息
async getIntegralInfo() { async getIntegralInfo() {
try { try {
const id = this.$store.getters.id; const id = this.$store.getters.id
const { code, data } = await getMemberInfo({ id }); const { code, data } = await getMemberInfo({ id })
if (code !== 0) return; if (code !== 0) return
this.integralInfo = data; this.integralInfo = data
} catch (err) { } catch (err) {
console.log(err); console.log(err)
} }
}, }
}, }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.integral { .integral {
......
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