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

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

parent 92ec6c51
......@@ -47,8 +47,11 @@ export default{
var c = b.replace(regss,'')
return c
},
getUrlKey:function(name){//通过连接地址获取参数值
return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ''])[1].replace(/\+/g, '%20') || ''
phoneReg:function(){//手机正则
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,并保持在本地
......@@ -65,12 +68,30 @@ export default{
//#endif
let companyId=''
if(enterUrl){//普通二维码扫码进入
companyId=getUrlKey('companyId')||uni.getStorageSync('companyId')||''
companyId=this.getUrlKey('companyId',enterUrl)||uni.getStorageSync('companyId')||''
}else{//小程序页面跳转进入
companyId=option.companyId||uni.getStorageSync('companyId')||''
}
uni.setStorageSync('companyId',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()
\ No newline at end of file
var baseUrl = ''
if(process.env.NODE_ENV === 'development'){//开发环境
baseUrl= 'http://pay.tuyoyoo.com/'
baseUrl= 'https://pay.tuyoyoo.com/'
}else{
baseUrl= 'https://manager.pangdly.com/'
}
......
......@@ -88,7 +88,7 @@
<text class="middle-tip">
取片电话:
</text>
<input type="number" placeholder="请输入取片人手机号码" />
<input type="number" placeholder="请输入取片人手机号码" v-model.trim="printPhone"/>
</view>
<view>
......@@ -128,7 +128,7 @@
</view>
<view class="pop-bottom">
<text class="pop-btn">
<text class="pop-btn" @click="commit()">
提交
</text>
</view>
......@@ -148,6 +148,7 @@ export default {
imgList:[],//下载图片列表
downImgNumber:0,//下载图片的数量
extendContent:'',//额外信息
printPhone:'',//打印电话号码
}
},
onLoad(option) {
......@@ -161,6 +162,36 @@ export default {
}
},
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){
uni.setClipboardData({
......
......@@ -47,6 +47,12 @@
行程订制
</view>
</view>
<view @click="goAlbum()">
<image src="@/static/img/index/album.png"></image>
<view>
摄影/旅拍
</view>
</view>
<view @click="goVlog()">
<image src="@/static/img/index/video.png"></image>
<view>
......@@ -266,6 +272,12 @@ export default {
url:'/pages/hotel/hotelIndex/hotelIndex'
})
},
//跳转影集首页
goAlbum(){
uni.navigateTo({
url:'/pages/album/albumIndex?index=1'
})
},
//---跳转vlog
goVlog(){
uni.navigateTo({
......
......@@ -126,14 +126,14 @@
通行码
</view>
</view>
<!-- <view class="middle3-list" @click="goMyPhoto()">
<view class="middle3-list" @click="goMyPhoto()">
<view>
<image src="@/static/img/my/center/album.png"></image>
</view>
<view>
我的影集
</view>
</view> -->
</view>
<view class="middle3-list" @click="goshopping()">
<view>
<image src="@/static/img/my/center/shopping.png"></image>
......
......@@ -56,7 +56,6 @@
export default {
data() {
return {
enterUrl: '', //进入页面路由
orderList:[], //订单列表
pdOrderMoney: '', //实际总价
totalMoney: '', //原价总价
......@@ -79,19 +78,13 @@ export default {
},
onLoad(option) {
//#ifdef MP-WEIXIN
this.enterUrl = option.q
this.payType = 42
//#endif
//#ifdef MP-ALIPAY
this.enterUrl = uni.getStorageSync('alipayQrCode')
this.payType = 33
//#endif
if (this.enterUrl) {
this.orderId = this.getUrlKey('orderId')
} else {
this.orderId = option.orderId||''
}
this.orderId=this.$commonjs.getKey(option,'orderId')
this.ifyukuaiCode = option.ifyukuaiCode||''
this.albumOrderdetail=option.albumOrderdetail||''
this.openid = uni.getStorageSync('openid') || ''
......@@ -266,10 +259,6 @@ export default {
}
})
// #endif
},
getUrlKey(name) {
//---------------------------------------------------------------获取url
return (new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ''])[1].replace(/\+/g, '%20') || ''
}
}
}
......
......@@ -14,7 +14,7 @@
<view v-else-if="vlogList.length===0 && show===false" class="empty">
<view class="row">
<text>空空如也...</text>
<image src="../../../static/img/vlog/icon/icon_thereisnovideo.png"></image>
<image src="../static/vlog/icon/icon_thereisnovideo.png"></image>
</view>
<navigator url="../vlogface/vlogface" class="btnn">
<view>点击获取我的Vlog</view>
......@@ -25,64 +25,64 @@
</template>
<script>
export default {
data() {
return {
show: true, //跳转过渡页面
vlogList: [], //我的vlog集合
}
},
onReady() {},
onLoad() {
this.$request('distribution/vlog/getVlogCreateInfo', {//获取结果
userId: uni.getStorageSync('openid')
}).then(res=>{
setTimeout(()=>{
this.getMyVlogList()
},1000)
})
},
methods: {
navTo(item){
this.$u.route('/pages/vlog/vlogList/vlogList?merchantId='+item.merchantId)
},
getMyVlogList(){
this.$request('wechatUser/myPage/getVlogRecord', {
openid: uni.getStorageSync('openid'),
productType:0
}).then(res => {
this.show = false
if(res.code==='00'){
this.vlogList = res.data
if (this.vlogList.length > 0) { //如果有数据
uni.setNavigationBarColor({ //动态更改导航条颜色
frontColor: '#ffffff',
backgroundColor: '#192033',
animation: {
duration: 1,
timingFunc: 'easeIn'
}
})
uni.setBackgroundColor({
backgroundColor: '#192033'
})
} else { //数据为空
this.show = false
}
}else{
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
})
}
})
},
query(e) {
console.log(e)
},
}
}
export default {
data() {
return {
show: true, //跳转过渡页面
vlogList: [], //我的vlog集合
}
},
onReady() {},
onLoad() {
this.$request('distribution/vlog/getVlogCreateInfo', {//获取结果
userId: uni.getStorageSync('openid')
}).then(res=>{
setTimeout(()=>{
this.getMyVlogList()
},1000)
})
},
methods: {
navTo(item){
this.$u.route('/pages/vlog/vlogList/vlogList?merchantId='+item.merchantId)
},
getMyVlogList(){
this.$request('wechatUser/myPage/getVlogRecord', {
openid: uni.getStorageSync('openid'),
productType:0
}).then(res => {
this.show = false
if(res.code==='00'){
this.vlogList = res.data
if (this.vlogList.length > 0) { //如果有数据
uni.setNavigationBarColor({ //动态更改导航条颜色
frontColor: '#ffffff',
backgroundColor: '#192033',
animation: {
duration: 1,
timingFunc: 'easeIn'
}
})
uni.setBackgroundColor({
backgroundColor: '#192033'
})
} else { //数据为空
this.show = false
}
}else{
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
})
}
})
},
query(e) {
console.log(e)
},
}
}
</script>
<style lang="scss" scoped>
......
......@@ -4,7 +4,7 @@
<u-section title="精彩瞬间" :right="false" color="#303133"></u-section>
<text style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">MOMENT</text>
</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="item" v-for="(item,index) in list" :key="index">
<image :src="item.thumbImageUrl" mode="widthFix"></image>
......@@ -20,107 +20,107 @@
</view>
</template>
<script>
export default {
data() {
return {
list: [], //相片列表
checkImg: '', //选中的图片
}
},
onLoad() { //代替 vue 里面的 created
this.getPhotoData()
},
onReady() { //代替 vue 里面的 mounted
},
methods: {
handleDownload(url) { // 下载功能
uni.showLoading({
title: '下载中',
mask: true
})
let fileName = new Date().valueOf() //获取时间戳
uni.downloadFile({ //下载文件资源到本地
url,
filePath: wx.env.USER_DATA_PATH + '/' + fileName + '.jpg', //filePath指定文件下载后存储的路径,wx.env.USER_DATA_PATH,时间戳为文件名
success: res => { //下载到本地成功
let filePath = res.filePath
uni.saveImageToPhotosAlbum({ //保存视频到系统相册。
filePath,
success: file => { //保存成功
//删除本地缓存
let fileMgr = uni.getFileSystemManager()
fileMgr.unlink({
filePath: wx.env.USER_DATA_PATH + '/' + fileName + '.jpg',
})
uni.showToast({
title: '下载成功',
icon: 'success',
mask: true
})
},
fail: err => {
uni.hideLoading()
//拒绝授权时显示
if (err.errMsg === 'saveImageToPhotosAlbum:fail auth deny') {
uni.showModal({
title: '提示',
content: '需要您授权保存相册',
showCancel: false,
success: data => {
//打开权限设置
uni.openSetting({
success: setting => {
if (setting.authSetting['scope.writePhotosAlbum']) {
uni.showModal({
title: '提示',
content: '获取权限成功,再次点击下载即可保存',
showCancel: false,
})
} else {
uni.showModal({
title: '提示',
ontent: '获取权限失败,将无法保存到相册哦',
showCancel: false
})
}
},
})
}
})
}
}
})
},
fail: err => { //下载失败
uni.hideLoading()
if (err.errMsg == 'downloadFile:fail createDownloadTask:fail url not in domain list') {
uni.showToast({
title: '服务器错误,请联系相关管理员',
icon: 'none',
mask: true
})
}
}
})
},
getPhotoData() { //获取用户vlog图片
this.$request('wechatUser/myPage/getVlogRecord', {
openid: uni.getStorageSync('openid'),
productType: 1
}).then(res => {
if (res.code === '00') {
this.list = res.data
} else {
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
})
}
})
}
}
}
export default {
data() {
return {
list: [], //相片列表
checkImg: '', //选中的图片
}
},
onLoad() { //代替 vue 里面的 created
this.getPhotoData()
},
onReady() { //代替 vue 里面的 mounted
},
methods: {
handleDownload(url) { // 下载功能
uni.showLoading({
title: '下载中',
mask: true
})
let fileName = new Date().valueOf() //获取时间戳
uni.downloadFile({ //下载文件资源到本地
url,
filePath: wx.env.USER_DATA_PATH + '/' + fileName + '.jpg', //filePath指定文件下载后存储的路径,wx.env.USER_DATA_PATH,时间戳为文件名
success: res => { //下载到本地成功
let filePath = res.filePath
uni.saveImageToPhotosAlbum({ //保存视频到系统相册。
filePath,
success: file => { //保存成功
//删除本地缓存
let fileMgr = uni.getFileSystemManager()
fileMgr.unlink({
filePath: wx.env.USER_DATA_PATH + '/' + fileName + '.jpg',
})
uni.showToast({
title: '下载成功',
icon: 'success',
mask: true
})
},
fail: err => {
uni.hideLoading()
//拒绝授权时显示
if (err.errMsg === 'saveImageToPhotosAlbum:fail auth deny') {
uni.showModal({
title: '提示',
content: '需要您授权保存相册',
showCancel: false,
success: data => {
//打开权限设置
uni.openSetting({
success: setting => {
if (setting.authSetting['scope.writePhotosAlbum']) {
uni.showModal({
title: '提示',
content: '获取权限成功,再次点击下载即可保存',
showCancel: false,
})
} else {
uni.showModal({
title: '提示',
ontent: '获取权限失败,将无法保存到相册哦',
showCancel: false
})
}
},
})
}
})
}
}
})
},
fail: err => { //下载失败
uni.hideLoading()
if (err.errMsg == 'downloadFile:fail createDownloadTask:fail url not in domain list') {
uni.showToast({
title: '服务器错误,请联系相关管理员',
icon: 'none',
mask: true
})
}
}
})
},
getPhotoData() { //获取用户vlog图片
this.$request('wechatUser/myPage/getVlogRecord', {
openid: uni.getStorageSync('openid'),
productType: 1
}).then(res => {
if (res.code === '00') {
this.list = res.data
} else {
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
......
......@@ -14,7 +14,7 @@
</view>
<u-icon name="arrow-right" class="icon" color="#666666"></u-icon>
</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">
<image :src="productVo.priceStockList[0].imgList[0].url"></image>
<view class="title">
......@@ -36,150 +36,150 @@
</template>
<script>
export default {
data() {
return {
showBody: false,
price: "", //单价
allprice: "", //总价
productVo: {}, //当前的产品信息
address: {
name: "", //姓名
phone: "", //联系电话
address: "" //地址
}, //地址信息
addressShow: true,//地址栏弹窗
Freight: {}, //手续费信息
}
},
onLoad() { //created
this.productVo = uni.getStorageSync('productVo')
this.price = (this.productVo.priceStockList[0].sellingPrice * 1).toFixed(2)
this.getAddress()
},
onReady() { //mounted
},
methods: {
confirm() { //确认订单
if (this.address.name == '') {
return uni.showLoading({
title: '收件人不能为空!'
});
}
if (this.address.address == '') {
return uni.showLoading({
title: '收货地址不能为空!'
});
}
if (this.address.phone == '') {
return uni.showLoading({
title: '联系方式不能为空!'
});
}
let imgList = []
imgList = uni.getStorageSync('sortImglist')
let coverInside = uni.getStorageSync('coverInside')
imgList.push(uni.getStorageSync('coverInside').cover)
imgList.push(uni.getStorageSync('coverInside').inside)
let data = {
buyMethod: 1, //购买方式:1 单品购买,2套票、联票购买,3组合购买
cash: 0, //现金抵扣
companyId: "10001", //来源公司id(分销商Id)
orderMoney: this.allprice * 1, //订单总价 = 订单原价 - 优惠券价格 - 现金抵扣价格
orderProductList: [], //产品信息列表(单品购买为空,联票购买不为空,带有儿童票或者耳机的票不为空,组合购买不为空)
userId: uni.getStorageSync('openid'), //openid
orderSource: 1, //订单来源 1公众号平台、2公众号组合页面1、3公众号组合页面2、4胖丁伙伴app、5第三方自助机、6第三方票房窗口
orderType: 4, //订单类型(0其他,1景区,2酒店,3餐饮,4特产,5运营车,10组合订单)
ticketPhone: this.address.phone, //联系电话
orderProductVo: {
buyNum: 1, //购买数量
couponList: [],
cruisePlanId: "",
endPlayDate: this.$commonjs.today(),
endPlayTime: this.$commonjs.todayTime(),
isMaster: 0,
distributionPrice: this.price * 1, //分销商价格
merchantId: this.productVo.merchantId, //商户id
playDate: this.$commonjs.today(),
productId: this.productVo.id,
startPlayTime: this.$commonjs.todayTime(),
subOrderType: 0, //子订单类型(0、网络,1、扫码,2、自助机,3 组合,4、扫码支付,5、预订)
unitPrice: this.price * 1, //产品单价
orderImgList: imgList, //订单图片
postage: this.Freight.defaultCost * 1, //邮费
orderTouristList: [{ //用户收货地址信息
category: 0,
name: this.address.name,
touristAddress: this.address.address,
phone: this.address.phone
}],
}
export default {
data() {
return {
showBody: false,
price: '', //单价
allprice: '', //总价
productVo: {}, //当前的产品信息
address: {
name: '', //姓名
phone: '', //联系电话
address: '' //地址
}, //地址信息
addressShow: true,//地址栏弹窗
Freight: {}, //手续费信息
}
},
onLoad() { //created
this.productVo = uni.getStorageSync('productVo')
this.price = (this.productVo.priceStockList[0].sellingPrice * 1).toFixed(2)
this.getAddress()
},
onReady() { //mounted
},
methods: {
confirm() { //确认订单
if (this.address.name == '') {
return uni.showLoading({
title: '收件人不能为空!'
})
}
if (this.address.address == '') {
return uni.showLoading({
title: '收货地址不能为空!'
})
}
if (this.address.phone == '') {
return uni.showLoading({
title: '联系方式不能为空!'
})
}
let imgList = []
imgList = uni.getStorageSync('sortImglist')
let coverInside = uni.getStorageSync('coverInside')
imgList.push(uni.getStorageSync('coverInside').cover)
imgList.push(uni.getStorageSync('coverInside').inside)
let data = {
buyMethod: 1, //购买方式:1 单品购买,2套票、联票购买,3组合购买
cash: 0, //现金抵扣
companyId: '10001', //来源公司id(分销商Id)
orderMoney: this.allprice * 1, //订单总价 = 订单原价 - 优惠券价格 - 现金抵扣价格
orderProductList: [], //产品信息列表(单品购买为空,联票购买不为空,带有儿童票或者耳机的票不为空,组合购买不为空)
userId: uni.getStorageSync('openid'), //openid
orderSource: 1, //订单来源 1公众号平台、2公众号组合页面1、3公众号组合页面2、4胖丁伙伴app、5第三方自助机、6第三方票房窗口
orderType: 4, //订单类型(0其他,1景区,2酒店,3餐饮,4特产,5运营车,10组合订单)
ticketPhone: this.address.phone, //联系电话
orderProductVo: {
buyNum: 1, //购买数量
couponList: [],
cruisePlanId: '',
endPlayDate: this.$commonjs.today(),
endPlayTime: this.$commonjs.todayTime(),
isMaster: 0,
distributionPrice: this.price * 1, //分销商价格
merchantId: this.productVo.merchantId, //商户id
playDate: this.$commonjs.today(),
productId: this.productVo.id,
startPlayTime: this.$commonjs.todayTime(),
subOrderType: 0, //子订单类型(0、网络,1、扫码,2、自助机,3 组合,4、扫码支付,5、预订)
unitPrice: this.price * 1, //产品单价
orderImgList: imgList, //订单图片
postage: this.Freight.defaultCost * 1, //邮费
orderTouristList: [{ //用户收货地址信息
category: 0,
name: this.address.name,
touristAddress: this.address.address,
phone: this.address.phone
}],
}
}
uni.showLoading({
title: '订单创建中'
});
this.$request('orderc/order/createOrder', data).then(res => {
if (res.code == "00") {
this.$u.route("pages/orderPayment/orderPayment", {
orderId: res.data.id
})
uni.hideLoading();
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: res.message,
});
}
})
},
changeAddress() { //跳转修改地址页面
this.$u.route("pages/vlog/shippingAddress/shippingAddress",this.address)
},
getAddress() { //获取收货地址
this.$request('wechatUser/contact/findContactList', {
openid: uni.getStorageSync("openid")
}).then(res => {
if (res.code == "00") {
if(res.data.length==0){
this.$u.route("pages/vlog/shippingAddress/shippingAddress")
}else{
this.address = res.data[0]
this.addressShow = false
this.getFreight()
}
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: res.message,
});
}
})
},
getFreight() { //获取运费
this.$request('scenic/user/product/getProductPostage', {
id: this.productVo.id,
userAddress:this.address.address
}).then(res => {
if (res.code == "00") {
this.Freight = res.data
this.Freight.defaultCost = (this.Freight.defaultCost * 1).toFixed(2)
this.allprice = ((this.productVo.priceStockList[0].sellingPrice * 1) + (this.Freight
.defaultCost * 1))
this.showBody = true
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: res.message,
});
}
})
},
}
}
}
uni.showLoading({
title: '订单创建中'
})
this.$request('orderc/order/createOrder', data).then(res => {
if (res.code == '00') {
this.$u.route('pages/orderPayment/orderPayment', {
orderId: res.data.id
})
uni.hideLoading()
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: res.message,
})
}
})
},
changeAddress() { //跳转修改地址页面
this.$u.route('pages/vlog/shippingAddress/shippingAddress',this.address)
},
getAddress() { //获取收货地址
this.$request('wechatUser/contact/findContactList', {
openid: uni.getStorageSync('openid')
}).then(res => {
if (res.code == '00') {
if(res.data.length==0){
this.$u.route('pages/vlog/shippingAddress/shippingAddress')
}else{
this.address = res.data[0]
this.addressShow = false
this.getFreight()
}
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: res.message,
})
}
})
},
getFreight() { //获取运费
this.$request('scenic/user/product/getProductPostage', {
id: this.productVo.id,
userAddress:this.address.address
}).then(res => {
if (res.code == '00') {
this.Freight = res.data
this.Freight.defaultCost = (this.Freight.defaultCost * 1).toFixed(2)
this.allprice = ((this.productVo.priceStockList[0].sellingPrice * 1) + (this.Freight
.defaultCost * 1))
this.showBody = true
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: res.message,
})
}
})
},
}
}
</script>
<style lang="scss" scoped>
......
<template>
<view class="content">
<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>我的VLOG照片</view>
<navigator url="../myVlogPhotos/myVlogPhotos" class="btnn" style="margin-top: 50rpx;">
......@@ -31,35 +31,35 @@
</template>
<script>
export default {
data() {
return {
list:[],//商品列表
}
},
onLoad(){//代替 vue 里面的 created
this.getList()
},
onReady() {//代替 vue 里面的 mounted
},
methods: {
getList(){//获取商品列表
this.$request("scenic/user/product/findProductList", {
openid: uni.getStorageSync("openid"),
productType:9,
type:4
}).then(res => {
if (res.code == "00") {
this.list=res.data.list
}else{
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
})
}
})
}
}
data() {
return {
list:[],//商品列表
}
},
onLoad(){//代替 vue 里面的 created
this.getList()
},
onReady() {//代替 vue 里面的 mounted
},
methods: {
getList(){//获取商品列表
this.$request('scenic/user/product/findProductList', {
openid: uni.getStorageSync('openid'),
productType:9,
type:4
}).then(res => {
if (res.code == '00') {
this.list=res.data.list
}else{
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
......
......@@ -16,7 +16,7 @@
<u-section title="模板选择" :right="false" color="#303133"></u-section>
<text style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">Template Selection</text>
</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;">
<button type="default" class="btnn" :class="current===0?'active':'noactive'"
@click="current=0">封面</button>
......@@ -27,7 +27,7 @@
<view class="cover">
<view class="coverItem1" v-for="(item,index) in imgList2" :key="index">
<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>
......@@ -35,7 +35,7 @@
<view class="cover">
<view class="coverItem" v-for="(item,index) in imgList3" :key="index">
<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>
......@@ -43,7 +43,7 @@
<u-section title="详细参数" :right="false" color="#303133"></u-section>
<text style="font-size: 24rpx;color: #ccc;margin-left: 30rpx;">Parameters</text>
</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>
<view class="bottom" @click="beginMaking">上传照片制作</view>
</view>
......@@ -53,97 +53,97 @@
</view>
</template>
<script>
export default {
data() {
return {
showBody: false,
productVo: {}, //产品详情
imgList1: [], //详情列表
imgList2: [], //封面列表
imgList3: [], //内页列表
current: 0, //封面内页切换
cover: "", //封面
insidePages: "", //内页
export default {
data() {
return {
showBody: false,
productVo: {}, //产品详情
imgList1: [], //详情列表
imgList2: [], //封面列表
imgList3: [], //内页列表
current: 0, //封面内页切换
cover: '', //封面
insidePages: '', //内页
}
},
onLoad(option) { //代替 vue 里面的 created
uni.setNavigationBarTitle({
title: option.name
})
this.getDetails(option.id)
},
onReady() { //代替 vue 里面的 mounted
},
methods: {
getDetails(id) { //获取商品详情
this.$request("scenic/user/product/findChoseProductInfo", {
productId: id,
openid: uni.getStorageSync("openid")
}).then(res => {
if (res.code === "00") {
this.showBody = true
this.productVo = res.data.productVo
uni.setStorageSync('productVo', this.productVo) //保存选择的商品信息
res.data.productVo.imgList.forEach(item => {
if (item.location === 5) {
this.imgList1.push(item)
}
if (item.location === 6) {
this.imgList2.push(item)
}
if (item.location === 8) {
this.imgList3.push(item)
}
})
} else {
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
})
}
})
},
changeCover(url) { //选择封面
this.cover = url
},
changeinsidePages(url) { //选择内页
this.insidePages = url
},
beginMaking() {
if (this.cover === "") {
return uni.showModal({
showCancel: false,
title: '提示',
content: '请选择封面',
});
}
if (this.insidePages === "") {
return uni.showModal({
showCancel: false,
title: '提示',
content: '请选择内页',
});
}
let coverInside = {
cover: {
imgName: '封面',
imgUrl: this.cover
},
inside: {
imgName: '内页',
imgUrl: this.insidePages
}
}
uni.setStorageSync('coverInside', coverInside)
let yeshu = this.productVo.priceStockList[0].standardName
this.$u.route({
url: 'pages/vlog/uploadPictures/uploadPictures?yeshu=' + yeshu
})
}
}
}
}
},
onLoad(option) { //代替 vue 里面的 created
uni.setNavigationBarTitle({
title: option.name
})
this.getDetails(option.id)
},
onReady() { //代替 vue 里面的 mounted
},
methods: {
getDetails(id) { //获取商品详情
this.$request('scenic/user/product/findChoseProductInfo', {
productId: id,
openid: uni.getStorageSync('openid')
}).then(res => {
if (res.code === '00') {
this.showBody = true
this.productVo = res.data.productVo
uni.setStorageSync('productVo', this.productVo) //保存选择的商品信息
res.data.productVo.imgList.forEach(item => {
if (item.location === 5) {
this.imgList1.push(item)
}
if (item.location === 6) {
this.imgList2.push(item)
}
if (item.location === 8) {
this.imgList3.push(item)
}
})
} else {
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
})
}
})
},
changeCover(url) { //选择封面
this.cover = url
},
changeinsidePages(url) { //选择内页
this.insidePages = url
},
beginMaking() {
if (this.cover === '') {
return uni.showModal({
showCancel: false,
title: '提示',
content: '请选择封面',
})
}
if (this.insidePages === '') {
return uni.showModal({
showCancel: false,
title: '提示',
content: '请选择内页',
})
}
let coverInside = {
cover: {
imgName: '封面',
imgUrl: this.cover
},
inside: {
imgName: '内页',
imgUrl: this.insidePages
}
}
uni.setStorageSync('coverInside', coverInside)
let yeshu = this.productVo.priceStockList[0].standardName
this.$u.route({
url: 'pages/vlog/uploadPictures/uploadPictures?yeshu=' + yeshu
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
......
......@@ -17,10 +17,10 @@
</block>
</view>
<view class="bottom">
<image src="../../../static/img/vlog/icon/bottom.png"></image>
<image src="../static/vlog/icon/bottom.png"></image>
<navigator url="../vlogface/vlogface">
<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>
</navigator>
......@@ -29,38 +29,38 @@
</template>
<script>
export default {
data() {
return {
productUrl: "", //视频地址
thumbImageUrl: "", //图片地址
merchantName: "", //景区名称
videoContext:""
}
},
onReady() { //代替 vue 里面的 mounted
export default {
data() {
return {
productUrl: '', //视频地址
thumbImageUrl: '', //图片地址
merchantName: '', //景区名称
videoContext:''
}
},
onReady() { //代替 vue 里面的 mounted
},
onLoad(option) { //代替 vue 里面的 created
this.productUrl = option.productUrl
this.thumbImageUrl = option.thumbImageUrl
this.merchantName = option.merchantName
},
methods: {
playVideo(){
// 获取 video 上下文 videoContext 对象
this.videoContext = uni.createVideoContext('myVideo',this);
// 进入全屏状态
this.videoContext.requestFullScreen({direction:-90})
},
error(e) { //视频播放出错
uni.showModal({
content: e.target.errMsg,
showCancel: false
})
},
}
}
},
onLoad(option) { //代替 vue 里面的 created
this.productUrl = option.productUrl
this.thumbImageUrl = option.thumbImageUrl
this.merchantName = option.merchantName
},
methods: {
playVideo(){
// 获取 video 上下文 videoContext 对象
this.videoContext = uni.createVideoContext('myVideo',this)
// 进入全屏状态
this.videoContext.requestFullScreen({direction:-90})
},
error(e) { //视频播放出错
uni.showModal({
content: e.target.errMsg,
showCancel: false
})
},
}
}
</script>
<style lang="scss" scoped>
......
......@@ -13,7 +13,7 @@
<block v-for="(item,index) in imgList" :key="index">
<view class="imgItem" @click="changeImg(item,index)">
<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>
</block>
</view>
......@@ -29,135 +29,135 @@
</view>
</template>
<script>
export default {
data() {
return {
maxImg: "", //相册规格张数
imgList: [], //上传的图片列表
checkList: [], //选中的图片下标
}
},
onLoad(opction) { //代替 vue 里面的 created
this.maxImg = opction.yeshu //获取相册规格
export default {
data() {
return {
maxImg: '', //相册规格张数
imgList: [], //上传的图片列表
checkList: [], //选中的图片下标
}
},
onLoad(opction) { //代替 vue 里面的 created
this.maxImg = opction.yeshu //获取相册规格
this.imgList = uni.getStorageSync("imgList")
this.checkList = uni.getStorageSync("checkList")
this.imgList = uni.getStorageSync('imgList')
this.checkList = uni.getStorageSync('checkList')
if (this.imgList === "") {
this.imgList = []
uni.setStorageSync("imgList", this.imgList)
}
if (this.checkList === "") {
this.checkList = []
uni.setStorageSync("checkList", this.checkList)
}
// 监听从裁剪页发布的事件,获得裁剪结果
uni.$on('uAvatarCropper', path => {
var that = this
var url = "https://manager.pangdly.com/"
uni.uploadFile({ // s上传图片
url: url + 'upload/file/newUpload',
filePath: path,
name: 'uploadFile',
header: {
'Content-Type': 'multipart/form-data;',
},
success: res => { //获取图片结果
let res1 = JSON.parse(res.data)
if (res1.code == "00") { //请求成功
let obj = {
url: res1.data,
check: 0
}
that.imgList.push(obj)
uni.setStorageSync("imgList", that.imgList)
} else {
uni.showModal({
title: '提示',
content: res1.message,
showCancel: false,
})
}
}
})
})
},
onReady() { //代替 vue 里面的 mounted
},
methods: {
confirm() { //确定提交
if (this.checkList.length !== this.maxImg * 1) {
return uni.showModal({
showCancel: false,
title: '提示',
content: '相册规格' + this.maxImg + "张,请按照标准选择",
});
if (this.imgList === '') {
this.imgList = []
uni.setStorageSync('imgList', this.imgList)
}
if (this.checkList === '') {
this.checkList = []
uni.setStorageSync('checkList', this.checkList)
}
// 监听从裁剪页发布的事件,获得裁剪结果
uni.$on('uAvatarCropper', path => {
var that = this
var url = 'https://manager.pangdly.com/'
uni.uploadFile({ // s上传图片
url: url + 'upload/file/newUpload',
filePath: path,
name: 'uploadFile',
header: {
'Content-Type': 'multipart/form-data;',
},
success: res => { //获取图片结果
let res1 = JSON.parse(res.data)
if (res1.code == '00') { //请求成功
let obj = {
url: res1.data,
check: 0
}
that.imgList.push(obj)
uni.setStorageSync('imgList', that.imgList)
} else {
uni.showModal({
title: '提示',
content: res1.message,
showCancel: false,
})
}
}
})
})
},
onReady() { //代替 vue 里面的 mounted
},
methods: {
confirm() { //确定提交
if (this.checkList.length !== this.maxImg * 1) {
return uni.showModal({
showCancel: false,
title: '提示',
content: '相册规格' + this.maxImg + '张,请按照标准选择',
})
}
this.$u.route("pages/vlog/pictureFormat/pictureFormat")
},
del() { //删除图片
if (this.checkList.length === 0) {
uni.showModal({
showCancel: false,
title: '提示',
content: "当前未选中任何图片!",
});
} else {
uni.showModal({
title: '提示',
content: "确定要删除选中的图片吗?",
success: res => {
if (res.confirm) {
this.checkList.forEach(item => {
this.imgList.splice(item, 1)
})
this.checkList = []
uni.setStorageSync("checkList", this.checkList)
uni.setStorageSync("imgList", this.imgList)
}
}
});
}
},
changeImg(item, index) { //选择图片
if (item.check === 0) {
if (this.checkList.length < this.maxImg) {
item.check = 1;
this.checkList.push(index)
uni.setStorageSync("checkList", this.checkList)
uni.setStorageSync("imgList", this.imgList)
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: '最多选取' + this.maxImg + "张",
});
}
} else {
item.check = 0;
this.checkList.splice(this.checkList.indexOf(index), 1)
uni.setStorageSync("checkList", this.checkList)
uni.setStorageSync("imgList", this.imgList)
}
},
chooseAvatar() { //上传照片
this.$u.route({
url: "pages/vlog/u-avatar-cropper/u-avatar-cropper",
params: {
// 输出图片宽高,单位px
destWidth: 1000,
destHeight: 1000,
// 裁剪框宽高,单位px
rectWidth: 300,
rectHeight: 300,
// 输出的图片类型,如果'png'类型发现裁剪的图片太大,改成"jpg"即可
fileType: 'jpg',
}
})
},
}
}
}
this.$u.route('pages/vlog/pictureFormat/pictureFormat')
},
del() { //删除图片
if (this.checkList.length === 0) {
uni.showModal({
showCancel: false,
title: '提示',
content: '当前未选中任何图片!',
})
} else {
uni.showModal({
title: '提示',
content: '确定要删除选中的图片吗?',
success: res => {
if (res.confirm) {
this.checkList.forEach(item => {
this.imgList.splice(item, 1)
})
this.checkList = []
uni.setStorageSync('checkList', this.checkList)
uni.setStorageSync('imgList', this.imgList)
}
}
})
}
},
changeImg(item, index) { //选择图片
if (item.check === 0) {
if (this.checkList.length < this.maxImg) {
item.check = 1
this.checkList.push(index)
uni.setStorageSync('checkList', this.checkList)
uni.setStorageSync('imgList', this.imgList)
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: '最多选取' + this.maxImg + '张',
})
}
} else {
item.check = 0
this.checkList.splice(this.checkList.indexOf(index), 1)
uni.setStorageSync('checkList', this.checkList)
uni.setStorageSync('imgList', this.imgList)
}
},
chooseAvatar() { //上传照片
this.$u.route({
url: 'pages/vlog/u-avatar-cropper/u-avatar-cropper',
params: {
// 输出图片宽高,单位px
destWidth: 1000,
destHeight: 1000,
// 裁剪框宽高,单位px
rectWidth: 300,
rectHeight: 300,
// 输出的图片类型,如果'png'类型发现裁剪的图片太大,改成"jpg"即可
fileType: 'jpg',
}
})
},
}
}
</script>
<style lang="scss" scoped>
.content {
......
......@@ -12,10 +12,10 @@
</view>
<navigator url="../myVlog/myVlog">
<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="btnn">
<image src="../../../static/img/vlog/icon/icon_clicktoenter.png"></image>
<image src="../static/vlog/icon/icon_clicktoenter.png"></image>
<view>
点击进入
</view>
......@@ -28,10 +28,10 @@
</view>
<navigator url="../product/product">
<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="btnn">
<image src="../../../static/img/vlog/icon/icon_clicktoenter.png"></image>
<image src="../static/vlog/icon/icon_clicktoenter.png"></image>
<view>
点击进入
</view>
......@@ -50,14 +50,14 @@
</navigator>
</block>
</view>
<navigator url="../../album/albumIndex?index=1">
<!-- <navigator url="../../album/albumIndex?index=1">
<view class="album">相册首页</view>
</navigator>
</navigator> -->
<view class="bottom">
<image src="../../../static/img/vlog/icon/bottom.png"></image>
<image src="../static/vlog/icon/bottom.png"></image>
<navigator url="../vlogface/vlogface">
<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>
</navigator>
......@@ -73,13 +73,13 @@ export default {
scenicList: [], //景区列表
search: '', //景区
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>
<view class="content">
<view class="bg">
<image src="../../../static/img/vlog/icon/camera.png"></image>
<image src="../static/vlog/icon/camera.png"></image>
</view>
<camera class="camera" device-position="front" flash="off" @error="error" @initdone="initdone"></camera>
<view class="surface" v-show="show">
......@@ -14,20 +14,20 @@
<view class="hint1">
<view class="item">
<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 class="item">
<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 class="item">
<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>
......
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