Commit 5347be55 authored by renjie's avatar renjie

修改merchantId流程

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