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

项目优化

parent a07df04a
This diff is collapsed.
......@@ -44,14 +44,14 @@
</template>
<script>
export default {
export default {
data() {
return {
title:"立即领取",//标题
enterUrl:"",//进入页面路由
pageCode:"",//券码
couponData:"",//券数据
companyId:"",//公司Id
title:'立即领取',//标题
enterUrl:'',//进入页面路由
pageCode:'',//券码
couponData:'',//券数据
companyId:'',//公司Id
}
},
onLoad(option) {
......@@ -60,12 +60,12 @@
//#endif
//#ifdef MP-ALIPAY
this.enterUrl=uni.getStorageSync("alipayQrCode")
this.enterUrl=uni.getStorageSync('alipayQrCode')
//#endif
if(this.enterUrl){//普通二维码扫码进入
this.pageCode=this.getUrlKey("pageCode")
this.companyId=this.getUrlKey("companyId")
this.pageCode=this.getUrlKey('pageCode')
this.companyId=this.getUrlKey('companyId')
}
this.giveCoupon()
},
......@@ -79,7 +79,7 @@
userId:uni.getStorageSync('userId') ,
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){
this.couponData=res.data[0]
}
......@@ -87,14 +87,14 @@
},
//---获取url
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(){
this.title="已领取"
}
this.title='已领取'
}
}
}
</script>
<style lang="scss">
......
......@@ -73,23 +73,23 @@
</template>
<script>
export default {
export default {
data() {
return {
outUrl:"",//跳出地址
companyId:"",//公司Id
outUrl:'',//跳出地址
companyId:'',//公司Id
}
},
onLoad(option){
this.companyId=option.companyId||""
this.companyId=option.companyId||''
if(!this.companyId){
this.getCompanyId()
}else{
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
let pdCreateUserId=uni.getStorageSync("createUserId")
let pdUserId=uni.getStorageSync("userId")
this.outUrl="https://wx.pangdly.com/#/home?pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId+"&companyId="+this.companyId
let pdOpenid=uni.getStorageSync('openid')//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync('token')
let pdCreateUserId=uni.getStorageSync('createUserId')
let pdUserId=uni.getStorageSync('userId')
this.outUrl='https://wx.pangdly.com/#/home?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&companyId='+this.companyId
}
},
methods: {
......@@ -106,28 +106,28 @@
})
},
getCompanyId(){//获取公司Id
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
let pdCreateUserId=uni.getStorageSync("createUserId")
let pdUserId=uni.getStorageSync("userId")
let pdOpenid=uni.getStorageSync('openid')//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync('token')
let pdCreateUserId=uni.getStorageSync('createUserId')
let pdUserId=uni.getStorageSync('userId')
let data={
openid:pdOpenid
}
this.$request("wechatUser/wxUser/getLastRecord",data).then((res) => {
if (res.code == "00"){
this.companyId=res.data.companyId||""
this.outUrl="https://wx.pangdly.com/#/home?pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId+"&companyId="+this.companyId
this.$request('wechatUser/wxUser/getLastRecord',data).then((res) => {
if (res.code == '00'){
this.companyId=res.data.companyId||''
this.outUrl='https://wx.pangdly.com/#/home?pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&companyId='+this.companyId
}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(()=>{
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>
<style>
......
......@@ -110,7 +110,7 @@ export default {
if (this.enterUrl) {
this.orderId = this.getUrlKey('orderId')
} else {
this.orderId = option.orderId
this.orderId = option.orderId||''
}
this.ifyukuaiCode = option.ifyukuaiCode||''
this.openid = uni.getStorageSync('openid') || ''
......
......@@ -288,6 +288,10 @@ export default {
return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ''])[1].replace(/\+/g, '%20') || ''
},
clickNum(i,index,a) {//---输入数字
//不超过14位数
if(this.buyMoney.length>13){
return
}
this.buyMoney += i
this.leftList[index].child[a].background='#dddddd'
setTimeout(()=>{
......@@ -585,7 +589,7 @@ export default {
.bigBox{background:#f5f5f5;height: 100%;}
/*上部分*/
.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;}
.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;}
......
......@@ -3,20 +3,20 @@
<text style="margin-right: 20rpx;">
{{title}}
</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>
</view>
</template>
<script>
export default {
export default {
data() {
return {
title: "正在出票中...", //标题
orderId: "", //订单Id
status: "", //出票状态
timer: "", //计时器
title: '', //标题
orderId: '', //订单Id
status: '', //出票状态
timer: '', //计时器
loadImg: true, //控制加载图片显示隐藏
afterBuyUrl:'',//页面跳转地址
ifyukuaiCode: '' //是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
......@@ -29,10 +29,10 @@
this.ticketStatus()
let intFun=()=>{ //页面初始化
this.timer = setTimeout(()=>{
if (this.status == "2" || this.status == "4" || this.status == "5") {
if (this.status == '2' || this.status == '4' || this.status == '5') {
return
}
if (this.status == "3") {
if (this.status == '3') {
return
}
this.ticketStatus()
......@@ -57,16 +57,19 @@
let data = {
orderId: this.orderId
}
this.$request("order/order/getStatusById", data).then((res) => {
if (res.code == "00") {
this.$request('order/order/getStatusById', data).then((res) => {
if (res.code == '00') {
this.status = res.data
if (this.status == "2" || this.status == "4" || this.status == "5") {
if (this.status == '2' || this.status == '4' || this.status == '5') {
//1.跳订单列表,2.订单详情,3.停留该页面显示支付成功(ourPayment页面跳入时,无afterBuyUrl,停留在该页面)
this.title='支付成功!'
this.loadImg=false
uni.redirectTo({
url:this.afterBuyUrl+'?orderId=' + this.orderId+'&ifyukuaiCode='+this.ifyukuaiCode
})
}
if (this.status == "3") {
this.title = "出票失败..."
if (this.status == '3') {
this.title = '失败...'
this.loadImg = false
}
} else {
......@@ -78,7 +81,7 @@
})
}
}
}
}
</script>
<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