Commit d6588788 authored by chenwei's avatar chenwei

Merge branch 'feature' into 'dev'

创建统计记录

See merge request !15
parents 5e059c3c ae93e64f
......@@ -54,7 +54,7 @@ export function integralActivityDetail(data) {
});
}
//兑换发送验证码
// 兑换发送验证码
export function exchangeSMSCode(data) {
return request({
url: "/app-api/reward/redeem/send-sms-code",
......@@ -63,7 +63,7 @@ export function exchangeSMSCode(data) {
});
}
//兑换礼品
// 兑换礼品
export function redeemSingleReward(data) {
return request({
url: "/app-api/reward/redeem/single",
......@@ -71,3 +71,12 @@ export function redeemSingleReward(data) {
data,
});
}
// 创建复制记录
export function shareRecordCreate(data) {
return request({
url: "/app-api/member/score-rule/share-record/create",
method: "post",
data,
});
}
......@@ -34,7 +34,7 @@
</template>
<script>
import { integralActivityList } from '@/api/integral'
import { integralActivityList, shareRecordCreate } from '@/api/integral'
import ClipboardJS from 'clipboard'
export default {
name: 'IntegralActivity',
......@@ -56,21 +56,24 @@ export default {
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' ? item.titleZh
return `${this.locale === 'zh_CN' ? item.titleZh
: item.titleEn} ${item.extraShare.activityUrl}?id=${item.id}&memberId=${this.$store.getters.id}&language=${this.locale == 'zh_CN' ? 'zh' : 'en'}`
}
},
// 复制按钮
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()
shareRecordCreate({ memberId: this.$store.getters.id,
ruleId: item.id }).then(res => {
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()
})
})
})
},
......
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