Commit d5cbea07 authored by 潘永坪's avatar 潘永坪

项目优化

parent a07df04a
...@@ -13,25 +13,7 @@ ...@@ -13,25 +13,7 @@
"navigationBarTitleText" : "订单支付", "navigationBarTitleText" : "订单支付",
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
}, },
{
"path" : "pages/vlog/orderPay/orderPay",
"style" : {
"navigationBarTitleText" : "确认订单",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#ffffff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "pages/vlog/shippingAddress/shippingAddress",
"style" : {
"navigationBarTitleText" : "填写收货地址",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#ffffff",
"navigationBarTextStyle" : "black"
}
},
{ {
"path" : "pages/login/login", "path" : "pages/login/login",
"style" : { "style" : {
...@@ -88,107 +70,7 @@ ...@@ -88,107 +70,7 @@
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
}, },
{
"path" : "pages/vlog/vlogIndex/vlogIndex",
"style" : {
"navigationBarTitleText" : "欢乐影集",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#ffffff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "pages/vlog/vlogface/vlogface",
"style" : {
"navigationBarTitleText" : "扫脸获取视频",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#ffffff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "pages/vlog/scenicList/scenicList",
"style" : {
"enablePullDownRefresh" : false,
"backgroundColor" : "#192033"
}
},
{
"path" : "pages/vlog/vlogList/vlogList",
"style" : {
"navigationBarTitleText" : "我的Vlog集",
"enablePullDownRefresh" : false,
"backgroundColor" : "#192033"
}
},
{
"path" : "pages/vlog/share/share",
"style" : {
"navigationBarTitleText" : "Vlog",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/vlog/myVlog/myVlog",
"style" : {
"navigationBarTitleText" : "我的Vlog集",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#fff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "pages/vlog/product/product",
"style" : {
"navigationBarTitleText" : "产品列表",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#fff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "pages/vlog/productDetails/productDetails",
"style" : {
"navigationBarTitleText" : "产品详情",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#fff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "pages/vlog/uploadPictures/uploadPictures",
"style" : {
"navigationBarTitleText" : "上传照片",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#fff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "pages/vlog/u-avatar-cropper/u-avatar-cropper",
"style" : {
"navigationBarTitleText" : "照片裁剪",
"navigationBarBackgroundColor" : "#000000"
}
},
{
"path" : "pages/vlog/pictureFormat/pictureFormat",
"style" : {
"navigationBarTitleText" : "照片调整",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#ffffff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "pages/vlog/myVlogPhotos/myVlogPhotos",
"style" : {
"navigationBarTitleText" : "我的vlog照片",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#ffffff",
"navigationBarTextStyle" : "black"
}
},
{ {
"path" : "pages/scenic/scenicSingleOrder/scenicSingleOrder", "path" : "pages/scenic/scenicSingleOrder/scenicSingleOrder",
"style" : { "style" : {
...@@ -295,6 +177,131 @@ ...@@ -295,6 +177,131 @@
} }
} }
], ],
//分包加载配置,此配置为小程序的分包加载机制。
"subPackages": [{
"root": "pages/vlog", //子包的根目录
"pages": [
{
"path" : "vlogIndex/vlogIndex",
"style" : {
"navigationBarTitleText" : "欢乐影集",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#ffffff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "vlogface/vlogface",
"style" : {
"navigationBarTitleText" : "扫脸获取视频",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#ffffff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "scenicList/scenicList",
"style" : {
"enablePullDownRefresh" : false,
"backgroundColor" : "#192033"
}
},
{
"path" : "vlogList/vlogList",
"style" : {
"navigationBarTitleText" : "我的Vlog集",
"enablePullDownRefresh" : false,
"backgroundColor" : "#192033"
}
},
{
"path" : "share/share",
"style" : {
"navigationBarTitleText" : "Vlog",
"enablePullDownRefresh" : false
}
},
{
"path" : "myVlog/myVlog",
"style" : {
"navigationBarTitleText" : "我的Vlog集",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#fff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "product/product",
"style" : {
"navigationBarTitleText" : "产品列表",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#fff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "productDetails/productDetails",
"style" : {
"navigationBarTitleText" : "产品详情",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#fff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "uploadPictures/uploadPictures",
"style" : {
"navigationBarTitleText" : "上传照片",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#fff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "u-avatar-cropper/u-avatar-cropper",
"style" : {
"navigationBarTitleText" : "照片裁剪",
"navigationBarBackgroundColor" : "#000000"
}
},
{
"path" : "pictureFormat/pictureFormat",
"style" : {
"navigationBarTitleText" : "照片调整",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#ffffff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "myVlogPhotos/myVlogPhotos",
"style" : {
"navigationBarTitleText" : "我的vlog照片",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#ffffff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "orderPay/orderPay",
"style" : {
"navigationBarTitleText" : "确认订单",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#ffffff",
"navigationBarTextStyle" : "black"
}
},
{
"path" : "shippingAddress/shippingAddress",
"style" : {
"navigationBarTitleText" : "填写收货地址",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor" : "#ffffff",
"navigationBarTextStyle" : "black"
}
}
]
}],
"globalStyle" : { "globalStyle" : {
"navigationBarTextStyle" : "white", "navigationBarTextStyle" : "white",
"navigationBarTitleText" : "", "navigationBarTitleText" : "",
......
...@@ -44,57 +44,57 @@ ...@@ -44,57 +44,57 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
title:"立即领取",//标题 title:'立即领取',//标题
enterUrl:"",//进入页面路由 enterUrl:'',//进入页面路由
pageCode:"",//券码 pageCode:'',//券码
couponData:"",//券数据 couponData:'',//券数据
companyId:"",//公司Id companyId:'',//公司Id
} }
}, },
onLoad(option) { onLoad(option) {
//#ifdef MP-WEIXIN //#ifdef MP-WEIXIN
this.enterUrl=option.q this.enterUrl=option.q
//#endif //#endif
//#ifdef MP-ALIPAY //#ifdef MP-ALIPAY
this.enterUrl=uni.getStorageSync("alipayQrCode") this.enterUrl=uni.getStorageSync('alipayQrCode')
//#endif //#endif
if(this.enterUrl){//普通二维码扫码进入 if(this.enterUrl){//普通二维码扫码进入
this.pageCode=this.getUrlKey("pageCode") this.pageCode=this.getUrlKey('pageCode')
this.companyId=this.getUrlKey("companyId") this.companyId=this.getUrlKey('companyId')
} }
this.giveCoupon() this.giveCoupon()
}, },
methods: { methods: {
//---送券 //---送券
giveCoupon(){ giveCoupon(){
let data={ let data={
couponCompanyId:this.companyId, couponCompanyId:this.companyId,
pageCode:this.pageCode, pageCode:this.pageCode,
marketingStatus:1, marketingStatus:1,
userId:uni.getStorageSync('userId') , userId:uni.getStorageSync('userId') ,
openid:uni.getStorageSync('openid') openid:uni.getStorageSync('openid')
} }
this.$request("scenic/market/findPageMarket",data).then((res)=>{ this.$request('scenic/market/findPageMarket',data).then((res)=>{
if(res.data&&res.data.length>0){ if(res.data&&res.data.length>0){
this.couponData=res.data[0] this.couponData=res.data[0]
} }
}) })
}, },
//---获取url //---获取url
getUrlKey(name){ getUrlKey(name){
return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ""])[1].replace(/\+/g, '%20') || ""; return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ''])[1].replace(/\+/g, '%20') || ''
}, },
//--- //---
clickBtn(){ clickBtn(){
this.title="已领取" this.title='已领取'
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
......
...@@ -73,61 +73,61 @@ ...@@ -73,61 +73,61 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
outUrl:"",//跳出地址 outUrl:'',//跳出地址
companyId:"",//公司Id companyId:'',//公司Id
} }
}, },
onLoad(option){ onLoad(option){
this.companyId=option.companyId||"" this.companyId=option.companyId||''
if(!this.companyId){ if(!this.companyId){
this.getCompanyId() this.getCompanyId()
}else{ }else{
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除 let pdOpenid=uni.getStorageSync('openid')//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token") let pdToken=uni.getStorageSync('token')
let pdCreateUserId=uni.getStorageSync("createUserId") let pdCreateUserId=uni.getStorageSync('createUserId')
let pdUserId=uni.getStorageSync("userId") let pdUserId=uni.getStorageSync('userId')
this.outUrl="https://wx.pangdly.com/#/home?pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId+"&companyId="+this.companyId this.outUrl='https://wx.pangdly.com/#/home?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&companyId='+this.companyId
} }
}, },
methods: { methods: {
getUserInfo() { // 获取用户信息 getUserInfo() { // 获取用户信息
uni.getUserProfile({ uni.getUserProfile({
lang:'zh_CN', lang:'zh_CN',
desc:'登录', desc:'登录',
success:(res)=>{ success:(res)=>{
console.log(res) console.log(res)
}, },
fail:(res)=>{ fail:(res)=>{
} }
}) })
}, },
getCompanyId(){//获取公司Id getCompanyId(){//获取公司Id
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除 let pdOpenid=uni.getStorageSync('openid')//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token") let pdToken=uni.getStorageSync('token')
let pdCreateUserId=uni.getStorageSync("createUserId") let pdCreateUserId=uni.getStorageSync('createUserId')
let pdUserId=uni.getStorageSync("userId") let pdUserId=uni.getStorageSync('userId')
let data={ let data={
openid:pdOpenid openid:pdOpenid
} }
this.$request("wechatUser/wxUser/getLastRecord",data).then((res) => { this.$request('wechatUser/wxUser/getLastRecord',data).then((res) => {
if (res.code == "00"){ if (res.code == '00'){
this.companyId=res.data.companyId||"" this.companyId=res.data.companyId||''
this.outUrl="https://wx.pangdly.com/#/home?pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId+"&companyId="+this.companyId this.outUrl='https://wx.pangdly.com/#/home?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&companyId='+this.companyId
}else{ }else{
this.outUrl="https://wx.pangdly.com/#/home?pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId+"&companyId="+this.companyId this.outUrl='https://wx.pangdly.com/#/home?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&companyId='+this.companyId
} }
}).catch(()=>{ }).catch(()=>{
this.outUrl="https://wx.pangdly.com/#/home?pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId+"&companyId="+this.companyId this.outUrl='https://wx.pangdly.com/#/home?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&companyId='+this.companyId
}) })
} }
} }
} }
</script> </script>
<style> <style>
......
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
if (this.enterUrl) { if (this.enterUrl) {
this.orderId = this.getUrlKey('orderId') this.orderId = this.getUrlKey('orderId')
} else { } else {
this.orderId = option.orderId this.orderId = option.orderId||''
} }
this.ifyukuaiCode = option.ifyukuaiCode||'' this.ifyukuaiCode = option.ifyukuaiCode||''
this.openid = uni.getStorageSync('openid') || '' this.openid = uni.getStorageSync('openid') || ''
......
...@@ -288,6 +288,10 @@ export default { ...@@ -288,6 +288,10 @@ export default {
return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ''])[1].replace(/\+/g, '%20') || '' return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ''])[1].replace(/\+/g, '%20') || ''
}, },
clickNum(i,index,a) {//---输入数字 clickNum(i,index,a) {//---输入数字
//不超过14位数
if(this.buyMoney.length>13){
return
}
this.buyMoney += i this.buyMoney += i
this.leftList[index].child[a].background='#dddddd' this.leftList[index].child[a].background='#dddddd'
setTimeout(()=>{ setTimeout(()=>{
...@@ -585,7 +589,7 @@ export default { ...@@ -585,7 +589,7 @@ export default {
.bigBox{background:#f5f5f5;height: 100%;} .bigBox{background:#f5f5f5;height: 100%;}
/*上部分*/ /*上部分*/
.top{background: #FFFFFF;} .top{background: #FFFFFF;}
.topName{font-size:30rpx;font-weight: bold;padding-top: 50rpx;display: flex;align-items: center;justify-content: center;} .topName{font-size:30rpx;font-weight: bold;padding: 50rpx 24rpx 0 24rpx;display: flex;align-items: center;justify-content: center;}
.topIcon{display:inline-flex;margin-right:10rpx;width:50rpx;height:50rpx;border-radius:50%;background:#FF8B57;align-items:center;justify-content:center;} .topIcon{display:inline-flex;margin-right:10rpx;width:50rpx;height:50rpx;border-radius:50%;background:#FF8B57;align-items:center;justify-content:center;}
.icon-tubiaolunkuo-{font-size:36rpx;color: #FFFFFF;font-weight: 400;} .icon-tubiaolunkuo-{font-size:36rpx;color: #FFFFFF;font-weight: 400;}
.topMoney{padding:80rpx 24rpx 24rpx 24rpx;display: flex;justify-content:space-between;align-items: center;} .topMoney{padding:80rpx 24rpx 24rpx 24rpx;display: flex;justify-content:space-between;align-items: center;}
......
...@@ -3,82 +3,85 @@ ...@@ -3,82 +3,85 @@
<text style="margin-right: 20rpx;"> <text style="margin-right: 20rpx;">
{{title}} {{title}}
</text> </text>
<image src="../../../static/img/common/loading.gif" v-if="loadImg" style="width: 32rpx;height: 32rpx;"> <image src="../../../static/img/common/loading.gif" v-if="loadImg" style="width: 36rpx;height: 36rpx;">
</image> </image>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
title: "正在出票中...", //标题 title: '', //标题
orderId: "", //订单Id orderId: '', //订单Id
status: "", //出票状态 status: '', //出票状态
timer: "", //计时器 timer: '', //计时器
loadImg: true, //控制加载图片显示隐藏 loadImg: true, //控制加载图片显示隐藏
afterBuyUrl:'',//页面跳转地址 afterBuyUrl:'',//页面跳转地址
ifyukuaiCode: '' //是否是渝快码跳入,渝快码跳入需要在H5端另外走流程 ifyukuaiCode: '' //是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
} }
}, },
onLoad(option) { onLoad(option) {
this.orderId = option.orderId||'' this.orderId = option.orderId||''
this.afterBuyUrl = option.afterBuyUrl||'' this.afterBuyUrl = option.afterBuyUrl||''
this.ifyukuaiCode=option.ifyukuaiCode||'' this.ifyukuaiCode=option.ifyukuaiCode||''
this.ticketStatus() this.ticketStatus()
let intFun=()=>{ //页面初始化 let intFun=()=>{ //页面初始化
this.timer = setTimeout(()=>{ this.timer = setTimeout(()=>{
if (this.status == "2" || this.status == "4" || this.status == "5") { if (this.status == '2' || this.status == '4' || this.status == '5') {
return return
} }
if (this.status == "3") { if (this.status == '3') {
return return
} }
this.ticketStatus() this.ticketStatus()
intFun() intFun()
}, 2000) }, 2000)
} }
intFun() intFun()
}, },
onHide() { onHide() {
if (this.timer) { if (this.timer) {
clearInterval(this.timer) clearInterval(this.timer)
} }
}, },
onUnload() { onUnload() {
if (this.timer) { if (this.timer) {
clearInterval(this.timer) clearInterval(this.timer)
} }
}, },
methods: { methods: {
//---出票状态 //---出票状态
ticketStatus() { ticketStatus() {
let data = { let data = {
orderId: this.orderId orderId: this.orderId
} }
this.$request("order/order/getStatusById", data).then((res) => { this.$request('order/order/getStatusById', data).then((res) => {
if (res.code == "00") { if (res.code == '00') {
this.status = res.data this.status = res.data
if (this.status == "2" || this.status == "4" || this.status == "5") { if (this.status == '2' || this.status == '4' || this.status == '5') {
uni.redirectTo({ //1.跳订单列表,2.订单详情,3.停留该页面显示支付成功(ourPayment页面跳入时,无afterBuyUrl,停留在该页面)
this.title='支付成功!'
this.loadImg=false
uni.redirectTo({
url:this.afterBuyUrl+'?orderId=' + this.orderId+'&ifyukuaiCode='+this.ifyukuaiCode url:this.afterBuyUrl+'?orderId=' + this.orderId+'&ifyukuaiCode='+this.ifyukuaiCode
}) })
} }
if (this.status == "3") { if (this.status == '3') {
this.title = "出票失败..." this.title = '失败...'
this.loadImg = false this.loadImg = false
} }
} else { } else {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}) })
} }
}) })
} }
} }
} }
</script> </script>
<style scoped="scoped"> <style scoped="scoped">
......
static/img/common/getTicketBg.jpg

314 KB | W: | H:

static/img/common/getTicketBg.jpg

142 KB | W: | H:

static/img/common/getTicketBg.jpg
static/img/common/getTicketBg.jpg
static/img/common/getTicketBg.jpg
static/img/common/getTicketBg.jpg
  • 2-up
  • Swipe
  • Onion skin
static/img/coupon/coupon.jpg

352 KB | W: | H:

static/img/coupon/coupon.jpg

160 KB | W: | H:

static/img/coupon/coupon.jpg
static/img/coupon/coupon.jpg
static/img/coupon/coupon.jpg
static/img/coupon/coupon.jpg
  • 2-up
  • Swipe
  • Onion skin
static/img/vlog/product_fengmian.jpg

229 KB | W: | H:

static/img/vlog/product_fengmian.jpg

85.3 KB | W: | H:

static/img/vlog/product_fengmian.jpg
static/img/vlog/product_fengmian.jpg
static/img/vlog/product_fengmian.jpg
static/img/vlog/product_fengmian.jpg
  • 2-up
  • Swipe
  • Onion skin
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