Commit 71504154 by 前端

Merge branch 'dev_v3.2.0' into 'master'

Dev v3.2.0

See merge request !17
2 parents 7f45c59b ab78f7f1
...@@ -11,7 +11,7 @@ module.exports = { ...@@ -11,7 +11,7 @@ module.exports = {
envVersion: 'trial', envVersion: 'trial',
title: '嘀加企微管家', title: '嘀加企微管家',
request: { request: {
baseURL: 'http://scrm.test.glsx.com.cn', // 本地测试项目地址, baseURL: 'http://scrm.dev.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
......
import { wxConfig, bigdatautilApi } from '@/api' import { wxConfig, bigdatautilApi } from '@/api'
export default { export default {
data() { data () {
return { return {
entry: 'normal' entry: 'normal'
} }
}, },
mounted() { mounted () {
if (this.$route.meta.isTab || this.$route.meta.isIndex) this.wxInit() if (this.$route.meta.isTab || this.$route.meta.isIndex) this.wxInit()
// wxConfig // wxConfig
// .createMiniprogramUrlLink({ // .createMiniprogramUrlLink({
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
// }) // })
}, },
methods: { methods: {
wxInit() { wxInit () {
let _this = this let _this = this
wxConfig.init(['shareAppMessage', 'sendChatMessage', 'getCurExternalContact', 'getContext']).then(() => { wxConfig.init(['shareAppMessage', 'sendChatMessage', 'getCurExternalContact', 'getContext']).then(() => {
wxConfig.getContext().then(({ entry }) => { wxConfig.getContext().then(({ entry }) => {
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
iosTimeFormat (time) { iosTimeFormat (time) {
return time.replace(/\-/g, '/') return time.replace(/\-/g, '/')
}, },
showShareModel(i = {}) { showShareModel (i = {}) {
let { let {
tabIndex, tabIndex,
$route: { name } $route: { name }
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
this.sendMessage(i) this.sendMessage(i)
}) })
}, },
sendMessage(i) { sendMessage (i) {
const { const {
shopmall_appid, shopmall_appid,
request: { baseURL } request: { baseURL }
...@@ -65,22 +65,22 @@ export default { ...@@ -65,22 +65,22 @@ export default {
const entryType = entry != 'normal' const entryType = entry != 'normal'
this.showLoading() this.showLoading()
let params = { let params = {
coupon: { coupon: {
path: 'packageMine/pages/boutique/gift/gift', path: 'packageMine/pages/boutique/gift/gift',
desc: '您的专属服务顾问为您发来了优惠券,请点击领取~', desc: '您的专属服务顾问为您发来了优惠券,请点击领取~',
imgUrl: 'http://img01.glsx.com.cn/upload/biz/dracMini-yh-10004.png' imgUrl: 'http://img01.glsx.com.cn/upload/biz/dracMini-yh-10004.png'
}, },
activity: { activity: {
path: 'packageMall/pages/detail/detail', path: 'packageMall/pages/detail/detail',
desc: '您有一个秒杀活动可参加', desc: '您有一个秒杀活动可参加',
imgUrl: 'http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png' imgUrl: 'http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png'
}, },
merchant: { merchant: {
path: 'pages/tab/index/index', path: 'pages/tab/index/index',
desc: '', desc: '',
imgUrl: 'https://img01.glsx.com.cn/weapp/resource/scrm-mobile/activity/miniprogram-cover.jpg' imgUrl: 'https://img01.glsx.com.cn/weapp/resource/scrm-mobile/activity/miniprogram-cover.jpg'
} }
}[name], }[name],
title = { title = {
coupon: couponName, coupon: couponName,
activity: activityName, activity: activityName,
...@@ -90,9 +90,10 @@ export default { ...@@ -90,9 +90,10 @@ export default {
if (name === 'coupon') { if (name === 'coupon') {
/**卡券 */ /**卡券 */
if (tabIndex == 0) { if (tabIndex == 0) {
if(!sapCode) params.path = 'packageShopmall/packageMine/pages/boutique/gift/gift'
query = `id=${id}&userId=${userId}&employName=${this.toUnicode(i.employeeName)}&${query}` query = `id=${id}&userId=${userId}&employName=${this.toUnicode(i.employeeName)}&${query}`
} else { } else {
params.path = 'packageMall/pages/coupon/coupon' params.path = !sapCode ? 'packageShopmall/packageMall/pages/coupon/coupon' : 'packageMall/pages/coupon/coupon'
query = `couponId=${id}&${query}&issueName=${this.toUnicode(userName)}&issueDate=${new Date().getTime()}&shareSource=1&shareStaffName=${this.toUnicode(userName)}&shareStaffUuid=${uuid}` query = `couponId=${id}&${query}&issueName=${this.toUnicode(userName)}&issueDate=${new Date().getTime()}&shareSource=1&shareStaffName=${this.toUnicode(userName)}&shareStaffUuid=${uuid}`
title = `${couponName}(${window.$discountType[discountType]}券)` title = `${couponName}(${window.$discountType[discountType]}券)`
this.couponShare(i) this.couponShare(i)
...@@ -104,6 +105,7 @@ export default { ...@@ -104,6 +105,7 @@ export default {
// 1-普通秒杀;2-直播间秒杀;3-众筹 // 1-普通秒杀;2-直播间秒杀;3-众筹
switch (marketingType) { switch (marketingType) {
case 1: case 1:
if(!sapCode) params.path = 'packageShopmall/packageMall/pages/detail/detail'
query = `isActivity=true&id=${id}&${query}&shareStaffName=${this.toUnicode(userName)}&shareStaffUuid=${uuid}` query = `isActivity=true&id=${id}&${query}&shareStaffName=${this.toUnicode(userName)}&shareStaffUuid=${uuid}`
break break
case 2: case 2:
...@@ -113,11 +115,11 @@ export default { ...@@ -113,11 +115,11 @@ export default {
shareType = 'h5' shareType = 'h5'
let { corpId, agentId } = this.getLocalStorage('dj_scrm_corpId') let { corpId, agentId } = this.getLocalStorage('dj_scrm_corpId')
let link = `${baseURL}/scrm-wx-merchant-activity/#/` let link = `${baseURL}/scrm-wx-merchant-activity/#/`
link = `${link}?${query}&id=${i.id}&shareStaffUuid=${uuid}&shareStaffName=${this.toUnicode(userName)}&shareStaffType=2&corpId=${corpId}` link = `${link}?${query}&id=${i.id}&shareStaffUuid=${uuid}&shareStaffName=${this.toUnicode(userName)}&shareStaffType=2&corpId=${corpId}&sharedTime=${Date.now()}`
if (agentId) link = `${link}&agentId=${agentId}` if (agentId) link = `${link}&agentId=${agentId}`
h5Params = { h5Params = {
imgUrl: i.posterImg || i.activityImg, imgUrl: i.posterImg || i.activityImg,
desc: `限时大型众筹,活动时间${new Date(this.iosTimeFormat(i.startTime)).format('yyyy/M/d')}-${new Date(this.iosTimeFormat(i.endTime)).format('yyyy/M/d')}`, desc: i.activitySharingWords || `限时大型众筹,活动时间${new Date(this.iosTimeFormat(i.startTime)).format('yyyy/M/d')}-${new Date(this.iosTimeFormat(i.endTime)).format('yyyy/M/d')}`,
title: i.forwardTitle || i.activityName, title: i.forwardTitle || i.activityName,
link link
} }
...@@ -134,8 +136,8 @@ export default { ...@@ -134,8 +136,8 @@ export default {
switch (+tabIndex) { switch (+tabIndex) {
case 1: case 1:
let isjt = i.packageType == 2 let isjt = i.packageType == 2
const STORE_PATH = 'packageEquity/pages/package/package' const STORE_PATH = sapCode ? 'packageEquity/pages/package/package' : 'packageShopmall/packageEquity/pages/package/package'
const JT_PATH = 'packageEquity/pages/open/open' const JT_PATH = sapCode ? 'packageEquity/pages/open/open' : 'packageShopmall/packageEquity/pages/open/open'
// params.path = 'packageEquity/pages/package/package' // params.path = 'packageEquity/pages/package/package'
params.path = isjt ? JT_PATH : STORE_PATH params.path = isjt ? JT_PATH : STORE_PATH
params.imgUrl = 'http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png' params.imgUrl = 'http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png'
...@@ -144,20 +146,21 @@ export default { ...@@ -144,20 +146,21 @@ export default {
title = packageName title = packageName
break break
case 2: case 2:
params.path = 'packageMall/pages/detail/detail' params.path = sapCode ? 'packageMall/pages/detail/detail' : 'packageShopmall/packageMall/pages/detail/detail'
params.imgUrl = goodsImage params.imgUrl = goodsImage
params.desc = '' params.desc = ''
query = `id=${id}&${query}&shareStaffName=${this.toUnicode(userName)}&shareStaffUuid=${uuid}` query = `id=${id}&${query}&shareStaffName=${this.toUnicode(userName)}&shareStaffUuid=${uuid}`
title = goodsName title = goodsName
break break
case 3: case 3:
/**众筹 */
let { corpId, agentId } = this.getLocalStorage('dj_scrm_corpId') let { corpId, agentId } = this.getLocalStorage('dj_scrm_corpId')
let link = `${baseURL}/scrm-wx-merchant-activity/#/` let link = `${baseURL}/scrm-wx-merchant-activity/#/`
link = `${link}?${query}&id=${i.id}&shareStaffUuid=${uuid}&shareStaffName=${this.toUnicode(userName)}&shareStaffType=2&corpId=${corpId}` link = `${link}?${query}&id=${i.id}&shareStaffUuid=${uuid}&shareStaffName=${this.toUnicode(userName)}&shareStaffType=2&corpId=${corpId}&sharedTime=${Date.now()}`
if (agentId) link = `${link}&agentId=${agentId}` if (agentId) link = `${link}&agentId=${agentId}`
h5Params = { h5Params = {
imgUrl: i.posterImg || i.activityImg, imgUrl: i.posterImg || i.activityImg,
desc: `限时大型众筹,活动时间${new Date(this.iosTimeFormat(i.startTime)).format('yyyy/M/d')}-${new Date(this.iosTimeFormat(i.endTime)).format('yyyy/M/d')}`, desc: i.activitySharingWords || `限时大型众筹,活动时间${new Date(this.iosTimeFormat(i.startTime)).format('yyyy/M/d')}-${new Date(this.iosTimeFormat(i.endTime)).format('yyyy/M/d')}`,
title: i.forwardTitle || i.activityName, title: i.forwardTitle || i.activityName,
link link
} }
...@@ -205,7 +208,7 @@ export default { ...@@ -205,7 +208,7 @@ export default {
) )
} }
}, },
sendChatMessage(params, msgtype = 'miniprogram', callBack) { sendChatMessage (params, msgtype = 'miniprogram', callBack) {
wxConfig wxConfig
.sendChatMessage({ .sendChatMessage({
msgtype, msgtype,
...@@ -221,7 +224,7 @@ export default { ...@@ -221,7 +224,7 @@ export default {
this.hideLoading() this.hideLoading()
}) })
}, },
shareAppMessage(linkParams, messageParams) { shareAppMessage (linkParams, messageParams) {
wxConfig.createMiniprogramUrlLink(linkParams).then(link => { wxConfig.createMiniprogramUrlLink(linkParams).then(link => {
wxConfig wxConfig
.shareAppMessage({ .shareAppMessage({
...@@ -236,14 +239,14 @@ export default { ...@@ -236,14 +239,14 @@ export default {
}) })
}) })
}, },
toUnicode(chineseStr = '') { toUnicode (chineseStr = '') {
let unicodeStr = '' let unicodeStr = ''
for (let i = 0, iLength = chineseStr.length; i < iLength; i++) { for (let i = 0, iLength = chineseStr.length; i < iLength; i++) {
unicodeStr += '@' + chineseStr.charCodeAt(i).toString(16) unicodeStr += '@' + chineseStr.charCodeAt(i).toString(16)
} }
return unicodeStr return unicodeStr
}, },
couponShare(item) { couponShare (item) {
let { is_contact, id } = item let { is_contact, id } = item
let obj = { let obj = {
couponId: id, couponId: id,
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<div v-html="i.format(detail)"></div> <div v-html="i.format(detail)"></div>
</template> </template>
<template v-else> <template v-else>
{{detail[i.key] || ''}} <span class="gift-name"><span v-if="i.key == 'directionalGiftName' && detail.merchantType==2" class="group-label">集团</span> {{detail[i.key] || ''}}</span>
<template v-if="i.tipsValue"> <template v-if="i.tipsValue">
<div <div
class="item-tips" class="item-tips"
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
>领取条件</div> >领取条件</div>
</div> </div>
<div class="value"> <div class="value">
{{detail.directionalGiftName}} <span class="gift-name"><span v-if="detail.merchantType==2" class="group-label">集团</span>{{detail.directionalGiftName}}</span>
<div class="item-tips"> <div class="item-tips">
<template v-if="detail.directionalGiftReceiveCondition"> <template v-if="detail.directionalGiftReceiveCondition">
{{detail.directionalGiftReceiveWay == 1?'手机号':'车架号后6位'}}:{{detail.directionalGiftReceiveCondition}} {{detail.directionalGiftReceiveWay == 1?'手机号':'车架号后6位'}}:{{detail.directionalGiftReceiveCondition}}
...@@ -93,6 +93,12 @@ ...@@ -93,6 +93,12 @@
</div> </div>
</template> </template>
</template> </template>
<div class="item flex">
<div class="label">发放门店</div>
<div class="value">
{{detail.userCouponMerchantName}}
</div>
</div>
<div <div
v-if="detail.packageId" v-if="detail.packageId"
class="item flex" class="item flex"
...@@ -295,6 +301,22 @@ export default { ...@@ -295,6 +301,22 @@ export default {
// border-radius: 4px; // border-radius: 4px;
margin-right: 4px; margin-right: 4px;
} }
.gift-name{
display: flex;
align-items: center;
.group-label{
width: 42px;
height: 20px;
line-height: 20px;
display: inline-block;
text-align: center;
background: rgba(255,101,61,0.15);
border-radius: 4px;
font-size: 12px;
margin-right: 4px;
color: #FF653D;
}
}
.item-tips { .item-tips {
color: #333333; color: #333333;
} }
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
<van-swipe-cell> <van-swipe-cell>
<div class="title flex"> <div class="title flex">
{{i.name}} <span>{{i.name}}<span class="group-label" v-if="i.merchantType==2">集团</span></span>
<span v-if="activeTab==1" @click.stop="send(i)">发送</span> <span class="send" v-if="activeTab==1" @click.stop="send(i)">发送</span>
</div> </div>
<div class="content"> <div class="content">
<div class="icon"> <div class="icon">
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</div> </div>
</div> </div>
<div class="gift-box"> <div class="gift-box">
<div class="title">{{i.name}}</div> <div class="title">{{i.name}}<span class="group-label" v-if="i.merchantType==2">集团</span></div>
<div class="text" v-if="i.receiveRule!=3">指定领取{{i.receiveWay == 1?'手机号':'车架号'}}:{{i.receiveDetail}}</div> <div class="text" v-if="i.receiveRule!=3">指定领取{{i.receiveWay == 1?'手机号':'车架号'}}:{{i.receiveDetail}}</div>
<div class="text">备注名称:{{i.remarkName}}</div> <div class="text">备注名称:{{i.remarkName}}</div>
</div> </div>
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<template v-if="tabIndex == 2"> <template v-if="tabIndex == 2">
<van-swipe-cell> <van-swipe-cell>
<div class="title flex"> <div class="title flex">
<span>{{i.name}}</span> <span>{{i.name}}<span class="group-label" v-if="i.merchantType==2">集团</span></span>
<span v-if="i.approveStatus==5" class="approve-btn" @click.stop="toAppprove(i)"> <span v-if="i.approveStatus==5" class="approve-btn" @click.stop="toAppprove(i)">
发起审批 发起审批
</span> </span>
...@@ -303,14 +303,15 @@ export default { ...@@ -303,14 +303,15 @@ export default {
this.showLoading('生成中...') this.showLoading('生成中...')
return { return {
appId: shopmall_appid, appId: shopmall_appid,
query: scene query: scene,
sapCode
} }
}, },
send (e) { send (e) {
let { query, appId } = this.getMiniParams(e) let { query, appId, sapCode } = this.getMiniParams(e)
wxConfig wxConfig
.createMiniprogramUrlLink({ .createMiniprogramUrlLink({
path: 'packageEquity/pages/directional/directional', path: sapCode ? 'packageEquity/pages/directional/directional' : 'packageShopmall/packageEquity/pages/directional/directional',
query, query,
appId appId
}) })
...@@ -342,11 +343,11 @@ export default { ...@@ -342,11 +343,11 @@ export default {
this.$router.push({ name: 'gift.create', query: params }) this.$router.push({ name: 'gift.create', query: params })
}else{ }else{
const { envVersion } = window.$fetchConfig const { envVersion } = window.$fetchConfig
let { query, appId } = this.getMiniParams(e) let { query, appId, sapCode } = this.getMiniParams(e)
// 正式版为:release 体验版为:trial 开发版为:develop // 正式版为:release 体验版为:trial 开发版为:develop
giftApi.createQr({ giftApi.createQr({
appId, appId,
path: 'packageEquity/pages/directional/directional', path: sapCode ? 'packageEquity/pages/directional/directional' : 'packageShopmall/packageEquity/pages/directional/directional',
envVersion, envVersion,
scene: query scene: query
}).then(img => { }).then(img => {
...@@ -423,6 +424,18 @@ export default { ...@@ -423,6 +424,18 @@ export default {
} }
} }
} }
.group-label{
width: 42px;
height: 20px;
display: inline-flex;
align-items: center;
justify-content: center;
background: rgba(255,101,61,0.15);
border-radius: 4px;
font-size: 12px;
margin-left: 8px;
color: #FF653D;
}
.type-0 { .type-0 {
height: calc(100vh - 148px); height: calc(100vh - 148px);
.item { .item {
...@@ -454,7 +467,7 @@ export default { ...@@ -454,7 +467,7 @@ export default {
color: #282829; color: #282829;
padding: 10px; padding: 10px;
border-bottom: 1px solid rgba(195, 195, 195, 0.3); border-bottom: 1px solid rgba(195, 195, 195, 0.3);
span { .send {
margin-left: auto; margin-left: auto;
flex-shrink: 0; flex-shrink: 0;
width: 44px; width: 44px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!