Commit dd739559 authored by sheng du's avatar sheng du
Browse files

打包及依赖和修改

parent 26e37a97
......@@ -2,13 +2,12 @@
const baseUrl = '';
// #endif
const phpRoot = '';
// #ifdef MP-WEIXIN
// const baseUrl = 'https://pmdc.hklcn.com'; // 本地
const baseUrl = 'https://hkland.kupurui.cn'; // 测试服
// const baseUrl = 'https://pmdc.hklcn.com'; // 正式服
// #endif
// const baseUrl = 'https://pmdc.hklcn.com'; // 本地
const baseUrl = 'https://hkland.kupurui.cn'; // 测试服
// const baseUrl = 'https://pmdc.hklcn.com'; // 正式服
const imageView = 'https://hkland.kupurui.cn'; // 测试服
// const imageView = 'https://pmdc.hklcn.com'; // 正式服
......
// #ifdef H5
const baseUrl = '';
// #endif
const phpRoot = '';
// #ifdef MP-WEIXIN
// const baseUrl = 'https://pmdc.hklcn.com'; // 本地
const baseUrl = 'https://hkland.kupurui.cn'; // 测试服
// const baseUrl = 'https://pmdc.hklcn.com'; // 正式服
// #endif
const imageView = 'https://hkland.kupurui.cn'; // 测试服
// const imageView = 'https://pmdc.hklcn.com'; // 正式服
export default {
baseUrl,
phpRoot,
imageView
};
// #ifdef H5
const baseUrl = '';
// #endif
const phpRoot = '';
// const baseUrl = 'https://pmdc.hklcn.com'; // 本地
const baseUrl = 'https://hkland.kupurui.cn'; // 测试服
// const baseUrl = 'https://pmdc.hklcn.com'; // 正式服
// const imageView = 'https://hkland.kupurui.cn'; // 测试服
const imageView = 'https://pmdc.hklcn.com'; // 正式服
export default {
baseUrl,
phpRoot,
imageView
};
\ No newline at end of file
import App from './App';
// 全局mixins,用于实现setData等功能,请勿删除!';
import zpMixins from '@/uni_modules/zp-mixins/index.js';
// #ifndef VUE3
import Vue from 'vue';
Vue.use(zpMixins);
Vue.config.productionTip = false;
App.mpType = 'app';
const app = new Vue({
...App
});
app.$mount();
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue';
export function createApp() {
const app = createSSRApp(App);
app.mixin(zpMixins);
return {
app
};
}
// #endif
import App from './App';
// "appid" : "wx8fef5f0844535860", //old
// "appid" : "wx4e337f60e395754c",
// 全局mixins,用于实现setData等功能,请勿删除!';
import zpMixins from '@/uni_modules/zp-mixins/index.js';
// #ifndef VUE3
import Vue from 'vue';
Vue.use(zpMixins);
Vue.config.productionTip = false;
App.mpType = 'app';
const app = new Vue({
...App
});
app.$mount();
// #endif
// #ifdef VUE3
import {
createSSRApp
} from 'vue';
export function createApp() {
const app = createSSRApp(App);
app.mixin(zpMixins);
return {
app
};
}
// #endif
\ No newline at end of file
......@@ -42,20 +42,17 @@
},
"quickapp" : {},
"mp-weixin" : {
"appid" : "wx8fef5f0844535860",
"appid" : "wx4e337f60e395754c",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
}
},
"permission" : {},
"plugins" : {}
},
"mp-alipay" : {
"usingComponents" : true
"usingComponents" : true,
"appid" : "2021004132620376"
},
"mp-baidu" : {
"usingComponents" : true
......
......@@ -113,7 +113,14 @@ export default {
methods: {
// 确认支付
querenPay: function () {
var that = this;
var that = this;
let pay_mode = '01'
//#ifdef MP-WEIXIN
pay_mode = '01'
//#endif
//#ifdef MP-ALIPAY
pay_mode = '02'
//#endif
that.setData({
isDisabled: true
});
......@@ -151,7 +158,8 @@ export default {
url: app.globalData.url + '/api/pay/mini',
data: {
order_num: order_num,
code: res.code
code: res.code,
pay_mode:pay_mode
},
header: {
key: 'bdc27dab6487a7f4b94cefdfea8da8b8',
......@@ -160,7 +168,8 @@ export default {
success(res) {
if (res.data.code == 200) {
//支付
uni.requestPayment({
uni.requestPayment({
orderInfo: ret.data.data.tradeNO,
timeStamp: res.data.data.timeStamp,
nonceStr: res.data.data.nonceStr,
package: res.data.data.package,
......
<template>
<!--
<view >
<view class='tcjf_busnum'>
<text>{{message}}</text>
</view>
<button class='chaxun' disabled="{{isDisabled}}" catchtap='queren'>确认</button>
</view> -->
</template>
<script>
// pages/index/tcjf/tcjf.js
var app = getApp();
export default {
data() {
return {
message: '',
isDisabled: false
};
}
/**
* 生命周期函数--监听页面加载
*/,
onLoad: function (options) {
var that = this;
if (!uni.getStorageSync('openid')) {
{
uni.login({
success(loginres) {
if (loginres.code) {
//发起网络请求
uni.request({
url: app.globalData.url + '/api/parking/getopenid',
data: {
code: loginres.code
},
header: {
key: 'bdc27dab6487a7f4b94cefdfea8da8b8',
token: 'bdc27dab6487a7f4b94cefdfea8da8b8'
},
success(res) {
console.log(res);
// return res.data.openid
uni.setStorageSync('openid', res.data.data.openid);
if (callback) {
callback(res.data.data.openid);
}
}
});
} else {
// console.log('登录失败!' + loginres.errMsg)
uni.showToast({
title: '登录失败',
icon: 'none',
duration: 2000
});
}
}
});
}
// return openid
}
uni.request({
url: app.globalData.url + '/api/parking/getcoupon',
method: 'post',
data: {
pid: options.pid,
id: options.id,
openid: uni.getStorageSync('openid')
},
header: {
key: 'bdc27dab6487a7f4b94cefdfea8da8b8',
token: 'bdc27dab6487a7f4b94cefdfea8da8b8'
},
success(res) {
if (res.data.code == 200) {
that.setData({
message: '领取成功'
});
} else {
that.setData({
message: '领取失败' + res.data.message
});
}
uni.showModal({
title: '领取优惠卷',
content: res.data.message,
showCancel: false,
success(res) {
if (res.confirm) {
uni.redirectTo({
url: '../index'
});
} else {
uni.redirectTo({
url: '../index'
});
}
}
});
}
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {},
methods: {
querenPay: function () {
var that = this;
that.setData({
isDisabled: true
});
uni.redirectTo({
url: '../index'
});
}
}
};
</script>
<style>
@import '../../../font/font.css'; /* pages/index/tcjf/tcjf.wxss */
.tcjf_box {
min-height: 100vh;
background-color: #f5f5f5;
/* padding: 0 40rpx; */
}
.tcjf_mess image {
width: 88rpx;
height: 88rpx;
flex-shrink: 0;
border-radius: 50%;
}
.tcjf_mess {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
align-items: center;
justify-content: space-between;
box-shadow: 0 0 8rpx 4rpx rgba(0, 0, 0, 0.1);
height: 160rpx;
padding: 0 20rpx;
width: 84%;
}
.tcjf_mess_title {
font-size: 34rpx;
color: #333;
line-height: 60rpx;
display: block;
}
.tcjf_mess_text {
width: 84%;
}
.sfgz {
font-size: 26rpx;
color: #808080;
display: block;
line-height: 30rpx;
}
.tcjf_mess_box {
background-color: #fff;
width: 100%;
height: 200rpx;
padding: 0 40rpx;
}
.tcjf_busnum {
margin-top: 20rpx;
text-align: center;
background-color: #ffff;
padding: 30rpx 10rpx;
border-radius: 10rpx;
}
.tcjf_busbox {
padding: 0 40rpx;
}
.tcjf_busnumbox {
width: 450rpx;
height: 111rpx;
border-radius: 10rpx;
border: 6rpx solid #1d75cc;
vertical-align: middle;
margin: 0 auto;
margin-bottom: 30rpx;
}
.tcjf_newsnum {
border: 6rpx solid #1cce31;
}
.tcjf_busnumsamll {
width: 432rpx;
height: 92rpx;
background-color: #1d75cc;
margin: 9rpx auto;
border-radius: 6rpx;
line-height: 92rpx;
}
.tcjf_newsnumsamll {
background-color: #1cce31;
}
.tcjf_busnumsamll text {
color: #fff;
font-size: 50rpx;
}
.tcjf_busnumtime {
border-top: 2rpx solid #e6e6e6;
padding: 0 30rpx;
}
.tcjf_busnum_item text {
font-size: 28rpx;
color: #808080;
}
.tcjf_busnum_item {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
justify-content: space-between;
line-height: 108rpx;
border-bottom: 2rpx solid #e6e6e6;
}
.tcjf_busnum_item .red {
color: #48dbd3;
font-size: 36rpx;
font-weight: bold;
}
.tcjf_busnum_item .item_time {
color: #333333;
font-size: 30rpx;
}
.tcjf_money {
width: 100%;
height: 200rpx;
background-color: #ddf3f2;
text-align: center;
margin-bottom: 40rpx;
}
.tcjf_money text {
font-size: 28rpx;
color: #333;
display: inline-block;
}
.tcjf_money .yf_money {
font-size: 28rpx;
color: #808080;
display: block;
line-height: 50rpx;
padding-top: 35rpx;
}
.tcjf_money .money_num {
font-size: 60rpx;
color: #be3257;
font-weight: bold;
}
</style>
<template>
<!--
<view >
<view class='tcjf_busnum'>
<text>{{message}}</text>
</view>
<button class='chaxun' disabled="{{isDisabled}}" catchtap='queren'>确认</button>
</view> -->
</template>
<script>
// pages/index/tcjf/tcjf.js
var app = getApp();
export default {
data() {
return {
message: '',
isDisabled: false
};
}
/**
* 生命周期函数--监听页面加载
*/
,
onLoad: function(options) {
console.log();
let sence = decodeURIComponent(options.scene)
// console.log(this.getUrlParam('pid', sence));
// console.log(this.getUrlParam('id', sence));
var that = this;
if (!uni.getStorageSync('openid')) {
{
uni.login({
success(loginres) {
if (loginres.code) {
//发起网络请求
uni.request({
url: app.globalData.url + '/api/parking/getopenid',
data: {
code: loginres.code
},
header: {
key: 'bdc27dab6487a7f4b94cefdfea8da8b8',
token: 'bdc27dab6487a7f4b94cefdfea8da8b8'
},
success(res) {
console.log(res);
// return res.data.openid
uni.setStorageSync('openid', res.data.data.openid);
if (callback) {
callback(res.data.data.openid);
}
}
});
} else {
// console.log('登录失败!' + loginres.errMsg)
uni.showToast({
title: '登录失败',
icon: 'none',
duration: 2000
});
}
}
});
}
// return openid
}
uni.request({
url: app.globalData.url + '/api/parking/getcoupon',
method: 'post',
data: {
pid: this.getUrlParam('pid', sence),
id: this.getUrlParam('id', sence),
openid: uni.getStorageSync('openid')
},
header: {
key: 'bdc27dab6487a7f4b94cefdfea8da8b8',
token: 'bdc27dab6487a7f4b94cefdfea8da8b8'
},
success(res) {
if (res.data.code == 200) {
that.setData({
message: '领取成功'
});
} else {
that.setData({
message: '领取失败' + res.data.message
});
}
uni.showModal({
title: '领取优惠卷',
content: res.data.message,
showCancel: false,
success(res) {
if (res.confirm) {
uni.redirectTo({
url: '../index'
});
} else {
uni.redirectTo({
url: '../index'
});
}
}
});
}
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {},
methods: {
getUrlParam: function(name, str) {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
//构造一个含有目标参数的正则表达式对象
var r = str.match(reg);
// console.log(name, str, r);
//匹配目标参数
if (r != null) {
return r[2];
} else {
return null; //返回参数值
}
},
querenPay: function() {
var that = this;
that.setData({
isDisabled: true
});
uni.redirectTo({
url: '../index'
});
}
}
};
</script>
<style>
@import '../../../font/font.css';
/* pages/index/tcjf/tcjf.wxss */
.tcjf_box {
min-height: 100vh;
background-color: #f5f5f5;
/* padding: 0 40rpx; */
}
.tcjf_mess image {
width: 88rpx;
height: 88rpx;
flex-shrink: 0;
border-radius: 50%;
}
.tcjf_mess {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
align-items: center;
justify-content: space-between;
box-shadow: 0 0 8rpx 4rpx rgba(0, 0, 0, 0.1);
height: 160rpx;
padding: 0 20rpx;
width: 84%;
}
.tcjf_mess_title {
font-size: 34rpx;
color: #333;
line-height: 60rpx;
display: block;
}
.tcjf_mess_text {
width: 84%;
}
.sfgz {
font-size: 26rpx;
color: #808080;
display: block;
line-height: 30rpx;
}
.tcjf_mess_box {
background-color: #fff;
width: 100%;
height: 200rpx;
padding: 0 40rpx;
}
.tcjf_busnum {
margin-top: 20rpx;
text-align: center;
background-color: #ffff;
padding: 30rpx 10rpx;
border-radius: 10rpx;
}
.tcjf_busbox {
padding: 0 40rpx;
}
.tcjf_busnumbox {
width: 450rpx;
height: 111rpx;
border-radius: 10rpx;
border: 6rpx solid #1d75cc;
vertical-align: middle;
margin: 0 auto;
margin-bottom: 30rpx;
}
.tcjf_newsnum {
border: 6rpx solid #1cce31;
}
.tcjf_busnumsamll {
width: 432rpx;
height: 92rpx;
background-color: #1d75cc;
margin: 9rpx auto;
border-radius: 6rpx;
line-height: 92rpx;
}
.tcjf_newsnumsamll {
background-color: #1cce31;
}
.tcjf_busnumsamll text {
color: #fff;
font-size: 50rpx;
}
.tcjf_busnumtime {
border-top: 2rpx solid #e6e6e6;
padding: 0 30rpx;
}
.tcjf_busnum_item text {
font-size: 28rpx;
color: #808080;
}
.tcjf_busnum_item {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
justify-content: space-between;
line-height: 108rpx;
border-bottom: 2rpx solid #e6e6e6;
}
.tcjf_busnum_item .red {
color: #48dbd3;
font-size: 36rpx;
font-weight: bold;
}
.tcjf_busnum_item .item_time {
color: #333333;
font-size: 30rpx;
}
.tcjf_money {
width: 100%;
height: 200rpx;
background-color: #ddf3f2;
text-align: center;
margin-bottom: 40rpx;
}
.tcjf_money text {
font-size: 28rpx;
color: #333;
display: inline-block;
}
.tcjf_money .yf_money {
font-size: 28rpx;
color: #808080;
display: block;
line-height: 50rpx;
padding-top: 35rpx;
}
.tcjf_money .money_num {
font-size: 60rpx;
color: #be3257;
font-weight: bold;
}
</style>
\ No newline at end of file
<template>
<!-- pages/pay/pay.wxml -->
<view class="pay_box">
<button class="chaxun pay-btn">{{ pay_btn_text }}</button>
<view v-if="platform != 'android'">
<button class="chaxun" open-type="launchApp" @error="launchAppError">返回APP</button>
</view>
</view>
</template>
<script>
var app = getApp();
export default {
data() {
return {
pay_btn_text: '支付中',
platform: ''
};
},
onLoad: function (options) {
var that = this;
uni.getSystemInfo({
success(res) {
that.setData({
platform: res.platform
});
}
});
if (options.order_num) {
uni.login({
success(res) {
if (res.code) {
console.log(res);
//发起网络请求
uni.request({
url: app.globalData.url + '/api/pay/mini',
data: {
code: res.code,
order_num: options.order_num
},
success(ret) {
console.log(ret.data);
if (ret.data.code == 200) {
//支付
uni.requestPayment({
timeStamp: ret.data.data.timeStamp,
nonceStr: ret.data.data.nonceStr,
package: ret.data.data.package,
signType: ret.data.data.signType,
paySign: ret.data.data.paySign,
success(res) {
uni.showToast({
title: '支付成功',
icon: 'success',
duration: 1500
});
that.setData({
pay_btn_text: '支付成功'
});
setTimeout(function () {
uni.navigateBack({});
}, 1000);
},
fail(res) {
uni.showToast({
title: '支付失败',
icon: 'none',
duration: 1500
});
that.setData({
pay_btn_text: '支付失败'
});
}
});
} else {
uni.showModal({
title: '提示',
content: ret.data.message,
showCancel: false,
success(res) {}
});
that.setData({
pay_btn_text: ret.data.message
});
}
}
});
} else {
console.log('登录失败!' + res.errMsg);
}
}
});
}
},
methods: {
launchAppError() {
console.log('占位:函数 launchAppError 未声明');
}
}
};
</script>
<style>
/* pages/pay/pay.wxss */
.pay_box {
padding: 2%;
}
.chaxun {
margin-top: 10px;
}
</style>
<template>
<!-- pages/pay/pay.wxml -->
<view class="pay_box">
<button class="chaxun pay-btn">{{ pay_btn_text }}</button>
<view v-if="platform != 'android'">
<button class="chaxun" open-type="launchApp" @error="launchAppError">返回APP</button>
</view>
</view>
</template>
<script>
var app = getApp();
export default {
data() {
return {
pay_btn_text: '支付中',
platform: ''
};
},
onLoad: function(options) {
var that = this;
let pay_mode = '01'
//#ifdef MP-WEIXIN
pay_mode = '01'
//#endif
//#ifdef MP-ALIPAY
pay_mode = '02'
//#endif
uni.getSystemInfo({
success(res) {
that.setData({
platform: res.platform
});
}
});
if (options.order_num) {
uni.login({
success(res) {
if (res.code) {
console.log(res);
//发起网络请求
uni.request({
url: app.globalData.url + '/api/pay/mini',
data: {
code: res.code,
order_num: options.order_num,
pay_mode: pay_mode
},
success(ret) {
console.log(ret.data);
if (ret.data.code == 200) {
//支付
uni.requestPayment({
orderInfo: ret.data.data.tradeNO,
timeStamp: ret.data.data.timeStamp,
nonceStr: ret.data.data.nonceStr,
package: ret.data.data.package,
signType: ret.data.data.signType,
paySign: ret.data.data.paySign,
success(res) {
uni.showToast({
title: '支付成功',
icon: 'success',
duration: 1500
});
that.setData({
pay_btn_text: '支付成功'
});
setTimeout(function() {
uni.navigateBack({});
}, 1000);
},
fail(res) {
uni.showToast({
title: '支付失败',
icon: 'none',
duration: 1500
});
that.setData({
pay_btn_text: '支付失败'
});
}
});
} else {
uni.showModal({
title: '提示',
content: ret.data.message,
showCancel: false,
success(res) {}
});
that.setData({
pay_btn_text: ret.data.message
});
}
}
});
} else {
console.log('登录失败!' + res.errMsg);
}
}
});
}
},
methods: {
launchAppError() {
console.log('占位:函数 launchAppError 未声明');
}
}
};
</script>
<style>
/* pages/pay/pay.wxss */
.pay_box {
padding: 2%;
}
.chaxun {
margin-top: 10px;
}
</style>
\ No newline at end of file
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>yizhiwuye</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.a94cb2b6.js></script><script src=/static/js/index.f065fc54.js></script></body></html>
\ No newline at end of file
unpackage/dist/build/h5/static/icon_delete.png

797 Bytes

unpackage/dist/build/h5/static/images/baaner1_02.png

107 KB

unpackage/dist/build/h5/static/images/back.png

2.82 KB

unpackage/dist/build/h5/static/images/delete.png

1.35 KB

unpackage/dist/build/h5/static/images/empty.png

21.7 KB

unpackage/dist/build/h5/static/images/i_go.png

1.32 KB

unpackage/dist/build/h5/static/images/icon_03.png

7.26 KB

unpackage/dist/build/h5/static/images/img_03.png

35.3 KB

unpackage/dist/build/h5/static/images/nosucc_06.png

3.54 KB

unpackage/dist/build/h5/static/images/succ_03.png

4.18 KB

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