Commit 8832bb6d authored by 潘永坪's avatar 潘永坪

出租车扫码首页开发

parent 20300255
......@@ -21,13 +21,13 @@ export default {
let path = options.path
uni.setStorageSync('enterOptions', options)
let token = uni.getStorageSync('token')
if (!token && path.indexOf('pages/payment/ourPayment/ourPayment') == -1) { //扫码支付页面不需要在此登录
setTimeout(() => { //解决关联普通二维码扫码首次进入时一直显示登录中
uni.navigateTo({
url: '/pages/login/login'
})
}, 300)
}
// if (!token && path.indexOf('pages/payment/ourPayment/ourPayment') == -1) { //扫码支付页面不需要在此登录
// setTimeout(() => { //解决关联普通二维码扫码首次进入时一直显示登录中
// uni.navigateTo({
// url: '/pages/login/login'
// })
// }, 300)
// }
//#ifdef MP-WEIXIN
uni.setStorageSync('appid', 'wxe678d5240e98a7b8')
//#endif
......@@ -84,11 +84,18 @@ export default {
2.分隔线颜色#DBDBDB
3.正常字体颜色#333333
4.灰色字体颜色#666666或者#999999
5.主色调#3688FF
5.主题颜色#3688FF
6.正常字体大小28rpx,偏小一点的24rpx
8.页面最外层与里面的第一层为padding:0 12px;
9.css单位为rpx
*/
/* 全局变量 */
:root {
--blue:#3688FF;
--red: #FC6703;
--divider: #DBDBDB;
--grey: #999;
}
page {
font-size: 28rpx;
color: #333333;
......
......@@ -99,13 +99,6 @@
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/configure/backMiniProgram/backMiniProgram",
"style" : {
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/my/order/orderList/orderList",
"style" : {
......@@ -185,6 +178,15 @@
}
}
,{
"path" : "pages/indexs/merchantListIndex/merchantListIndex",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
//分包加载配置,此配置为小程序的分包加载机制。
"subPackages": [{
......
......@@ -5,66 +5,66 @@
</template>
<script>
export default {
data() {
return {
enterUrl:"",//进入页面路由
outUrl:"",//跳出页面路由
}
},
onLoad(option) {
//#ifdef MP-WEIXIN
this.enterUrl=option.q
//#endif
export default {
data() {
return {
enterUrl:'',//进入页面路由
outUrl:'',//跳出页面路由
}
},
onLoad(option) {
//#ifdef MP-WEIXIN
this.enterUrl=option.q
//#endif
//#ifdef MP-ALIPAY
this.enterUrl=uni.getStorageSync("alipayQrCode")
//#endif
//#ifdef MP-ALIPAY
this.enterUrl=uni.getStorageSync('alipayQrCode')
//#endif
if(this.enterUrl){//普通二维码扫码进入
let channelId=this.getUrlKey("channelId")
let companyId=this.getUrlKey("companyId")
let merchantId=this.getUrlKey("merchantId")
let groupId=this.getUrlKey("groupId")
let groupChannelId=this.getUrlKey("groupChannelId")
let pageType=this.getUrlKey("pageType")
let pdOpenid=uni.getStorageSync("openid")//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")
let pdCreateUserId=uni.getStorageSync("createUserId")
let pdUserId=uni.getStorageSync("userId")
let pageCode=this.getUrlKey("pageCode")//赠送优惠券接口参数
if(pageType==1){//组合
uni.navigateTo({
url:"../combiChoose/combiChoose?channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId
})
}else{//分销
this.outUrl="https://wx.pangdly.com/#/distributionCombiChooseS?channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId+"&pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId+"&pageCode"+pageCode
if(this.enterUrl){//普通二维码扫码进入
let channelId=this.getUrlKey('channelId')
let companyId=this.getUrlKey('companyId')
let merchantId=this.getUrlKey('merchantId')
let groupId=this.getUrlKey('groupId')
let groupChannelId=this.getUrlKey('groupChannelId')
let pageType=this.getUrlKey('pageType')
let pdOpenid=uni.getStorageSync('openid')//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync('token')
let pdCreateUserId=uni.getStorageSync('createUserId')
let pdUserId=uni.getStorageSync('userId')
let pageCode=this.getUrlKey('pageCode')//赠送优惠券接口参数
if(pageType==1){//组合
uni.navigateTo({
url:'../combiChoose/combiChoose?channelId='+channelId+'&merchantId='+merchantId+'&groupId='+groupId+'&groupChannelId='+groupChannelId+'&companyId='+companyId
})
}else{//分销
this.outUrl='https://wx.pangdly.com/#/distributionCombiChooseS?channelId='+channelId+'&merchantId='+merchantId+'&groupId='+groupId+'&groupChannelId='+groupChannelId+'&companyId='+companyId+'&pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&pageCode'+pageCode
}
}else{//小程序页面跳转进入
let channelId=option.channelId||''
let companyId=option.companyId||''
let merchantId=option.merchantId||''
let groupId=option.groupId||''
let groupChannelId=option.groupChannelId||''
let thirdOpenid=option.thirdOpenid||''//第三方openid
let touristType=option.touristType||''//游客类型
let pageCode=option.pageCode||''//赠送优惠券接口参数
let pdOpenid=uni.getStorageSync("openid")||''//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync("token")||''
let pdCreateUserId=uni.getStorageSync("createUserId")||''
let pdUserId=uni.getStorageSync("userId")||''
let baseUrl="https://wx.pangdly.com/#/distributionCombiChooseS?thirdOpenid="+thirdOpenid+"&touristType="+touristType
this.outUrl=baseUrl+"&channelId="+channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId+"&pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId+"&pageCode"+pageCode
}
}
}else{//小程序页面跳转进入
let channelId=option.channelId||''
let companyId=option.companyId||''
let merchantId=option.merchantId||''
let groupId=option.groupId||''
let groupChannelId=option.groupChannelId||''
let thirdOpenid=option.thirdOpenid||''//第三方openid
let touristType=option.touristType||''//游客类型
let pageCode=option.pageCode||''//赠送优惠券接口参数
let pdOpenid=uni.getStorageSync('openid')||''//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let pdToken=uni.getStorageSync('token')||''
let pdCreateUserId=uni.getStorageSync('createUserId')||''
let pdUserId=uni.getStorageSync('userId')||''
let baseUrl='https://wx.pangdly.com/#/distributionCombiChooseS?thirdOpenid='+thirdOpenid+'&touristType='+touristType
this.outUrl=baseUrl+'&channelId='+channelId+'&merchantId='+merchantId+'&groupId='+groupId+'&groupChannelId='+groupChannelId+'&companyId='+companyId+'&pdOpenid='+pdOpenid+'&pdToken='+pdToken+'&pdCreateUserId='+pdCreateUserId+'&pdUserId='+pdUserId+'&pageCode'+pageCode
}
},
methods: {
getUrlKey(name){//---------------------------------------------------------------获取url
return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ""])[1].replace(/\+/g, '%20') || "";
},
}
}
},
methods: {
getUrlKey(name){//---------------------------------------------------------------获取url
return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ''])[1].replace(/\+/g, '%20') || ''
}
}
}
</script>
<style>
......
<template>
<!--返回上一个小程序中转页面-->
<view class="wrap">
<view class="imgBox">
<image src="../../../static/img/my/NumberBg.jpg"></image>
</view>
<view class="contentBox">
<view class="title">
微信提示
</view>
<view class="content">
验证码用于入园游玩时核验使用
</view>
<view class="remark">
注:验证码信息已自动同步至订单所有游玩人渝快码,游玩人直接使用本人渝快码即可入园核验
</view>
<view class="know">
<text @click="returnMini()">我知道了</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
//---返回上一个小程序
returnMini(){
//#ifdef MP-WEIXIN
wx.navigateBackMiniProgram({
extraData: {
cqQRCode:1
},
fail(res){
uni.showToast({
title:"获取失败,请退出后重新进入渝快码小程序获取验证码",
icon:"none",
duration:3000
})
}
})
//#endif
//#ifdef MP-ALIPAY
my.navigateBackMiniProgram({
extraData:{
cqQRCode:1
},
fail: (res) => {
uni.showToast({
title:"获取失败,请退出后重新进入渝快码小程序获取验证码",
icon:"none",
duration:3000
})
}
})
//#endif
}
}
}
</script>
<style>
.imgBox{position: fixed;top: 0;left: 0;right: 0;bottom: 0;}
.imgBox image{width: 100%;height: 100%;}
.contentBox{padding:200rpx 80rpx 0 80rpx;text-align: center;position: fixed;top:0;left: 0;right: 0;bottom: 0;z-index: 1;}
.title{font-size: 40rpx;font-weight: bold;color: #FC6703}
.content{margin-top: 48rpx;font-size: 32rpx;color: #000000;}
.remark{margin-top: 40rpx;color: #666666;}
.know{margin-top:40rpx;}
.know text{display: inline-block;width: 240rpx;height: 72rpx;background: rgb(54, 136, 255);box-shadow: 0px 0px 12px rgba(255, 255, 255, 0.2);
border-radius: 48px;text-align: center;line-height: 72rpx;color: #FFFFFF;}
</style>
......@@ -24,7 +24,7 @@
09:00 - 18:00,闭馆前1小时(17:00)停止售票
</view>
<view style="color: #D9A874;">
每周一“湖广四川”移民博物馆、临展馆闭馆维护。
每周一“湖广四川”移民博物馆、临展馆闭馆维护。
</view>
<view>
<text>
......@@ -53,34 +53,34 @@
</template>
<script>
export default {
data() {
return {
urlQuery:'',
showKnow:false
}
},
onLoad(option) {
let channelId=option.channelId||''
let companyId=option.companyId||''
let merchantId=option.merchantId||''
let groupId=option.groupId||''
let groupChannelId=option.groupChannelId||''
this.urlQuery=channelId+"&merchantId="+merchantId+"&groupId="+groupId+"&groupChannelId="+groupChannelId+"&companyId="+companyId
},
methods: {
//---购票
goBuy(){
uni.navigateTo({
url:"/pages/combination/distributionCombiChoose/distributionCombiChoose?channelId="+this.urlQuery
})
},
//---购票须知
goKnow(){
this.showKnow=true
}
}
}
export default {
data() {
return {
urlQuery:'',
showKnow:false
}
},
onLoad(option) {
let channelId=option.channelId||''
let companyId=option.companyId||''
let merchantId=option.merchantId||''
let groupId=option.groupId||''
let groupChannelId=option.groupChannelId||''
this.urlQuery=channelId+'&merchantId='+merchantId+'&groupId='+groupId+'&groupChannelId='+groupChannelId+'&companyId='+companyId
},
methods: {
//---购票
goBuy(){
uni.navigateTo({
url:'/pages/combination/distributionCombiChoose/distributionCombiChoose?channelId='+this.urlQuery
})
},
//---购票须知
goKnow(){
this.showKnow=true
}
}
}
</script>
<style scoped>
......
<template>
<!-- 商户列表首页 -->
<view>
<view class="banner">
<u-swiper :list="list" mode='number' height="350"></u-swiper>
</view>
<view class="search">
<view class="search-wrap">
<view class="search-left">
重庆
<view class="line"></view>
</view>
<view class="search-right">
<input class="search-input" placeholder="景区/商品/关键词搜索"/>
<text class="search-btn">搜索</text>
</view>
</view>
</view>
<view class="merchant-list">
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{
image: 'http://wx.pangdly.com/static/img/test7.6d14c2d.jpg',
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
},
{
image: 'http://wx.pangdly.com/static/img/test8.1cf812b.jpg',
title: '身无彩凤双飞翼,心有灵犀一点通'
},
{
image: 'http://wx.pangdly.com/static/img/test9.b3dd44c.jpg',
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
}
],
}
},
methods: {
}
}
</script>
<style scoped>
.search{
padding: 0 24rpx;
position: relative;
top: -40rpx;
}
.search-wrap{
background: #fff;
border-radius: 44rpx;
box-shadow: 0px 0px 8px 2px rgba(0,0,0,0.08);
display: flex;
align-items: center;
height: 80rpx;
padding: 0 20rpx;
}
.search-left{
display: flex;
}
.line{
width: 2rpx;
background: #ccc;
margin: 0 20rpx;
}
.search-right{
display: flex;
flex: 1;
}
.search-input{
flex: 1;
}
.search-btn{
background: var(--blue);
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment