Commit 775ba504 authored by renjie's avatar renjie

vlog首页加入影集首页进入按钮

parent 5cca28db
...@@ -250,10 +250,12 @@ export default { ...@@ -250,10 +250,12 @@ export default {
this.$commonjs.getCompanyId(options) this.$commonjs.getCompanyId(options)
this.recordDeviceInfo() this.recordDeviceInfo()
this.options = options this.options = options
if(this.options.tip === 'true') { if(this.options.tip === 'true') {// 从模板选择页进入
this.show = true this.show = true
this.showtip = true this.showtip = true
}else { }else if(this.options.index == 1) {// 从vlog首页进入
this.show = true
}else {// 扫码进入本页
this.handleWhetherToVotePage() this.handleWhetherToVotePage()
} }
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<view class="shuxian"></view> <view class="shuxian"></view>
<view>景区VLOG样片</view> <view>景区VLOG样片</view>
</view> </view>
<view class="row"> <view class="row" v-if="scenicList.length>0">
<block v-for="(item,index) in scenicList" :key="index"> <block v-for="(item,index) in scenicList" :key="index">
<navigator :url="'../scenicList/scenicList?productUrl='+item.productUrl+'&thumbImageUrl='+item.thumbImageUrl+'&merchantName='+item.merchantName" class="item"> <navigator :url="'../scenicList/scenicList?productUrl='+item.productUrl+'&thumbImageUrl='+item.thumbImageUrl+'&merchantName='+item.merchantName" class="item">
<image class="fengmian" :src="item.thumbImageUrl"></image> <image class="fengmian" :src="item.thumbImageUrl"></image>
...@@ -50,6 +50,9 @@ ...@@ -50,6 +50,9 @@
</navigator> </navigator>
</block> </block>
</view> </view>
<navigator url="../../album/albumIndex?index=1">
<view class="album">相册首页</view>
</navigator>
<view class="bottom"> <view class="bottom">
<image src="../../../static/img/vlog/icon/bottom.png"></image> <image src="../../../static/img/vlog/icon/bottom.png"></image>
<navigator url="../vlogface/vlogface"> <navigator url="../vlogface/vlogface">
...@@ -63,12 +66,12 @@ ...@@ -63,12 +66,12 @@
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
userInfo: "", //用户信息 userInfo: '', //用户信息
scenicList: [], //景区列表 scenicList: [], //景区列表
search: "", //景区 search: '', //景区
list: [{ list: [{
image: '../../../static/img/vlog/swipe/swipe1.jpg' image: '../../../static/img/vlog/swipe/swipe1.jpg'
}, },
...@@ -91,15 +94,15 @@ ...@@ -91,15 +94,15 @@
methods: { methods: {
getUserInfo() { //获取用户信息 getUserInfo() { //获取用户信息
this.$request('wechatUser/wxUser/findWxUser', { this.$request('wechatUser/wxUser/findWxUser', {
openid: uni.getStorageSync("openid") openid: uni.getStorageSync('openid')
}) })
.then((res) => { .then((res) => {
if (res.code === "00") { //请求成功 if (res.code === '00') { //请求成功
this.userInfo = res.data this.userInfo = res.data
if (this.userInfo.isVlog === 0) { //未注册 if (this.userInfo.isVlog === 0) { //未注册
this.vlogRegister() this.vlogRegister()
} else { } else {
console.log("用户已注册"); console.log('用户已注册')
} }
} else { } else {
uni.showModal({ uni.showModal({
...@@ -111,10 +114,10 @@ ...@@ -111,10 +114,10 @@
}, },
getScenicList() { //景区列表查询 getScenicList() { //景区列表查询
let data = { let data = {
merchantId:"a124Jj6IYiSzCjVV" merchantId:'a124Jj6IYiSzCjVV'
} }
this.$request("scenic/user/merchant/merchantVlogList", data).then(res => { this.$request('scenic/user/merchant/merchantVlogList', data).then(res => {
if (res.code === "00") { //请求成功 if (res.code === '00') { //请求成功
this.scenicList=res.data.filter((item)=>{ this.scenicList=res.data.filter((item)=>{
return item.isPublic===1 return item.isPublic===1
}) })
...@@ -128,21 +131,21 @@ ...@@ -128,21 +131,21 @@
}, },
vlogRegister() { //用户注册 vlogRegister() { //用户注册
let data = { let data = {
"nickName": this.userInfo.nickname.substr(0,10), //昵称 'nickName': this.userInfo.nickname.substr(0,10), //昵称
"userId": this.userInfo.openid, //用户id(用微信openid) 'userId': this.userInfo.openid, //用户id(用微信openid)
"phone": 17347895200, //手机 'phone': 17347895200, //手机
"outUserId": this.userInfo.openid, //用户Id, //外部应用id(用微信openid) 'outUserId': this.userInfo.openid, //用户Id, //外部应用id(用微信openid)
"userType": "WECHAT", //ALIPAY-支付宝小程序,WECHAT-微信小程序,OTHER-其他 'userType': 'WECHAT', //ALIPAY-支付宝小程序,WECHAT-微信小程序,OTHER-其他
"gender": this.userInfo.gender //0-男,1-女 'gender': this.userInfo.gender //0-男,1-女
} }
this.$request("distribution/vlog/vlogRegister", data).then(res => { //注册 this.$request('distribution/vlog/vlogRegister', data).then(res => { //注册
if (res.code === "00") { if (res.code === '00') {
let data = { let data = {
userId: uni.getStorageSync("openid"), userId: uni.getStorageSync('openid'),
action: "VLOG_DOWNLOAD" action: 'VLOG_DOWNLOAD'
} }
this.$request("distribution/vlog/backflow", data).then(res => { //埋点 this.$request('distribution/vlog/backflow', data).then(res => { //埋点
if (res.code === "00") { if (res.code === '00') {
} }
}) })
} }
...@@ -156,16 +159,16 @@ ...@@ -156,16 +159,16 @@
fail: (res) => { fail: (res) => {
uni.showModal({ uni.showModal({
content: '检测到您没打开摄像头权限,是否去设置打开?', content: '检测到您没打开摄像头权限,是否去设置打开?',
confirmText: "确认", confirmText: '确认',
cancelText: '取消', cancelText: '取消',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
uni.openSetting({ uni.openSetting({
success: (res) => { success: (res) => {
console.log(res); console.log(res)
}, },
fail: (err) => { fail: (err) => {
console.log(err); console.log(err)
} }
}) })
} else { } else {
...@@ -184,16 +187,16 @@ ...@@ -184,16 +187,16 @@
fail: (res) => { fail: (res) => {
uni.showModal({ uni.showModal({
content: '检测到您没打开相册权限,是否去设置打开?', content: '检测到您没打开相册权限,是否去设置打开?',
confirmText: "确认", confirmText: '确认',
cancelText: '取消', cancelText: '取消',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
uni.openSetting({ uni.openSetting({
success: (res) => { success: (res) => {
console.log(res); console.log(res)
}, },
fail: (err) => { fail: (err) => {
console.log(err); console.log(err)
} }
}) })
} else { } else {
...@@ -210,7 +213,7 @@ ...@@ -210,7 +213,7 @@
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
...@@ -333,4 +336,15 @@ ...@@ -333,4 +336,15 @@
} }
} }
} }
.album {
width: 100%;
height: 80rpx;
margin-top: 32rpx;
border-radius: 8rpx;
text-align: center;
line-height: 80rpx;
font-size: 32rpx;
background-color: #212B44;
color: #fff;
}
</style> </style>
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