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

项目优化

parent a07df04a
......@@ -13,25 +13,7 @@
"navigationBarTitleText" : "订单支付",
"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",
"style" : {
......@@ -88,107 +70,7 @@
"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",
"style" : {
......@@ -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" : {
"navigationBarTextStyle" : "white",
"navigationBarTitleText" : "",
......
......@@ -44,57 +44,57 @@
</template>
<script>
export default {
data() {
return {
title:"立即领取",//标题
enterUrl:"",//进入页面路由
pageCode:"",//券码
couponData:"",//券数据
companyId:"",//公司Id
}
},
onLoad(option) {
//#ifdef MP-WEIXIN
this.enterUrl=option.q
//#endif
export default {
data() {
return {
title:'立即领取',//标题
enterUrl:'',//进入页面路由
pageCode:'',//券码
couponData:'',//券数据
companyId:'',//公司Id
}
},
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){//普通二维码扫码进入
this.pageCode=this.getUrlKey("pageCode")
this.companyId=this.getUrlKey("companyId")
}
this.giveCoupon()
},
methods: {
//---送券
giveCoupon(){
if(this.enterUrl){//普通二维码扫码进入
this.pageCode=this.getUrlKey('pageCode')
this.companyId=this.getUrlKey('companyId')
}
this.giveCoupon()
},
methods: {
//---送券
giveCoupon(){
let data={
couponCompanyId:this.companyId,
couponCompanyId:this.companyId,
pageCode:this.pageCode,
marketingStatus:1,
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]
}
})
},
//---获取url
getUrlKey(name){
return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ""])[1].replace(/\+/g, '%20') || "";
},
//---
clickBtn(){
this.title="已领取"
}
}
}
},
//---获取url
getUrlKey(name){
return(new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(decodeURIComponent(this.enterUrl)) || [, ''])[1].replace(/\+/g, '%20') || ''
},
//---
clickBtn(){
this.title='已领取'
}
}
}
</script>
<style lang="scss">
......
......@@ -73,61 +73,61 @@
</template>
<script>
export default {
data() {
return {
outUrl:"",//跳出地址
companyId:"",//公司Id
}
},
onLoad(option){
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
}
},
methods: {
getUserInfo() { // 获取用户信息
uni.getUserProfile({
lang:'zh_CN',
desc:'登录',
success:(res)=>{
console.log(res)
},
fail:(res)=>{
export default {
data() {
return {
outUrl:'',//跳出地址
companyId:'',//公司Id
}
},
onLoad(option){
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
}
},
methods: {
getUserInfo() { // 获取用户信息
uni.getUserProfile({
lang:'zh_CN',
desc:'登录',
success:(res)=>{
console.log(res)
},
fail:(res)=>{
}
})
},
getCompanyId(){//获取公司Id
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
}else{
this.outUrl="https://wx.pangdly.com/#/home?pdOpenid="+pdOpenid+"&pdToken="+pdToken+"&pdCreateUserId="+pdCreateUserId+"&pdUserId="+pdUserId+"&companyId="+this.companyId
}
})
},
getCompanyId(){//获取公司Id
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
}else{
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
})
}
}
}).catch(()=>{
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,82 +3,85 @@
<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 {
data() {
return {
title: "正在出票中...", //标题
orderId: "", //订单Id
status: "", //出票状态
timer: "", //计时器
loadImg: true, //控制加载图片显示隐藏
afterBuyUrl:'',//页面跳转地址
ifyukuaiCode: '' //是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
}
},
onLoad(option) {
this.orderId = option.orderId||''
this.afterBuyUrl = option.afterBuyUrl||''
this.ifyukuaiCode=option.ifyukuaiCode||''
this.ticketStatus()
let intFun=()=>{ //页面初始化
this.timer = setTimeout(()=>{
if (this.status == "2" || this.status == "4" || this.status == "5") {
return
}
if (this.status == "3") {
return
}
this.ticketStatus()
intFun()
}, 2000)
}
intFun()
},
onHide() {
if (this.timer) {
clearInterval(this.timer)
}
},
onUnload() {
if (this.timer) {
clearInterval(this.timer)
}
},
methods: {
//---出票状态
ticketStatus() {
let data = {
orderId: this.orderId
}
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") {
uni.redirectTo({
export default {
data() {
return {
title: '', //标题
orderId: '', //订单Id
status: '', //出票状态
timer: '', //计时器
loadImg: true, //控制加载图片显示隐藏
afterBuyUrl:'',//页面跳转地址
ifyukuaiCode: '' //是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
}
},
onLoad(option) {
this.orderId = option.orderId||''
this.afterBuyUrl = option.afterBuyUrl||''
this.ifyukuaiCode=option.ifyukuaiCode||''
this.ticketStatus()
let intFun=()=>{ //页面初始化
this.timer = setTimeout(()=>{
if (this.status == '2' || this.status == '4' || this.status == '5') {
return
}
if (this.status == '3') {
return
}
this.ticketStatus()
intFun()
}, 2000)
}
intFun()
},
onHide() {
if (this.timer) {
clearInterval(this.timer)
}
},
onUnload() {
if (this.timer) {
clearInterval(this.timer)
}
},
methods: {
//---出票状态
ticketStatus() {
let data = {
orderId: this.orderId
}
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') {
//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 = "出票失败..."
this.loadImg = false
}
} else {
uni.showToast({
})
}
if (this.status == '3') {
this.title = '失败...'
this.loadImg = false
}
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
}
}
}
})
}
})
}
}
}
</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