Commit 6c0d235b authored by 罗超's avatar 罗超

1

parent 396f5baa
This diff is collapsed.
<template>
<div class="mynav" :style="{ background: bg }">
<swiper :autoplay="false" :style="{ height: height + 'rpx' }">
<swiper :autoplay="false" :style="{ Height: height + 'rpx' }">
<swiper-item v-for="(item, index) in cols" :key="index">
<view :style="[formatStyle]">
<!-- #ifdef MP-WEIXIN -->
......@@ -65,6 +65,7 @@ export default {
created() {
let tempArray = [];
this.height = this.navs.rows * this.height;
console.log(66, this.height);
this.navs.navs.forEach((x, i) => {
tempArray.push(x);
if (
......
{
"name" : "mallapp",
"appid" : "",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"name": "mallapp",
"appid": "",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
/* 5+App特有相关 */
"app-plus" : {
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
"app-plus": {
"usingComponents": true,
"nvueCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* 模块配置 */
"modules" : {
"Share" : {}
"modules": {
"Share": {}
},
/* 应用发布信息 */
"distribute" : {
"distribute": {
/* android打包配置 */
"android" : {
"permissions" : [
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
......@@ -50,56 +50,64 @@
]
},
/* ios打包配置 */
"ios" : {},
"ios": {},
/* SDK配置 */
"sdkConfigs" : {
"share" : {
"weixin" : {
"appid" : "wxbb033190e0ffa5db",
"UniversalLinks" : ""
"sdkConfigs": {
"share": {
"weixin": {
"appid": "wxbb033190e0ffa5db",
"UniversalLinks": ""
}
}
}
}
},
/* 快应用特有相关 */
"quickapp" : {},
"quickapp": {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wxcf0727a7c78b501e",
"setting" : {
"urlCheck" : false,
"minified" : false
"mp-weixin": {
"appid": "wxcf0727a7c78b501e",
"setting": {
"urlCheck": false,
"minified": false
},
"usingComponents" : true,
"permission" : {
"usingComponents": true,
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
}
},
"mp-alipay" : {
"usingComponents" : true
"mp-alipay": {
"component2": true,
"usingComponents": true,
"appid": "2021002181628809",
"plugins": { // 使用到的插件
"subscribeMsg": { // 订阅消息插件
"version": "*", // 目前只支持设置 * 拉取当前上架最新版本
"provider": "2021001155639035" // 消息订阅插件 appid
}
}
},
"mp-baidu" : {
"usingComponents" : true
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao" : {
"usingComponents" : true
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics" : {
"enable" : false
"uniStatistics": {
"enable": false
},
"h5" : {
"router" : {
"mode" : "history",
"base" : "/h5/"
"h5": {
"router": {
"mode": "history",
"base": "/h5/"
},
"template" : "h5.html",
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "ZAPBZ-SVBWR-OAMWM-WC45H-AKFU3-FIBP3"
"template": "h5.html",
"sdkConfigs": {
"maps": {
"qqmap": {
"key": "ZAPBZ-SVBWR-OAMWM-WC45H-AKFU3-FIBP3"
}
}
}
......
......@@ -356,7 +356,11 @@
"pages": [{
"path": "index",
"style": {
"navigationStyle": "custom"
"navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "always",
"titlePenetrate": "YES"
}
}
}, {
"path": "pickcarcity"
......@@ -693,7 +697,14 @@
"path": "policyDetail" //政策详情
},
{
"path": "fillOrder" //填写订单
"path": "fillOrder", //填写订单
"usingComponents": { // 引用小程序插件
// #ifdef MP-ALIPAY
"subscribe-msg": "plugin://subscribeMsg/subscribe-msg"
// #endif
}
},
{
"path": "addGuest" //新增旅客
......@@ -711,5 +722,6 @@
"titleNView": false
//#endif
}
}
}
\ No newline at end of file
......@@ -500,17 +500,17 @@
font-size="28"></u-tabs>
<picker-view v-show="popupcurrent==0" @change="getpopupcu1" class="picker-view">
<picker-view v-if="popupcurrent==0" @change="getpopupcu1" class="picker-view">
<picker-view-column>
<view class=" item" v-for="(item,index) in DepartList" :key="index">{{item}}</view>
</picker-view-column>
</picker-view>
<picker-view v-show="popupcurrent==1" @change="getpopupcu2" class="picker-view">
<picker-view v-if="popupcurrent==1" @change="getpopupcu2" class="picker-view">
<picker-view-column>
<view class=" item" v-for="(item,index) in ArriveList" :key="index">{{item}}</view>
</picker-view-column>
</picker-view>
<picker-view v-show="popupcurrent==2" @change="getpopupcu3" class="picker-view">
<picker-view v-if="popupcurrent==2" @change="getpopupcu3" class="picker-view">
<picker-view-column>
<view class=" item" v-for="(item,index) in alltime" :key="index">{{item}}</view>
</picker-view-column>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -254,7 +254,11 @@ export default {
this.end = this.setDefaultDate(this.getDefaultDate(1));
},
});
// #ifdef MP-ALIPAY
uni.setNavigationBarTitle({
title: "",
});
// #endif
//如果需要日期的价格,-1为无房,其他价格代表正常
// if (option && option.request) {
// uni.request({
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -680,7 +680,7 @@ export default {
color: #ffffff;
text-align: center;
line-height: 78rpx;
margin: 20rpx auto 80rpx;
margin: 20rpx auto;
}
.restaurant-detail {
......
<template>
<view class="calendar">
<view class="calenHead-tradition" v-if="mode == '2'">
<!-- #ifdef MP-WEIXIN -->
<picker
class="dateBox"
mode="multiSelector"
......@@ -8,13 +9,19 @@
:value="pickerData.indexList"
@change="bindPickerChange"
>
<view>
<text class="font-big">{{ nowMonth.month }}</text>
<text class="font-small">{{ nowMonth.year }}</text>
<uni-icons type="arrowdown" size="10"></uni-icons>
</view>
</picker>
<!-- <text class="reset" @tap="reset">重置</text> -->
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view class="dateBox" @click="changeDate">
<text class="font-big">{{ nowMonth.month }}</text>
<text class="font-small">{{ nowMonth.year }}</text>
<uni-icons type="arrowdown" size="10"></uni-icons>
</view>
<!-- #endif -->
</view>
<scroll-view class="calenHead" scroll-x v-if="mode == '1'">
<view
......@@ -82,7 +89,9 @@ export default {
},
datePrice: {
type: Array,
default: () => [],
default: function () {
return [];
},
},
howManyMonth: {
//包含当月共显示几个月
......@@ -110,11 +119,6 @@ export default {
space: 0, //周几占位个数 例如 周二占位2个
};
},
watch: {
defaultSelect(val) {
// this.getDefaultData(val)
},
},
mounted() {
this.today = new Date();
this.nowMonth = {
......@@ -203,6 +207,30 @@ export default {
},
},
methods: {
// #ifdef MP-ALIPAY
changeDate() {
let now = new Date().getFullYear();
let that = this;
let curDate = "";
if (that.nowMonth.year && that.nowMonth.month) {
curDate = that.nowMonth.year + "-" + that.nowMonth.month;
} else {
curDate = new Date();
}
my.datePicker({
format: "yyyy-MM",
currentDate: curDate,
startDate: now - 10 + "-01",
endDate: now + 10 + "-12",
success: (res) => {
let arr = res.date.split("-");
that.nowMonth.year = arr[0];
that.nowMonth.month = arr[1];
this.$emit("changeMonth", that.nowMonth);
},
});
},
// #endif
headItemTap(index, month) {
this.current = index;
this.$emit("changeMonth", momth);
......
......@@ -5,14 +5,22 @@
<u-icon name="cross" size="28" class="close-icon" @click="close"></u-icon>
</view>
<view>
<z-calendar ref="calendar" :datePrice="datePrice" :curryear='curryear' :currmonth='currmonth'
howManyMonth="6" mode="2" @changeDate="changeDate" @changeMonth="changeMonth"
:defaultSelect="defaultSelect"></z-calendar>
<z-calendar
ref="calendar"
:datePrice.sync="datePrice"
:curryear="curryear"
:currmonth="currmonth"
howManyMonth="6"
mode="2"
@changeDate="changeDate"
@changeMonth="changeMonth"
:defaultSelect="defaultSelect"
></z-calendar>
</view>
<view class="chooseTicketAndNum">
<view class="chooseTicket">
<view class="TicketName">
{{TicketName}}
{{ TicketName }}
</view>
<view class="">
<u-number-box v-model="peopleNum" @change="valChange"></u-number-box>
......@@ -20,11 +28,10 @@
</view>
<view class="chooseBtn-box">
<view class="btn-TicketName-box">
{{defaultSelect}}
{{ defaultSelect }}
<text class="btn-TicketName">
{{TicketName}}
{{ TicketName }}
</text>
</view>
<view class="btn-box">
<view class="icon-box">
......@@ -32,55 +39,60 @@
<u-icon name="service-o" color="#111111" size="24rpx"></u-icon>
</view>
<view class="">
客服
</view>
<button open-type="contact" :send-message-title="TicketName" :send-message-path="msgPath"
:send-message-img="TicketImg" :show-message-card="true"></button>
<view class=""> 客服 </view>
<button
open-type="contact"
:send-message-title="TicketName"
:send-message-path="msgPath"
:send-message-img="TicketImg"
:show-message-card="true"
></button>
</view>
<view class="subscribe-btn" @click="nextStep">
立即预订
</view>
<view class="subscribe-btn" @click="nextStep"> 立即预订 </view>
</view>
</view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='goback'></auth>
<auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="goback"
></auth>
</view>
</template>
<script>
import zCalendar from './njzz-calendar/njzz-calendar.vue'
import auth from "../../../components/auth/index.vue";
export default {
import zCalendar from "./njzz-calendar/njzz-calendar.vue";
import auth from "../../../components/auth/index.vue";
export default {
components: {
zCalendar,
auth
auth,
},
props: {
dateStr: {
type: String,
default: ""
default: "",
},
TicketID: {
type: Number,
default: 0
default: 0,
},
TitekCounponId: {
type: Number,
default: 0
default: 0,
},
TicketName: {
type: String,
default: ""
default: "",
},
TicketImg: {
type: String,
default: ""
default: "",
},
msgPath: {
type: String,
default: ""
default: "",
},
},
data() {
......@@ -93,98 +105,105 @@
peopleNum: 1,
showAuth: false,
u: {},
}
};
},
watch: {
dateStr(val, oldVal) {
this.defaultSelect = val;
let newMonth = val.split('-')[1]
let oldMonth = oldVal.split('-')[1]
let newMonth = val.split("-")[1];
let oldMonth = oldVal.split("-")[1];
if (newMonth != oldMonth && oldMonth != undefined) {
this.getGoodsDateList(val)
this.getGoodsDateList(val);
}
let list = this.datePrice.filter(item => item.date == this.dateStr);
let list = this.datePrice.filter((item) => item.date == this.dateStr);
console.log(119, list);
if (list.length > 0) {
this.price = list[0].price
this.price = list[0].price;
}
},
TicketID(val) {
if (val) {
this.getGoodsDateList(this.dateStr)
}
this.getGoodsDateList(this.dateStr);
}
},
},
mounted() {
let year = new Date().getFullYear(); //年
let month = new Date().getMonth() + 1; //月
if (month < 10) {
month = ('0' + month)
month = "0" + month;
}
this.curryear = year
this.currmonth = month
this.curryear = year;
this.currmonth = month;
// #ifdef MP-ALIPAY
this.getGoodsDateList(this.curryear + "-" + this.currmonth);
uni.setNavigationBarTitle({
title: "",
});
// #endif
},
methods: {
valChange(e) {
this.peopleNum = e.value
this.peopleNum = e.value;
},
getGoodsDateList(date) {
this.request2({
url: '/api/AppletDining/GetMonthTicketList',
this.request2(
{
url: "/api/AppletDining/GetMonthTicketList",
data: {
TicketID: this.TicketID,
BuyDate: date
}
BuyDate: date,
},
},
res => {
(res) => {
let data = res.data;
let datePrice = [];
data.forEach(x => {
let obj = {}
obj.date = x.Year + '-' + x.Month + '-' + x.Day;
data.forEach((x) => {
let obj = {};
obj.date = x.Year + "-" + x.Month + "-" + x.Day;
if (x.IsHavePrice == 1) {
let p = this.$utils.getretailer() == true ? x.HPriceB : x.HPriceC
let p = this.$utils.getretailer() == true ? x.HPriceB : x.HPriceC;
obj.price = p;
} else {
obj.price = "";
}
datePrice.push(obj)
})
this.datePrice = datePrice
let list = this.datePrice.filter(item => item.date == this.dateStr);
datePrice.push(obj);
});
this.datePrice = datePrice;
let list = this.datePrice.filter((item) => item.date == this.dateStr);
if (list.length > 0) {
this.price = list[0].price
this.price = list[0].price;
}
}
);
},
changeDate(data) { //选择日期事件 可以将data绑定到此页面以用来提交等操作
changeDate(data) {
//选择日期事件 可以将data绑定到此页面以用来提交等操作
this.defaultSelect = data.date;
this.price = data.price
this.$forceUpdate()
this.price = data.price;
this.$forceUpdate();
},
changeMonth(nowMonth) {
let Month = nowMonth.year + '-' + nowMonth.month + '-01';
this.getGoodsDateList(Month)
let Month = nowMonth.year + "-" + nowMonth.month + "-01";
this.getGoodsDateList(Month);
},
nextStep() {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
avatarUrl: "",
};
this.showAuth = true;
} else {
if (!this.price&&this.price!==0){
if (!this.price && this.price !== 0) {
uni.showToast({
title: "请选择日期",
icon: "none",
});
return
return;
}
let data = {
TicketId: this.TicketID,
......@@ -193,30 +212,30 @@
Date: this.defaultSelect,
TicketName: this.TicketName,
PeopleNumber: this.peopleNum,
}
};
uni.navigateTo({
url: "/pages/ticketCoupons/fillOrder?data=" + encodeURIComponent(JSON.stringify(data)),
url:
"/pages/ticketCoupons/fillOrder?data=" +
encodeURIComponent(JSON.stringify(data)),
});
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.getOrderStatus();
},
goback() {
uni.navigateBack()
uni.navigateBack();
},
close() {
this.$emit("close")
}
}
}
this.$emit("close");
},
},
};
</script>
<style lang="scss" scoped>
.subscribeTicket {
.subscribeTicket {
// height: 70vh;
margin-top: 45rpx;
overflow-y: scroll;
......@@ -242,7 +261,6 @@
// height: 335rpx;
padding: 30rpx;
.chooseTicket {
display: flex;
justify-content: space-between;
......@@ -259,14 +277,14 @@
border-radius: 10rpx;
font-size: 26rpx;
font-family: PingFang SC;
color: #FFFFFF;
color: #ffffff;
}
}
.chooseBtn-box {
// width: 670px;
height: 100rpx;
background-color: #FFFFFF;
background-color: #ffffff;
box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2);
border-radius: 16rpx;
padding: 0 20rpx;
......@@ -304,8 +322,6 @@
display: flex;
justify-content: center;
}
button {
......@@ -314,7 +330,7 @@
position: absolute;
left: 0;
top: 0;
opacity: 0
opacity: 0;
}
}
......@@ -327,12 +343,12 @@
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #FFFFFF;
color: #ffffff;
text-align: center;
line-height: 78rpx;
}
}
}
}
}
}
</style>
This diff is collapsed.
......@@ -7,7 +7,7 @@ function calcContentHeight(chaliang) {
})
return contentHeight
}
function SystemInfo(){//获取屏幕宽高
function SystemInfo() {//获取屏幕宽高
let SystemInfo = {}
uni.getSystemInfo({
success(res) {
......@@ -17,30 +17,45 @@ function SystemInfo(){//获取屏幕宽高
})
return SystemInfo
}
function getRect(selector){//获取元素的信息
function getRect(selector) {//获取元素的信息
return new Promise((resolve) => {
let view = uni.createSelectorQuery().select(selector);
view.fields({
size: true,
rect: true,
scrollOffset:true
scrollOffset: true
}, (res) => {
resolve(res);
}).exec();
})
}
function getretailer(){//判断是否是分销商
}
function getretailer() {//判断是否是分销商
let isdistributor = false
let mall_UserInfo = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo"):{};
if(mall_UserInfo.IsDistrbutorUser && mall_UserInfo.IsDistrbutorUser ==1){
let mall_UserInfo = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo") : {};
if (mall_UserInfo.IsDistrbutorUser && mall_UserInfo.IsDistrbutorUser == 1) {
isdistributor = true
}
return isdistributor
}
// #ifdef MP-ALIPAY
// 引入消息模板方法
const { requestSubscribeMessage } = requirePlugin("subscribeMsg");
function SubscribeMsgAli(ids, cb) {//支付宝小程序订阅消息
requestSubscribeMessage({ // 触发消息订阅弹框
entityIds: ids, // 模板消息id,
callback(res) {
cb()
}
})
}
// #endif
export default {
calcContentHeight,
SystemInfo,
getRect,
getretailer
getretailer,
// #ifdef MP-ALIPAY
SubscribeMsgAli
// #endif
}
\ No newline at end of file
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