Commit 775ba504 authored by renjie's avatar renjie

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

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