1234567891011121314151617181920212223242526272829303132333435 |
- import { VueLikePage } from '../../../utils/page'
- import UserApi from '../../../apis/user'
- import Router from '../../../utils/routes'
- VueLikePage([], {
- data: {
-
- },
- methods: {
- onLoad (options) {
- this.detail = {}
- this.viewerId = options.id
- this.getUserInfoById()
- },
- getUserInfoById () {
- UserApi.getVisitCardDetail(this.viewerId).then(res => {
- this.detail = res.data
- this.setData({
- detail: res.data
- })
- })
- },
- bindinput (e) {
- const { key } = e.currentTarget.dataset
- this.detail[key] = e.detail.value
- },
- updateVisitCard () {
- return UserApi.updateVisitCard(this.detail).then(res => {
- wx.showToast({
- title: '修改成功',
- })
- })
- }
- }
- })
|