Commit 5347be55 authored by renjie's avatar renjie

修改merchantId流程

parent 95c8c930
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
{ {
ruleName: '补充说明', ruleName: '补充说明',
contents: [ contents: [
{value: '使用地址:重庆市渝中区新华路151号闯将索道南站观景台旁'}, {value: '使用地址:重庆市渝中区新华路151号长江索道南站观景台旁'},
{value: '咨询电话:023-68567748'} {value: '咨询电话:023-68567748'}
] ]
} }
...@@ -204,13 +204,16 @@ export default { ...@@ -204,13 +204,16 @@ export default {
this.$request('wechatUser/pdFace/checkScanFace',{openid}).then(res => { this.$request('wechatUser/pdFace/checkScanFace',{openid}).then(res => {
if (res.code === '00') { if (res.code === '00') {
const merchantId = this.options.merchantId
if(res.data.isScanFace === 0) {//未扫脸 if(res.data.isScanFace === 0) {//未扫脸
uni.navigateTo({ uni.navigateTo({
url: './getPortrait' url: `./getPortrait?merchantId${merchantId}`
}) })
}else if(res.data.isScanFace === 1) {//已扫脸 }else if(res.data.isScanFace === 1) {//已扫脸
const faceIds = JSON.stringify(res.data.faceIds)
const companyId = this.options.companyId
uni.navigateTo({ uni.navigateTo({
url: `./myPhotoAlbum/myPhotoAlbum?faceIds=${JSON.stringify(res.data.faceIds)}&companyId=${this.options.companyId}` url: `./myPhotoAlbum/myPhotoAlbum?faceIds=${faceIds}&companyId=${companyId}&merchantId${merchantId}`
}) })
} }
}else{ }else{
...@@ -271,8 +274,8 @@ export default { ...@@ -271,8 +274,8 @@ export default {
let voteObj = {}// 用户投票信息 let voteObj = {}// 用户投票信息
if(surveyResult.length) { if(surveyResult.length) {
// 默认保存第一个商店id到缓存 // 默认保存第一个商店id
uni.setStorageSync('merchantId', surveyResult[0].merchantId) // this.options.merchantId = surveyResult[0].merchantId
const votedQueryData = { const votedQueryData = {
merchantId: surveyResult[0].merchantId, merchantId: surveyResult[0].merchantId,
...@@ -290,6 +293,25 @@ export default { ...@@ -290,6 +293,25 @@ export default {
this.show = true this.show = true
} }
}, },
couponIsUse() {
const openid = uni.getStorageSync('openid')
this.$request('wechatUser/myPage/getUserCouponList',{openid}).then(res => {
if (res.code === '00') {
console.log(res.data)
}else{
uni.showToast({
title: res.message,
icon: 'none'
})
}
}).catch(err => {
uni.showToast({
title: err,
icon: 'none'
})
})
},
recordDeviceInfo() {//---记录设备信息 recordDeviceInfo() {//---记录设备信息
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight // 状态栏高度 this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight // 状态栏高度
this.capsule = uni.getMenuButtonBoundingClientRect() // 胶囊大小、位置数据 this.capsule = uni.getMenuButtonBoundingClientRect() // 胶囊大小、位置数据
...@@ -298,6 +320,7 @@ export default { ...@@ -298,6 +320,7 @@ export default {
}, },
onLoad(options) { onLoad(options) {
this.$commonjs.getCompanyId(options) this.$commonjs.getCompanyId(options)
this.couponIsUse()
this.recordDeviceInfo() this.recordDeviceInfo()
this.options = options this.options = options
if(this.options.tip === 'true') {// 从模板选择页进入 if(this.options.tip === 'true') {// 从模板选择页进入
...@@ -305,6 +328,7 @@ export default { ...@@ -305,6 +328,7 @@ export default {
this.showtip = true this.showtip = true
}else if(this.options.index == 1) {// 从vlog首页进入 }else if(this.options.index == 1) {// 从vlog首页进入
this.show = true this.show = true
this.options.merchantId = 'z0015605022691a5945bbe463141668c'// 默认长江索道
}else {// 扫码进入本页 }else {// 扫码进入本页
this.handleWhetherToVotePage() this.handleWhetherToVotePage()
} }
......
...@@ -60,7 +60,6 @@ export default { ...@@ -60,7 +60,6 @@ export default {
openid: uni.getStorageSync('openid'), //openid openid: uni.getStorageSync('openid'), //openid
templateIds//模板Id templateIds//模板Id
} }
uni.setStorageSync('merchantId', data.merchantId)
this.$request('wechatUser/pdAlbum/saveVisitorSurvey', data).then(res => { this.$request('wechatUser/pdAlbum/saveVisitorSurvey', data).then(res => {
if (res.code === '00') { if (res.code === '00') {
uni.showToast({ uni.showToast({
...@@ -68,7 +67,7 @@ export default { ...@@ -68,7 +67,7 @@ export default {
icon: 'success' icon: 'success'
}) })
uni.navigateTo({ uni.navigateTo({
url: './albumIndex?tip=true' url: `./albumIndex?tip=true&merchantId=${data.merchantId}`
}) })
}else{ }else{
uni.showToast({ uni.showToast({
......
...@@ -57,6 +57,7 @@ export default { ...@@ -57,6 +57,7 @@ export default {
maskCount: 3,//弹窗倒计时 maskCount: 3,//弹窗倒计时
queryData: {},//查询参数 queryData: {},//查询参数
defaultBrightness: 0.5,//屏幕亮度 defaultBrightness: 0.5,//屏幕亮度
options: {},//路由传参
} }
}, },
methods: { methods: {
...@@ -135,7 +136,7 @@ export default { ...@@ -135,7 +136,7 @@ export default {
}) })
}, },
getQueryField() {//---获取查询参数 getQueryField() {//---获取查询参数
const merchantId = uni.getStorageSync('merchantId') const merchantId = this.options.merchantId
this.$request('scenic/albumConfig/getAlbumConfig',{merchantId}).then(res => {//创建任务 this.$request('scenic/albumConfig/getAlbumConfig',{merchantId}).then(res => {//创建任务
if (res.code === '00') { if (res.code === '00') {
...@@ -228,7 +229,8 @@ export default { ...@@ -228,7 +229,8 @@ export default {
}) })
}, },
}, },
onLoad() { onLoad(options) {
this.options = options
this.recordDeviceInfo() this.recordDeviceInfo()
uni.getScreenBrightness({//获取屏幕亮度 uni.getScreenBrightness({//获取屏幕亮度
success(res) { success(res) {
......
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