123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- const app = getApp()
- Page({
- data: {
- selectedTag: '',
- showCustomInput: false,
- customTagLength: 0,
- customTagName: '',
- tzd: '/static_file/jcsfcjtzd.jpg',
- showPreview: false
- },
- selectTag(e) {
- const tag = e.currentTarget.dataset.tag;
- this.setData({
- selectedTag: tag,
- showCustomInput: tag === '自定义'
- });
- },
- onCustomInput(e) {
- const value = e.detail.value;
- this.setData({
- customTagName: value,
- customTagLength: value.length
- });
- },
- // 显示抽屉
- showDrawer() {
- this.setData({
- showDrawer: true
- });
- },
- // 隐藏抽屉
- hideDrawer() {
- this.setData({
- showDrawer: false
- });
- },
- // 拨打电话
- makePhoneCall() {
- wx.makePhoneCall({
- phoneNumber: '17630145126'
- });
- },
- // 修改预览图片方法
- previewImage: function() {
- this.setData({
- showPreview: true
- });
- },
- // 关闭预览
- closePreview: function() {
- this.setData({
- showPreview: false
- });
- },
- // 防止点击图片内容时关闭预览
- preventBubble: function() {
- return;
- }
- });
|