1234567891011121314151617181920212223242526272829303132333435 |
- import event from '~/mixins/event'
- import {
- createStoreBindings
- } from 'mobx-miniprogram-bindings'
- import {
- store
- } from '~/store/index'
- Page({
- behaviors: [event],
- data: {
- userInfo: {},
- },
- async onLoad() {
- // 手工绑定
- this.storeBindings = createStoreBindings(this, {
- store,
- fields: {
- userInfo: 'userInfo',
- }
- })
- },
- clipboar({
- currentTarget
- }) {
- wx.setClipboardData({
- data: currentTarget.dataset.value,
- success: function (res) { //成功回调函数
- wx.showToast({
- title: '复制成功',
- icon: "success"
- })
- }
- })
- },
- })
|