diff --git a/manifest.json b/manifest.json index 513203d..3c380f0 100644 --- a/manifest.json +++ b/manifest.json @@ -61,6 +61,9 @@ "desc" : "提供您最近的活动地址" } }, + "optimization" : { + "subPackages" : true + }, "requiredPrivateInfos" : [ "getLocation" ] }, "mp-alipay" : { diff --git a/packages/dl/index.vue b/packages/dl/index.vue new file mode 100644 index 0000000..4fe26d1 --- /dev/null +++ b/packages/dl/index.vue @@ -0,0 +1,210 @@ + + + + + \ No newline at end of file diff --git a/packages/dl/static/dl/dl1.png b/packages/dl/static/dl/dl1.png new file mode 100644 index 0000000..a49307c Binary files /dev/null and b/packages/dl/static/dl/dl1.png differ diff --git a/packages/dl/static/dl/dl1_cur.png b/packages/dl/static/dl/dl1_cur.png new file mode 100644 index 0000000..35e4f7f Binary files /dev/null and b/packages/dl/static/dl/dl1_cur.png differ diff --git a/packages/dl/static/dl/dl2.png b/packages/dl/static/dl/dl2.png new file mode 100644 index 0000000..e7cb22f Binary files /dev/null and b/packages/dl/static/dl/dl2.png differ diff --git a/packages/dl/static/dl/dl2_cur.png b/packages/dl/static/dl/dl2_cur.png new file mode 100644 index 0000000..f9578ca Binary files /dev/null and b/packages/dl/static/dl/dl2_cur.png differ diff --git a/packages/dl/static/dl/dl3.png b/packages/dl/static/dl/dl3.png new file mode 100644 index 0000000..e84c2d5 Binary files /dev/null and b/packages/dl/static/dl/dl3.png differ diff --git a/packages/dl/static/dl/dl3_cur.png b/packages/dl/static/dl/dl3_cur.png new file mode 100644 index 0000000..5f86b30 Binary files /dev/null and b/packages/dl/static/dl/dl3_cur.png differ diff --git a/packages/dl/static/dl/dl4.png b/packages/dl/static/dl/dl4.png new file mode 100644 index 0000000..c8088ee Binary files /dev/null and b/packages/dl/static/dl/dl4.png differ diff --git a/packages/dl/static/dl/dl4_cur.png b/packages/dl/static/dl/dl4_cur.png new file mode 100644 index 0000000..f7671de Binary files /dev/null and b/packages/dl/static/dl/dl4_cur.png differ diff --git a/packages/dl/static/dl/dl5.png b/packages/dl/static/dl/dl5.png new file mode 100644 index 0000000..111a335 Binary files /dev/null and b/packages/dl/static/dl/dl5.png differ diff --git a/packages/dl/static/dl/dl5_cur.png b/packages/dl/static/dl/dl5_cur.png new file mode 100644 index 0000000..a85a60a Binary files /dev/null and b/packages/dl/static/dl/dl5_cur.png differ diff --git a/packages/dl/static/dl/dl6.png b/packages/dl/static/dl/dl6.png new file mode 100644 index 0000000..7c6043a Binary files /dev/null and b/packages/dl/static/dl/dl6.png differ diff --git a/packages/dl/static/dl/dl6_cur.png b/packages/dl/static/dl/dl6_cur.png new file mode 100644 index 0000000..1bd2937 Binary files /dev/null and b/packages/dl/static/dl/dl6_cur.png differ diff --git a/packages/dl/static/dl/dl7.png b/packages/dl/static/dl/dl7.png new file mode 100644 index 0000000..7d42b53 Binary files /dev/null and b/packages/dl/static/dl/dl7.png differ diff --git a/packages/dl/static/dl/dl7_cur.png b/packages/dl/static/dl/dl7_cur.png new file mode 100644 index 0000000..83f1efe Binary files /dev/null and b/packages/dl/static/dl/dl7_cur.png differ diff --git a/packages/dl/static/dl/dl_cur.png b/packages/dl/static/dl/dl_cur.png new file mode 100644 index 0000000..bab2b7c Binary files /dev/null and b/packages/dl/static/dl/dl_cur.png differ diff --git a/packages/dl/static/dl/dlbg.png b/packages/dl/static/dl/dlbg.png new file mode 100644 index 0000000..09ed066 Binary files /dev/null and b/packages/dl/static/dl/dlbg.png differ diff --git a/pages/map/map.vue b/packages/map/map.vue similarity index 100% rename from pages/map/map.vue rename to packages/map/map.vue diff --git a/pages.json b/pages.json index cb5de7d..c762cd2 100644 --- a/pages.json +++ b/pages.json @@ -62,7 +62,7 @@ "enablePullDownRefresh": false } - }, { + },{ "path": "pages/guide/index", "style": { "navigationBarTitleText": "服务", @@ -79,13 +79,6 @@ "enablePullDownRefresh": false } - }, { - "path": "pages/map/map", - "style": { - "navigationBarTitleText": "展馆导航", - "enablePullDownRefresh": false - } - }, { "path": "pages/visit/index", "style": { @@ -234,20 +227,32 @@ } }, { - "path": "pages/vr/vrpagegm", + "path": "pages/guide/feedbackinfo", "style": { - "navigationBarTitleText": "", + "navigationBarTitleText": "意见建议详情", "enablePullDownRefresh": false } + } + ], + "subPackages":[{ + "root": "packages", + "pages":[{ + "path": "dl/index", + "style": { + "navigationBarTitleText": "展厅导览", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#fff" + } }, { - "path": "pages/guide/feedbackinfo", + "path": "map/map", "style": { - "navigationBarTitleText": "意见建议详情", + "navigationBarTitleText": "展馆导航", "enablePullDownRefresh": false } - } + }] + } ], "globalStyle": { "navigationBarTextStyle": "black", diff --git a/pages/activity/book.vue b/pages/activity/book.vue index 8a40959..c9b522b 100644 --- a/pages/activity/book.vue +++ b/pages/activity/book.vue @@ -18,11 +18,6 @@ 活动时间:{{timeFormat(numberlist.start_time,"yyyy年MM月DD日")}}{{getHm(numberlist.start_time)}}-{{getHm(numberlist.end_time)}} - 活动地址:{{list.address}} @@ -30,7 +25,8 @@ - 人数限制:{{numberlist.total==0?'不限':numberlist.total}} + 人数限制:{{(list.form==2?10 : (numberlist.total==0?'不限':numberlist.total))}} + @@ -61,7 +57,7 @@ 每单限购{{list.person_max_count}}张,同一身份证当天限购1张 {{list.team_min_count}}人以上可团体预约 + v-if="type=='team'">{{list.form==2?10:list.team_min_count}}人以上可团体预约 @@ -151,11 +147,6 @@ - @@ -187,17 +178,12 @@ - - + @@ -212,23 +198,7 @@ - - - + keyName="label"> @@ -239,7 +209,6 @@ - 下载模版 @@ -267,7 +236,6 @@ mode="center" width="600rpx" height="150rpx"> - 您已经预约成功 报名成功 即将跳转到活动预约 {{time}} s @@ -323,17 +291,11 @@ message: '请输入证件号', trigger: 'blur' }], - card_type: [{ - required: true, - message: '请选择证件类型', - trigger: 'change' - }] }, cardshow: false, cardshows: false, card_type_name: "身份证", card_type_names: "身份证", - // cardLists:['身份证','港澳台居民居住证','护照','台胞证','港澳证'], cardLists: [ [{ value: 1, @@ -581,22 +543,7 @@ }) return false; } - if (that.formUser.card_type == 1) { - if (this.util.isNull(this.formUser.idcard)) { - uni.showToast({ - icon: "none", - title: "请填写身份证号" - }) - return false; - } - if (!that.util.isValidCardID(that.formUser.idcard)) { - uni.showToast({ - icon: "none", - title: "请正确输入身份证号" - }) - return false; - } - } + if (that.isEdit) { that.form.details_list[that.isEditIndex] = that.formUser; that.isEdit = false diff --git a/pages/activity/index.vue b/pages/activity/index.vue index ac6fc05..eeb705f 100644 --- a/pages/activity/index.vue +++ b/pages/activity/index.vue @@ -6,13 +6,6 @@ - - @@ -60,20 +53,12 @@ 更多>> - 活动地址:{{isUnde(item.address)}} - diff --git a/pages/activity/info.vue b/pages/activity/info.vue index 35e2061..799c9c9 100644 --- a/pages/activity/info.vue +++ b/pages/activity/info.vue @@ -3,7 +3,6 @@ - @@ -17,24 +16,11 @@ {{isUnde(list.name)}} - - 活动地址:{{isUnde(list.address)}} - - 距离:{{isUnde(list.distance)}}km @@ -42,11 +28,6 @@ - - - @@ -67,14 +48,17 @@ 活动时间:{{item.time}} - - - 限制人数:{{item.total==0?'不限':item.total}} - - - 已报人数:{{item.has_total}} - - + + + 限制人数:{{item.total==0?'不限':item.total}} + + + {{item.has_total>0?"预约已满":""}} + + + 已报名数:{{item.has_total}} + + @@ -89,11 +73,9 @@ - - @@ -111,7 +93,7 @@ - + 团体预约 @@ -192,14 +174,7 @@ this.util.alert("您选择的场次不可预约!"); // this.isCanBook = false return; - }; - // var nt = new Date(); - // this.isCanBook = this.$moment(nt).isBefore(item.end_plan); - // console.log("this.isCanBook",this.isCanBook) - // if(!this.isCanBook){ - // this.util.alert("预约时间已过"); - // return; - // } + }; var _numbers = this.numbers; for (var mod of _numbers) { mod.checked = false; @@ -257,6 +232,9 @@ if (m.has_total == m.total && m.total != 0) { m.disabled = true + } + if(res.form==2&&parseInt(m.has_total)>0){ + m.disabled = true } numberArr.push(m); if (!m.disabled) { @@ -266,7 +244,6 @@ i++; } } - //console.log("numberArr[0].id", numberArr[0].id); if (chkMod){ that.activity_number_id = chkMod.id that.isCanBook = true diff --git a/pages/index/index.vue b/pages/index/index.vue index 9b4bdc4..aef9133 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -41,7 +41,24 @@ - + + + + + + + + 展厅导览 + + + + + + + 2F 平面图 + + + @@ -56,21 +73,6 @@ {{exhibitObj.name}} - - - @@ -192,7 +194,6 @@ - @@ -235,7 +236,8 @@ currentIndex: 0, listCalendar: [], showAuthorization: false, - openType: 1 + openType: 1, + dlimg:require("../../static/img/daolan.png") } }, onShareAppMessage() { @@ -262,6 +264,11 @@ uni.navigateTo({ url: "/pages/exhibit/list" }); + }, + toDl(){ + uni.navigateTo({ + url: "/packages/dl/index" + }); }, togame() { uni.navigateToMiniProgram({ @@ -424,7 +431,7 @@ }, openMap() { uni.navigateTo({ - url: "/pages/map/map" + url: "/packages/map/map" }) }, openPark() { @@ -562,16 +569,6 @@ isOpenDate = true; } else { isOpenDate = false; - /* uni.showToast({ - icon: "none", - title: selectDate + "不可以预约", - complete() { - setTimeout(function() { - that.load3Day(that.$moment(selectDate).add('days', 1) - .format("yyyy-MM-DD")) - }, 2000) - } - }, 2000) */ } } i++; @@ -626,15 +623,13 @@ .wrap{ background-color: #cf995a; } - .navBarBox { - /* background-color: #cf995a; */ + .navBarBox { position: fixed; top:0; left:0; width:100%; z-index:999; - background: linear-gradient(to bottom,#f6d593,#cf995a); - /* height:190rpx; */ + background: linear-gradient(to bottom,#f6d593,#cf995a); } .navBarBox .statusBar {} diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 9cb34cb..a15b86c 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -89,7 +89,6 @@ :sourceType="['album','camera']" :compress="false" :quality="80" :formData="otherData" :remove="true" :dataType="1" @uploadSuccess="uploadSuccess" @imgDelete="imgDelete" @uploadFail="uploadFail" :action="action"> - 确认提交 diff --git a/pages/visit/book.vue b/pages/visit/book.vue index 93a6326..dcb311a 100644 --- a/pages/visit/book.vue +++ b/pages/visit/book.vue @@ -175,15 +175,7 @@ - + {{type=="team"?"领队人信息":"联系人信息"}} @@ -198,11 +190,7 @@ - + @@ -241,16 +229,11 @@ - + - @@ -260,7 +243,6 @@ - @@ -290,7 +272,6 @@ - 下载模版 @@ -307,7 +288,6 @@ mode="center" width="600rpx" height="150rpx"> - 您已经预约成功 即将跳转到参观预约 {{time}} s @@ -580,9 +560,7 @@ } else { this.specialid = 0 } - // if(this.$refs.radio.currentValue){ - // this.specialtype = val; - // } + }, loadCommonUser() { var that = this; @@ -612,7 +590,6 @@ } } - // this.form.total = this.form.details_list.length; }, downLoad() { const downloadTask = uni.downloadFile({ @@ -688,10 +665,7 @@ submitOrder() { this.form.date = this.currentDate.date; this.form.rule_id = this.currentTime.id; - // if(this.specialid){ - // // - // this.form.is_disability = this.specialid; - // } + if(this.type!='team'){ if (this.form.details_list.length != this.form.total) { uni.showToast({ @@ -775,16 +749,6 @@ clearTimeout(that.timer) }, 3000) - // uni.showToast({ - // icon: "none", - // title: "下单成功", - // complete() { - - // uni.redirectTo({ - // url: "/pages/success/success?from=visit&id=" + res.id - // }) - // } - // }) }, utilFail: function(res) { that.util.toast(res); @@ -871,19 +835,7 @@ return false; } } - // if (this.util.isNull(this.formUser.mobile)) { - // uni.showToast({ - // icon: "none", - // title: "请填写手机号" - // }) - // return false; - // } else if (!this.util.phoneRegex.test(this.formUser.mobile)) { - // uni.showToast({ - // icon: "none", - // title: "请正确填写手机号" - // }) - // return false; - // } + if (!this.util.isNull(this.formUser.mobile)) { if (!this.util.phoneRegex.test(this.formUser.mobile)) { uni.showToast({ @@ -1059,16 +1011,6 @@ isOpenDate = true; } else { isOpenDate = false; - /* uni.showToast({ - icon: "none", - title: selectDate + "不可以预约", - complete() { - setTimeout(function() { - that.load3Day(that.$moment(selectDate).add('days', 1) - .format("yyyy-MM-DD")) - }, 2000) - } - }, 2000) */ } } i++; diff --git a/pages/vr/vrpagegm.vue b/pages/vr/vrpagegm.vue deleted file mode 100644 index e8691d7..0000000 --- a/pages/vr/vrpagegm.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - - - \ No newline at end of file diff --git a/static/img/daolan.png b/static/img/daolan.png new file mode 100644 index 0000000..bf10bcf Binary files /dev/null and b/static/img/daolan.png differ diff --git a/uni_modules/uni-transition/changelog.md b/uni_modules/uni-transition/changelog.md new file mode 100644 index 0000000..70c1cd4 --- /dev/null +++ b/uni_modules/uni-transition/changelog.md @@ -0,0 +1,22 @@ +## 1.3.2(2023-05-04) +- 修复 NVUE 平台报错的问题 +## 1.3.1(2021-11-23) +- 修复 init 方法初始化问题 +## 1.3.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-transition](https://uniapp.dcloud.io/component/uniui/uni-transition) +## 1.2.1(2021-09-27) +- 修复 init 方法不生效的 Bug +## 1.2.0(2021-07-30) +- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.1(2021-05-12) +- 新增 示例地址 +- 修复 示例项目缺少组件的 Bug +## 1.1.0(2021-04-22) +- 新增 通过方法自定义动画 +- 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式 +- 优化 动画触发逻辑,使动画更流畅 +- 优化 支持单独的动画类型 +- 优化 文档示例 +## 1.0.2(2021-02-05) +- 调整为 uni_modules 目录规范 diff --git a/uni_modules/uni-transition/components/uni-transition/createAnimation.js b/uni_modules/uni-transition/components/uni-transition/createAnimation.js new file mode 100644 index 0000000..8f89b18 --- /dev/null +++ b/uni_modules/uni-transition/components/uni-transition/createAnimation.js @@ -0,0 +1,131 @@ +// const defaultOption = { +// duration: 300, +// timingFunction: 'linear', +// delay: 0, +// transformOrigin: '50% 50% 0' +// } +// #ifdef APP-NVUE +const nvueAnimation = uni.requireNativePlugin('animation') +// #endif +class MPAnimation { + constructor(options, _this) { + this.options = options + // 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误 + this.animation = uni.createAnimation({ + ...options + }) + this.currentStepAnimates = {} + this.next = 0 + this.$ = _this + + } + + _nvuePushAnimates(type, args) { + let aniObj = this.currentStepAnimates[this.next] + let styles = {} + if (!aniObj) { + styles = { + styles: {}, + config: {} + } + } else { + styles = aniObj + } + if (animateTypes1.includes(type)) { + if (!styles.styles.transform) { + styles.styles.transform = '' + } + let unit = '' + if(type === 'rotate'){ + unit = 'deg' + } + styles.styles.transform += `${type}(${args+unit}) ` + } else { + styles.styles[type] = `${args}` + } + this.currentStepAnimates[this.next] = styles + } + _animateRun(styles = {}, config = {}) { + let ref = this.$.$refs['ani'].ref + if (!ref) return + return new Promise((resolve, reject) => { + nvueAnimation.transition(ref, { + styles, + ...config + }, res => { + resolve() + }) + }) + } + + _nvueNextAnimate(animates, step = 0, fn) { + let obj = animates[step] + if (obj) { + let { + styles, + config + } = obj + this._animateRun(styles, config).then(() => { + step += 1 + this._nvueNextAnimate(animates, step, fn) + }) + } else { + this.currentStepAnimates = {} + typeof fn === 'function' && fn() + this.isEnd = true + } + } + + step(config = {}) { + // #ifndef APP-NVUE + this.animation.step(config) + // #endif + // #ifdef APP-NVUE + this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config) + this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin + this.next++ + // #endif + return this + } + + run(fn) { + // #ifndef APP-NVUE + this.$.animationData = this.animation.export() + this.$.timer = setTimeout(() => { + typeof fn === 'function' && fn() + }, this.$.durationTime) + // #endif + // #ifdef APP-NVUE + this.isEnd = false + let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref + if(!ref) return + this._nvueNextAnimate(this.currentStepAnimates, 0, fn) + this.next = 0 + // #endif + } +} + + +const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', + 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', + 'translateZ' +] +const animateTypes2 = ['opacity', 'backgroundColor'] +const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'] +animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => { + MPAnimation.prototype[type] = function(...args) { + // #ifndef APP-NVUE + this.animation[type](...args) + // #endif + // #ifdef APP-NVUE + this._nvuePushAnimates(type, args) + // #endif + return this + } +}) + +export function createAnimation(option, _this) { + if(!_this) return + clearTimeout(_this.timer) + return new MPAnimation(option, _this) +} diff --git a/uni_modules/uni-transition/components/uni-transition/uni-transition.vue b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue new file mode 100644 index 0000000..bfbba93 --- /dev/null +++ b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue @@ -0,0 +1,286 @@ + + + + + diff --git a/uni_modules/uni-transition/package.json b/uni_modules/uni-transition/package.json new file mode 100644 index 0000000..ea995a2 --- /dev/null +++ b/uni_modules/uni-transition/package.json @@ -0,0 +1,84 @@ +{ + "id": "uni-transition", + "displayName": "uni-transition 过渡动画", + "version": "1.3.2", + "description": "元素的简单过渡动画", + "keywords": [ + "uni-ui", + "uniui", + "动画", + "过渡", + "过渡动画" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-transition/readme.md b/uni_modules/uni-transition/readme.md new file mode 100644 index 0000000..2f8a77e --- /dev/null +++ b/uni_modules/uni-transition/readme.md @@ -0,0 +1,11 @@ + + +## Transition 过渡动画 +> **组件名:uni-transition** +> 代码块: `uTransition` + + +元素过渡动画 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file