Commit 7d237041 authored by 潘永坪's avatar 潘永坪

出租车首页产品不显示bug处理

parent 92ec6c51
...@@ -47,8 +47,11 @@ export default{ ...@@ -47,8 +47,11 @@ export default{
var c = b.replace(regss,'') var c = b.replace(regss,'')
return c return c
}, },
getUrlKey:function(name){//通过连接地址获取参数值 phoneReg:function(){//手机正则
return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ''])[1].replace(/\+/g, '%20') || '' return /^(13[0-9]|14[0-9]|15[0-9]|18[0-9]|17[0-9]|19[0-9]|16[0-9])\d{8}$/
},
getUrlKey:function(name,url){//通过连接地址获取参数值
return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(url)) || [, ''])[1].replace(/\+/g, '%20') || ''
}, },
/* /*
通过链接地址获取companyId,并保持在本地 通过链接地址获取companyId,并保持在本地
...@@ -65,12 +68,30 @@ export default{ ...@@ -65,12 +68,30 @@ export default{
//#endif //#endif
let companyId='' let companyId=''
if(enterUrl){//普通二维码扫码进入 if(enterUrl){//普通二维码扫码进入
companyId=getUrlKey('companyId')||uni.getStorageSync('companyId')||'' companyId=this.getUrlKey('companyId',enterUrl)||uni.getStorageSync('companyId')||''
}else{//小程序页面跳转进入 }else{//小程序页面跳转进入
companyId=option.companyId||uni.getStorageSync('companyId')||'' companyId=option.companyId||uni.getStorageSync('companyId')||''
} }
uni.setStorageSync('companyId',companyId) uni.setStorageSync('companyId',companyId)
return companyId return companyId
},
//获取除companyId的其他参数
getKey:function(option,query){
let enterUrl=''
//#ifdef MP-WEIXIN
enterUrl=option.q
//#endif
//#ifdef MP-ALIPAY
enterUrl=uni.getStorageSync('alipayQrCode')
//#endif
let key=''
if(enterUrl){//普通二维码扫码进入
key=this.getUrlKey(`${query}`,enterUrl)||''
}else{//小程序页面跳转进入
key=option[query]||''
}
return key
} }
} }
//调用方法时--this.$commonjs.today() //调用方法时--this.$commonjs.today()
\ No newline at end of file
var baseUrl = '' var baseUrl = ''
if(process.env.NODE_ENV === 'development'){//开发环境 if(process.env.NODE_ENV === 'development'){//开发环境
baseUrl= 'http://pay.tuyoyoo.com/' baseUrl= 'https://pay.tuyoyoo.com/'
}else{ }else{
baseUrl= 'https://manager.pangdly.com/' baseUrl= 'https://manager.pangdly.com/'
} }
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<text class="middle-tip"> <text class="middle-tip">
取片电话: 取片电话:
</text> </text>
<input type="number" placeholder="请输入取片人手机号码" /> <input type="number" placeholder="请输入取片人手机号码" v-model.trim="printPhone"/>
</view> </view>
<view> <view>
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
</view> </view>
<view class="pop-bottom"> <view class="pop-bottom">
<text class="pop-btn"> <text class="pop-btn" @click="commit()">
提交 提交
</text> </text>
</view> </view>
...@@ -148,6 +148,7 @@ export default { ...@@ -148,6 +148,7 @@ export default {
imgList:[],//下载图片列表 imgList:[],//下载图片列表
downImgNumber:0,//下载图片的数量 downImgNumber:0,//下载图片的数量
extendContent:'',//额外信息 extendContent:'',//额外信息
printPhone:'',//打印电话号码
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -161,6 +162,36 @@ export default { ...@@ -161,6 +162,36 @@ export default {
} }
}, },
methods: { methods: {
//---打印提交
commit(){
if(!this.$commonjs.phoneReg().test(this.printPhone)){
uni.showToast({
title:'请输入正确的电话号码',
icon: 'none'
})
return
}
let data = {
orderId:this.orderId,//订单ID
userId:uni.getStorageSync('openid')||'',//用户Id
phone:this.printPhone,//电话号码
}
this.$request('order/userOrder/updateOrder', data).then(res => {
if (res.code == '00') {
uni.showToast({
title:'申请成功',
icon: 'none'
})
this.showPop=false
this.phone=''
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
},
//---复制内容 //---复制内容
copyText(value){ copyText(value){
uni.setClipboardData({ uni.setClipboardData({
......
...@@ -47,6 +47,12 @@ ...@@ -47,6 +47,12 @@
行程订制 行程订制
</view> </view>
</view> </view>
<view @click="goAlbum()">
<image src="@/static/img/index/album.png"></image>
<view>
摄影/旅拍
</view>
</view>
<view @click="goVlog()"> <view @click="goVlog()">
<image src="@/static/img/index/video.png"></image> <image src="@/static/img/index/video.png"></image>
<view> <view>
...@@ -266,6 +272,12 @@ export default { ...@@ -266,6 +272,12 @@ export default {
url:'/pages/hotel/hotelIndex/hotelIndex' url:'/pages/hotel/hotelIndex/hotelIndex'
}) })
}, },
//跳转影集首页
goAlbum(){
uni.navigateTo({
url:'/pages/album/albumIndex?index=1'
})
},
//---跳转vlog //---跳转vlog
goVlog(){ goVlog(){
uni.navigateTo({ uni.navigateTo({
......
...@@ -126,14 +126,14 @@ ...@@ -126,14 +126,14 @@
通行码 通行码
</view> </view>
</view> </view>
<!-- <view class="middle3-list" @click="goMyPhoto()"> <view class="middle3-list" @click="goMyPhoto()">
<view> <view>
<image src="@/static/img/my/center/album.png"></image> <image src="@/static/img/my/center/album.png"></image>
</view> </view>
<view> <view>
我的影集 我的影集
</view> </view>
</view> --> </view>
<view class="middle3-list" @click="goshopping()"> <view class="middle3-list" @click="goshopping()">
<view> <view>
<image src="@/static/img/my/center/shopping.png"></image> <image src="@/static/img/my/center/shopping.png"></image>
......
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
export default { export default {
data() { data() {
return { return {
enterUrl: '', //进入页面路由
orderList:[], //订单列表 orderList:[], //订单列表
pdOrderMoney: '', //实际总价 pdOrderMoney: '', //实际总价
totalMoney: '', //原价总价 totalMoney: '', //原价总价
...@@ -79,19 +78,13 @@ export default { ...@@ -79,19 +78,13 @@ export default {
}, },
onLoad(option) { onLoad(option) {
//#ifdef MP-WEIXIN //#ifdef MP-WEIXIN
this.enterUrl = option.q
this.payType = 42 this.payType = 42
//#endif //#endif
//#ifdef MP-ALIPAY //#ifdef MP-ALIPAY
this.enterUrl = uni.getStorageSync('alipayQrCode')
this.payType = 33 this.payType = 33
//#endif //#endif
if (this.enterUrl) { this.orderId=this.$commonjs.getKey(option,'orderId')
this.orderId = this.getUrlKey('orderId')
} else {
this.orderId = option.orderId||''
}
this.ifyukuaiCode = option.ifyukuaiCode||'' this.ifyukuaiCode = option.ifyukuaiCode||''
this.albumOrderdetail=option.albumOrderdetail||'' this.albumOrderdetail=option.albumOrderdetail||''
this.openid = uni.getStorageSync('openid') || '' this.openid = uni.getStorageSync('openid') || ''
...@@ -266,10 +259,6 @@ export default { ...@@ -266,10 +259,6 @@ export default {
} }
}) })
// #endif // #endif
},
getUrlKey(name) {
//---------------------------------------------------------------获取url
return (new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ''])[1].replace(/\+/g, '%20') || ''
} }
} }
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<view v-else-if="vlogList.length===0 && show===false" class="empty"> <view v-else-if="vlogList.length===0 && show===false" class="empty">
<view class="row"> <view class="row">
<text>空空如也...</text> <text>空空如也...</text>
<image src="../../../static/img/vlog/icon/icon_thereisnovideo.png"></image> <image src="../static/vlog/icon/icon_thereisnovideo.png"></image>
</view> </view>
<navigator url="../vlogface/vlogface" class="btnn"> <navigator url="../vlogface/vlogface" class="btnn">
<view>点击获取我的Vlog</view> <view>点击获取我的Vlog</view>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
show: true, //跳转过渡页面 show: true, //跳转过渡页面
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
console.log(e) console.log(e)
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<u-section title="精彩瞬间" :right="false" color="#303133"></u-section> <u-section title="精彩瞬间" :right="false" color="#303133"></u-section>
<text style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">MOMENT</text> <text style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">MOMENT</text>
</view> </view>
<image src="../../../static/img/vlog/icon/fengexian.png" mode="" style="width: 100%;height: 15rpx;"></image> <image src="../static/vlog/icon/fengexian.png" mode="" style="width: 100%;height: 15rpx;"></image>
<view class="row"> <view class="row">
<view class="item" v-for="(item,index) in list" :key="index"> <view class="item" v-for="(item,index) in list" :key="index">
<image :src="item.thumbImageUrl" mode="widthFix"></image> <image :src="item.thumbImageUrl" mode="widthFix"></image>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
list: [], //相片列表 list: [], //相片列表
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
}) })
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</view> </view>
<u-icon name="arrow-right" class="icon" color="#666666"></u-icon> <u-icon name="arrow-right" class="icon" color="#666666"></u-icon>
</view> </view>
<image src="../../../static/img/vlog/icon/fengexian.png" mode="" style="width: 100%;height: 5upx;"></image> <image src="../static/vlog/icon/fengexian.png" mode="" style="width: 100%;height: 5upx;"></image>
<view class="body"> <view class="body">
<image :src="productVo.priceStockList[0].imgList[0].url"></image> <image :src="productVo.priceStockList[0].imgList[0].url"></image>
<view class="title"> <view class="title">
...@@ -36,17 +36,17 @@ ...@@ -36,17 +36,17 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
showBody: false, showBody: false,
price: "", //单价 price: '', //单价
allprice: "", //总价 allprice: '', //总价
productVo: {}, //当前的产品信息 productVo: {}, //当前的产品信息
address: { address: {
name: "", //姓名 name: '', //姓名
phone: "", //联系电话 phone: '', //联系电话
address: "" //地址 address: '' //地址
}, //地址信息 }, //地址信息
addressShow: true,//地址栏弹窗 addressShow: true,//地址栏弹窗
Freight: {}, //手续费信息 Freight: {}, //手续费信息
...@@ -64,17 +64,17 @@ ...@@ -64,17 +64,17 @@
if (this.address.name == '') { if (this.address.name == '') {
return uni.showLoading({ return uni.showLoading({
title: '收件人不能为空!' title: '收件人不能为空!'
}); })
} }
if (this.address.address == '') { if (this.address.address == '') {
return uni.showLoading({ return uni.showLoading({
title: '收货地址不能为空!' title: '收货地址不能为空!'
}); })
} }
if (this.address.phone == '') { if (this.address.phone == '') {
return uni.showLoading({ return uni.showLoading({
title: '联系方式不能为空!' title: '联系方式不能为空!'
}); })
} }
let imgList = [] let imgList = []
imgList = uni.getStorageSync('sortImglist') imgList = uni.getStorageSync('sortImglist')
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
let data = { let data = {
buyMethod: 1, //购买方式:1 单品购买,2套票、联票购买,3组合购买 buyMethod: 1, //购买方式:1 单品购买,2套票、联票购买,3组合购买
cash: 0, //现金抵扣 cash: 0, //现金抵扣
companyId: "10001", //来源公司id(分销商Id) companyId: '10001', //来源公司id(分销商Id)
orderMoney: this.allprice * 1, //订单总价 = 订单原价 - 优惠券价格 - 现金抵扣价格 orderMoney: this.allprice * 1, //订单总价 = 订单原价 - 优惠券价格 - 现金抵扣价格
orderProductList: [], //产品信息列表(单品购买为空,联票购买不为空,带有儿童票或者耳机的票不为空,组合购买不为空) orderProductList: [], //产品信息列表(单品购买为空,联票购买不为空,带有儿童票或者耳机的票不为空,组合购买不为空)
userId: uni.getStorageSync('openid'), //openid userId: uni.getStorageSync('openid'), //openid
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
orderProductVo: { orderProductVo: {
buyNum: 1, //购买数量 buyNum: 1, //购买数量
couponList: [], couponList: [],
cruisePlanId: "", cruisePlanId: '',
endPlayDate: this.$commonjs.today(), endPlayDate: this.$commonjs.today(),
endPlayTime: this.$commonjs.todayTime(), endPlayTime: this.$commonjs.todayTime(),
isMaster: 0, isMaster: 0,
...@@ -118,32 +118,32 @@ ...@@ -118,32 +118,32 @@
} }
uni.showLoading({ uni.showLoading({
title: '订单创建中' title: '订单创建中'
}); })
this.$request('orderc/order/createOrder', data).then(res => { this.$request('orderc/order/createOrder', data).then(res => {
if (res.code == "00") { if (res.code == '00') {
this.$u.route("pages/orderPayment/orderPayment", { this.$u.route('pages/orderPayment/orderPayment', {
orderId: res.data.id orderId: res.data.id
}) })
uni.hideLoading(); uni.hideLoading()
} else { } else {
uni.showModal({ uni.showModal({
showCancel: false, showCancel: false,
title: '提示', title: '提示',
content: res.message, content: res.message,
}); })
} }
}) })
}, },
changeAddress() { //跳转修改地址页面 changeAddress() { //跳转修改地址页面
this.$u.route("pages/vlog/shippingAddress/shippingAddress",this.address) this.$u.route('pages/vlog/shippingAddress/shippingAddress',this.address)
}, },
getAddress() { //获取收货地址 getAddress() { //获取收货地址
this.$request('wechatUser/contact/findContactList', { this.$request('wechatUser/contact/findContactList', {
openid: uni.getStorageSync("openid") openid: uni.getStorageSync('openid')
}).then(res => { }).then(res => {
if (res.code == "00") { if (res.code == '00') {
if(res.data.length==0){ if(res.data.length==0){
this.$u.route("pages/vlog/shippingAddress/shippingAddress") this.$u.route('pages/vlog/shippingAddress/shippingAddress')
}else{ }else{
this.address = res.data[0] this.address = res.data[0]
this.addressShow = false this.addressShow = false
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
showCancel: false, showCancel: false,
title: '提示', title: '提示',
content: res.message, content: res.message,
}); })
} }
}) })
}, },
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
id: this.productVo.id, id: this.productVo.id,
userAddress:this.address.address userAddress:this.address.address
}).then(res => { }).then(res => {
if (res.code == "00") { if (res.code == '00') {
this.Freight = res.data this.Freight = res.data
this.Freight.defaultCost = (this.Freight.defaultCost * 1).toFixed(2) this.Freight.defaultCost = (this.Freight.defaultCost * 1).toFixed(2)
this.allprice = ((this.productVo.priceStockList[0].sellingPrice * 1) + (this.Freight this.allprice = ((this.productVo.priceStockList[0].sellingPrice * 1) + (this.Freight
...@@ -174,12 +174,12 @@ ...@@ -174,12 +174,12 @@
showCancel: false, showCancel: false,
title: '提示', title: '提示',
content: res.message, content: res.message,
}); })
} }
}) })
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template> <template>
<view class="content"> <view class="content">
<view class="item" style="padding-bottom: 0;"> <view class="item" style="padding-bottom: 0;">
<image src="../../../static/img/vlog/product_fengmian.jpg" mode="widthFix"></image> <image src="../static/vlog/product_fengmian.jpg" mode="widthFix"></image>
<view class="title"> <view class="title">
<view>我的VLOG照片</view> <view>我的VLOG照片</view>
<navigator url="../myVlogPhotos/myVlogPhotos" class="btnn" style="margin-top: 50rpx;"> <navigator url="../myVlogPhotos/myVlogPhotos" class="btnn" style="margin-top: 50rpx;">
...@@ -43,12 +43,12 @@ export default { ...@@ -43,12 +43,12 @@ export default {
}, },
methods: { methods: {
getList(){//获取商品列表 getList(){//获取商品列表
this.$request("scenic/user/product/findProductList", { this.$request('scenic/user/product/findProductList', {
openid: uni.getStorageSync("openid"), openid: uni.getStorageSync('openid'),
productType:9, productType:9,
type:4 type:4
}).then(res => { }).then(res => {
if (res.code == "00") { if (res.code == '00') {
this.list=res.data.list this.list=res.data.list
}else{ }else{
uni.showModal({ uni.showModal({
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<u-section title="模板选择" :right="false" color="#303133"></u-section> <u-section title="模板选择" :right="false" color="#303133"></u-section>
<text style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">Template Selection</text> <text style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">Template Selection</text>
</view> </view>
<image src="../../../static/img/vlog/icon/fengexian.png" style="width: 100%;height: 5rpx;"></image> <image src="../static/vlog/icon/fengexian.png" style="width: 100%;height: 5rpx;"></image>
<view style="display: flex;justify-content: space-around;margin-bottom: 20upx;width: 75%;margin: 20upx auto;"> <view style="display: flex;justify-content: space-around;margin-bottom: 20upx;width: 75%;margin: 20upx auto;">
<button type="default" class="btnn" :class="current===0?'active':'noactive'" <button type="default" class="btnn" :class="current===0?'active':'noactive'"
@click="current=0">封面</button> @click="current=0">封面</button>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<view class="cover"> <view class="cover">
<view class="coverItem1" v-for="(item,index) in imgList2" :key="index"> <view class="coverItem1" v-for="(item,index) in imgList2" :key="index">
<image class="img" :src="item.url" @click="changeCover(item.url)"></image> <image class="img" :src="item.url" @click="changeCover(item.url)"></image>
<image v-if="cover===item.url" src="../../../static/img/vlog/icon/check.png" class="icon"></image> <image v-if="cover===item.url" src="../static/vlog/icon/check.png" class="icon"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<view class="cover"> <view class="cover">
<view class="coverItem" v-for="(item,index) in imgList3" :key="index"> <view class="coverItem" v-for="(item,index) in imgList3" :key="index">
<image class="img" :src="item.url" @click="changeinsidePages(item.url)"></image> <image class="img" :src="item.url" @click="changeinsidePages(item.url)"></image>
<image v-if="insidePages===item.url" src="../../../static/img/vlog/icon/check.png" class="icon"></image> <image v-if="insidePages===item.url" src="../static/vlog/icon/check.png" class="icon"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<u-section title="详细参数" :right="false" color="#303133"></u-section> <u-section title="详细参数" :right="false" color="#303133"></u-section>
<text style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">Parameters</text> <text style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">Parameters</text>
</view> </view>
<image src="../../../static/img/vlog/icon/fengexian.png" mode="" style="width: 100%;height: 5rpx;"></image> <image src="../static/vlog/icon/fengexian.png" mode="" style="width: 100%;height: 5rpx;"></image>
<image :src="item.url" mode="widthFix" v-for="(item,index) in imgList1" :key="index" style="width: 100%;border-radius: 10rpx;"></image> <image :src="item.url" mode="widthFix" v-for="(item,index) in imgList1" :key="index" style="width: 100%;border-radius: 10rpx;"></image>
<view class="bottom" @click="beginMaking">上传照片制作</view> <view class="bottom" @click="beginMaking">上传照片制作</view>
</view> </view>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
showBody: false, showBody: false,
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
imgList2: [], //封面列表 imgList2: [], //封面列表
imgList3: [], //内页列表 imgList3: [], //内页列表
current: 0, //封面内页切换 current: 0, //封面内页切换
cover: "", //封面 cover: '', //封面
insidePages: "", //内页 insidePages: '', //内页
} }
}, },
...@@ -77,11 +77,11 @@ ...@@ -77,11 +77,11 @@
}, },
methods: { methods: {
getDetails(id) { //获取商品详情 getDetails(id) { //获取商品详情
this.$request("scenic/user/product/findChoseProductInfo", { this.$request('scenic/user/product/findChoseProductInfo', {
productId: id, productId: id,
openid: uni.getStorageSync("openid") openid: uni.getStorageSync('openid')
}).then(res => { }).then(res => {
if (res.code === "00") { if (res.code === '00') {
this.showBody = true this.showBody = true
this.productVo = res.data.productVo this.productVo = res.data.productVo
uni.setStorageSync('productVo', this.productVo) //保存选择的商品信息 uni.setStorageSync('productVo', this.productVo) //保存选择的商品信息
...@@ -112,19 +112,19 @@ ...@@ -112,19 +112,19 @@
this.insidePages = url this.insidePages = url
}, },
beginMaking() { beginMaking() {
if (this.cover === "") { if (this.cover === '') {
return uni.showModal({ return uni.showModal({
showCancel: false, showCancel: false,
title: '提示', title: '提示',
content: '请选择封面', content: '请选择封面',
}); })
} }
if (this.insidePages === "") { if (this.insidePages === '') {
return uni.showModal({ return uni.showModal({
showCancel: false, showCancel: false,
title: '提示', title: '提示',
content: '请选择内页', content: '请选择内页',
}); })
} }
let coverInside = { let coverInside = {
cover: { cover: {
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
}) })
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
......
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
</block> </block>
</view> </view>
<view class="bottom"> <view class="bottom">
<image src="../../../static/img/vlog/icon/bottom.png"></image> <image src="../static/vlog/icon/bottom.png"></image>
<navigator url="../vlogface/vlogface"> <navigator url="../vlogface/vlogface">
<view class="paizhao"> <view class="paizhao">
<image src="../../../static/img/vlog/icon/icon_scan.png"></image> <image src="../static/vlog/icon/icon_scan.png"></image>
<view style="width: 100%;text-align: center;margin-top:10rpx;color: #FFFFFF;">获取Vlog</view> <view style="width: 100%;text-align: center;margin-top:10rpx;color: #FFFFFF;">获取Vlog</view>
</view> </view>
</navigator> </navigator>
...@@ -29,13 +29,13 @@ ...@@ -29,13 +29,13 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
productUrl: "", //视频地址 productUrl: '', //视频地址
thumbImageUrl: "", //图片地址 thumbImageUrl: '', //图片地址
merchantName: "", //景区名称 merchantName: '', //景区名称
videoContext:"" videoContext:''
} }
}, },
onReady() { //代替 vue 里面的 mounted onReady() { //代替 vue 里面的 mounted
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
methods: { methods: {
playVideo(){ playVideo(){
// 获取 video 上下文 videoContext 对象 // 获取 video 上下文 videoContext 对象
this.videoContext = uni.createVideoContext('myVideo',this); this.videoContext = uni.createVideoContext('myVideo',this)
// 进入全屏状态 // 进入全屏状态
this.videoContext.requestFullScreen({direction:-90}) this.videoContext.requestFullScreen({direction:-90})
}, },
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
}) })
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<block v-for="(item,index) in imgList" :key="index"> <block v-for="(item,index) in imgList" :key="index">
<view class="imgItem" @click="changeImg(item,index)"> <view class="imgItem" @click="changeImg(item,index)">
<image :src="'http://picture.pangdly.com/'+item.url"></image> <image :src="'http://picture.pangdly.com/'+item.url"></image>
<image v-if="item.check===1" src="../../../static/img/vlog/icon/check.png" class="icon"></image> <image v-if="item.check===1" src="../static/vlog/icon/check.png" class="icon"></image>
</view> </view>
</block> </block>
</view> </view>
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
maxImg: "", //相册规格张数 maxImg: '', //相册规格张数
imgList: [], //上传的图片列表 imgList: [], //上传的图片列表
checkList: [], //选中的图片下标 checkList: [], //选中的图片下标
} }
...@@ -40,21 +40,21 @@ ...@@ -40,21 +40,21 @@
onLoad(opction) { //代替 vue 里面的 created onLoad(opction) { //代替 vue 里面的 created
this.maxImg = opction.yeshu //获取相册规格 this.maxImg = opction.yeshu //获取相册规格
this.imgList = uni.getStorageSync("imgList") this.imgList = uni.getStorageSync('imgList')
this.checkList = uni.getStorageSync("checkList") this.checkList = uni.getStorageSync('checkList')
if (this.imgList === "") { if (this.imgList === '') {
this.imgList = [] this.imgList = []
uni.setStorageSync("imgList", this.imgList) uni.setStorageSync('imgList', this.imgList)
} }
if (this.checkList === "") { if (this.checkList === '') {
this.checkList = [] this.checkList = []
uni.setStorageSync("checkList", this.checkList) uni.setStorageSync('checkList', this.checkList)
} }
// 监听从裁剪页发布的事件,获得裁剪结果 // 监听从裁剪页发布的事件,获得裁剪结果
uni.$on('uAvatarCropper', path => { uni.$on('uAvatarCropper', path => {
var that = this var that = this
var url = "https://manager.pangdly.com/" var url = 'https://manager.pangdly.com/'
uni.uploadFile({ // s上传图片 uni.uploadFile({ // s上传图片
url: url + 'upload/file/newUpload', url: url + 'upload/file/newUpload',
filePath: path, filePath: path,
...@@ -64,13 +64,13 @@ ...@@ -64,13 +64,13 @@
}, },
success: res => { //获取图片结果 success: res => { //获取图片结果
let res1 = JSON.parse(res.data) let res1 = JSON.parse(res.data)
if (res1.code == "00") { //请求成功 if (res1.code == '00') { //请求成功
let obj = { let obj = {
url: res1.data, url: res1.data,
check: 0 check: 0
} }
that.imgList.push(obj) that.imgList.push(obj)
uni.setStorageSync("imgList", that.imgList) uni.setStorageSync('imgList', that.imgList)
} else { } else {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
...@@ -90,60 +90,60 @@ ...@@ -90,60 +90,60 @@
return uni.showModal({ return uni.showModal({
showCancel: false, showCancel: false,
title: '提示', title: '提示',
content: '相册规格' + this.maxImg + "张,请按照标准选择", content: '相册规格' + this.maxImg + '张,请按照标准选择',
}); })
} }
this.$u.route("pages/vlog/pictureFormat/pictureFormat") this.$u.route('pages/vlog/pictureFormat/pictureFormat')
}, },
del() { //删除图片 del() { //删除图片
if (this.checkList.length === 0) { if (this.checkList.length === 0) {
uni.showModal({ uni.showModal({
showCancel: false, showCancel: false,
title: '提示', title: '提示',
content: "当前未选中任何图片!", content: '当前未选中任何图片!',
}); })
} else { } else {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: "确定要删除选中的图片吗?", content: '确定要删除选中的图片吗?',
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
this.checkList.forEach(item => { this.checkList.forEach(item => {
this.imgList.splice(item, 1) this.imgList.splice(item, 1)
}) })
this.checkList = [] this.checkList = []
uni.setStorageSync("checkList", this.checkList) uni.setStorageSync('checkList', this.checkList)
uni.setStorageSync("imgList", this.imgList) uni.setStorageSync('imgList', this.imgList)
} }
} }
}); })
} }
}, },
changeImg(item, index) { //选择图片 changeImg(item, index) { //选择图片
if (item.check === 0) { if (item.check === 0) {
if (this.checkList.length < this.maxImg) { if (this.checkList.length < this.maxImg) {
item.check = 1; item.check = 1
this.checkList.push(index) this.checkList.push(index)
uni.setStorageSync("checkList", this.checkList) uni.setStorageSync('checkList', this.checkList)
uni.setStorageSync("imgList", this.imgList) uni.setStorageSync('imgList', this.imgList)
} else { } else {
uni.showModal({ uni.showModal({
showCancel: false, showCancel: false,
title: '提示', title: '提示',
content: '最多选取' + this.maxImg + "张", content: '最多选取' + this.maxImg + '张',
}); })
} }
} else { } else {
item.check = 0; item.check = 0
this.checkList.splice(this.checkList.indexOf(index), 1) this.checkList.splice(this.checkList.indexOf(index), 1)
uni.setStorageSync("checkList", this.checkList) uni.setStorageSync('checkList', this.checkList)
uni.setStorageSync("imgList", this.imgList) uni.setStorageSync('imgList', this.imgList)
} }
}, },
chooseAvatar() { //上传照片 chooseAvatar() { //上传照片
this.$u.route({ this.$u.route({
url: "pages/vlog/u-avatar-cropper/u-avatar-cropper", url: 'pages/vlog/u-avatar-cropper/u-avatar-cropper',
params: { params: {
// 输出图片宽高,单位px // 输出图片宽高,单位px
destWidth: 1000, destWidth: 1000,
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
}) })
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
</view> </view>
<navigator url="../myVlog/myVlog"> <navigator url="../myVlog/myVlog">
<view class="photoGallery"> <view class="photoGallery">
<image class="img" src="../../../static/img/vlog/icon/bg1.png"></image> <image class="img" src="../static/vlog/icon/bg1.png"></image>
<view class="access"></view> <view class="access"></view>
<view class="btnn"> <view class="btnn">
<image src="../../../static/img/vlog/icon/icon_clicktoenter.png"></image> <image src="../static/vlog/icon/icon_clicktoenter.png"></image>
<view> <view>
点击进入 点击进入
</view> </view>
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
</view> </view>
<navigator url="../product/product"> <navigator url="../product/product">
<view class="photoGallery"> <view class="photoGallery">
<image class="img" src="../../../static/img/vlog/icon/bg2.png"></image> <image class="img" src="../static/vlog/icon/bg2.png"></image>
<view class="access"></view> <view class="access"></view>
<view class="btnn"> <view class="btnn">
<image src="../../../static/img/vlog/icon/icon_clicktoenter.png"></image> <image src="../static/vlog/icon/icon_clicktoenter.png"></image>
<view> <view>
点击进入 点击进入
</view> </view>
...@@ -50,14 +50,14 @@ ...@@ -50,14 +50,14 @@
</navigator> </navigator>
</block> </block>
</view> </view>
<navigator url="../../album/albumIndex?index=1"> <!-- <navigator url="../../album/albumIndex?index=1">
<view class="album">相册首页</view> <view class="album">相册首页</view>
</navigator> </navigator> -->
<view class="bottom"> <view class="bottom">
<image src="../../../static/img/vlog/icon/bottom.png"></image> <image src="../static/vlog/icon/bottom.png"></image>
<navigator url="../vlogface/vlogface"> <navigator url="../vlogface/vlogface">
<view class="paizhao"> <view class="paizhao">
<image src="../../../static/img/vlog/icon/icon_scan.png"></image> <image src="../static/vlog/icon/icon_scan.png"></image>
<view style="width: 100%;text-align: center;margin-top:10rpx;color: #FFFFFF;">获取Vlog</view> <view style="width: 100%;text-align: center;margin-top:10rpx;color: #FFFFFF;">获取Vlog</view>
</view> </view>
</navigator> </navigator>
...@@ -73,13 +73,13 @@ export default { ...@@ -73,13 +73,13 @@ export default {
scenicList: [], //景区列表 scenicList: [], //景区列表
search: '', //景区 search: '', //景区
list: [{ list: [{
image: '../../../static/img/vlog/swipe/swipe1.jpg' image: '../static/vlog/swipe/swipe1.jpg'
}, },
{ {
image: '../../../static/img/vlog/swipe/swipe2.jpg' image: '../static/vlog/swipe/swipe2.jpg'
}, },
{ {
image: '../../../static/img/vlog/swipe/swipe3.jpg' image: '../static/vlog/swipe/swipe3.jpg'
} }
], ],
} }
......
<template> <template>
<view class="content"> <view class="content">
<view class="bg"> <view class="bg">
<image src="../../../static/img/vlog/icon/camera.png"></image> <image src="../static/vlog/icon/camera.png"></image>
</view> </view>
<camera class="camera" device-position="front" flash="off" @error="error" @initdone="initdone"></camera> <camera class="camera" device-position="front" flash="off" @error="error" @initdone="initdone"></camera>
<view class="surface" v-show="show"> <view class="surface" v-show="show">
...@@ -14,20 +14,20 @@ ...@@ -14,20 +14,20 @@
<view class="hint1"> <view class="hint1">
<view class="item"> <view class="item">
<view class=""> <view class="">
<image src="../../../static/img/vlog/icon/icon_lightisenough.png"></image> <image src="../static/vlog/icon/icon_lightisenough.png"></image>
</view> </view>
<view>光线充足</view> <view>光线充足</view>
</view> </view>
<view class="item"> <view class="item">
<view class=""> <view class="">
<image src="../../../static/img/vlog/icon/icon_isthelens.png"></image> <image src="../static/vlog/icon/icon_isthelens.png"></image>
</view> </view>
<view>正对镜头</view> <view>正对镜头</view>
</view> </view>
<view class="item"> <view class="item">
<view class=""> <view class="">
<image src="../../../static/img/vlog/icon/icon_openface.png"></image> <image src="../static/vlog/icon/icon_openface.png"></image>
</view> </view>
<view>不遮挡面部</view> <view>不遮挡面部</view>
</view> </view>
......
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