diff --git a/pages/index/index.vue b/pages/index/index.vue
index 2261668..3d433b2 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,6 +1,21 @@
+
+
+ ·快捷入口
+
+
+
+
+ 立即核销
+
+
+
+ 查看订单
+
+
+
@@ -20,9 +35,40 @@
}
-
diff --git a/static/css/base.css b/static/css/base.css
index 83ecd6b..dd1dc8b 100644
--- a/static/css/base.css
+++ b/static/css/base.css
@@ -62,6 +62,7 @@ view {
display: -webkit-box;
-webkit-box-orient: vertical;
}
+
.finished-text {
text-align: center;
font-size: 24upx;
@@ -69,3 +70,39 @@ view {
color: #999999;
}
+.flex{
+ display: flex;
+}
+.flex-shrink-0{
+ flex-shrink: 0;
+}
+.flex-1{
+ flex: 1;
+}
+.flex-wrap{
+ flex-wrap: wrap;
+}
+.w-full{
+ width: 100%;
+}
+.w-1rpx{
+ width: 1rpx;
+}
+.h-1rpx{
+ height: 1rpx;
+}
+.relative{
+ position: relative;
+}
+.absolute{
+ position: absolute;
+}
+.flex-items-center{
+ align-items: center;
+}
+.no-scrollbar::-webkit-scrollbar{
+ display: none;
+}
+.font-bold{
+ font-weight: bold;
+}
\ No newline at end of file
diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js
index 6df9c07..11b337d 100644
--- a/static/js/CommonFunction.js
+++ b/static/js/CommonFunction.js
@@ -59,3 +59,109 @@ Vue.prototype.IsMail = code => {
var pattern = /^\w+@[a-z0-9]+\.[a-z]+$/i;
return pattern.test(code);
}
+
+// 图片显示判断
+Vue.prototype.showImg = img => {
+ if(!img) return;
+ if (img.indexOf('https://') != -1 || img.indexOf('http://') != -1) {
+ return img;
+ } else {
+ return 'https://tlgz.sz-trip.com' + img;
+ }
+}
+
+// 获取经纬度
+Vue.prototype.getLocation = () => {
+ uni.startLocationUpdate({
+ success: res => {
+ uni.onLocationChange(data => {
+ uni.setStorageSync('location', {
+ lat: data.latitude,
+ lon: data.longitude
+ });
+ })
+ }
+ })
+}
+
+// 金刚区头图
+Vue.prototype.getHeadImg = type => {
+ return Vue.prototype.Post(
+ {
+ type,
+ },
+ '/api/public_service/getKumgangHeadImgList'
+ ).then(res => {
+ return res.data[0].image
+ });
+}
+
+// 路由页面跳转
+Vue.prototype.gotoPath = path => {
+ uni.navigateTo({
+ url: path
+ })
+}
+
+// 返回上一页
+Vue.prototype.goBack = () => {
+ console.log(getCurrentPages())
+ var pages = getCurrentPages();
+ var page = pages[pages.length - 1];
+ if(page.route == 'subPackages/techan/techanList') {
+ uni.switchTab({
+ url: '/pages/index/index'
+ })
+ return;
+ }
+ getCurrentPages().length > 1 ? uni.navigateBack({}) : uni.switchTab({
+ url: '/pages/index/index'
+ })
+}
+
+// 打开地图
+Vue.prototype.openLocation = (lat,lon) => {
+ uni.openLocation({
+ latitude: Number(lat),
+ longitude: Number(lon),
+ success: function () {
+ console.log('success');
+ }
+ });
+}
+
+// 拨打电话
+Vue.prototype.clickPhone = (phone) => {
+ uni.makePhoneCall({
+ phoneNumber:phone
+ })
+}
+
+// 周几
+Vue.prototype.ShowDateDay = day => {
+ let stateTxt = "";
+ switch (day) {
+ case 0:
+ stateTxt = '周日'
+ break;
+ case 1:
+ stateTxt = '周一'
+ break;
+ case 2:
+ stateTxt = '周二'
+ break;
+ case 3:
+ stateTxt = '周三'
+ break;
+ case 4:
+ stateTxt = '周四'
+ break;
+ case 5:
+ stateTxt = '周五'
+ break;
+ case 6:
+ stateTxt = '周六'
+ break;
+ }
+ return stateTxt
+}
\ No newline at end of file