|
@@ -50,9 +50,29 @@
|
|
|
<view class="module-com apply-card">
|
|
<view class="module-com apply-card">
|
|
|
<tui-list-cell class="line-cell code-wrap name-wrap" :hover="false">
|
|
<tui-list-cell class="line-cell code-wrap name-wrap" :hover="false">
|
|
|
<view class="tui-title required">姓名</view>
|
|
<view class="tui-title required">姓名</view>
|
|
|
- <input v-model="form.adminName" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input tui-input--code" name="adminName" placeholder="请填写姓名" />
|
|
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
- <button class="apply-code-btn apply-fill-btn" @click="fillWxName">帮我填</button>
|
|
|
|
|
|
|
+ <input
|
|
|
|
|
+ v-model="form.adminName"
|
|
|
|
|
+ type="nickname"
|
|
|
|
|
+ placeholder-class="phcolor"
|
|
|
|
|
+ placeholder-style="color:#CCCCCC"
|
|
|
|
|
+ class="tui-input"
|
|
|
|
|
+ name="adminName"
|
|
|
|
|
+ placeholder="请填写姓名"
|
|
|
|
|
+ @blur="onNameBlur"
|
|
|
|
|
+ @input="onNameInput"
|
|
|
|
|
+ />
|
|
|
|
|
+ <!-- #endif -->
|
|
|
|
|
+ <!-- #ifndef MP-WEIXIN -->
|
|
|
|
|
+ <input
|
|
|
|
|
+ v-model="form.adminName"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ placeholder-class="phcolor"
|
|
|
|
|
+ placeholder-style="color:#CCCCCC"
|
|
|
|
|
+ class="tui-input"
|
|
|
|
|
+ name="adminName"
|
|
|
|
|
+ placeholder="请填写姓名"
|
|
|
|
|
+ />
|
|
|
<!-- #endif -->
|
|
<!-- #endif -->
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell code-wrap mobile-wrap" :hover="false">
|
|
<tui-list-cell class="line-cell code-wrap mobile-wrap" :hover="false">
|
|
@@ -143,7 +163,7 @@ import { getShopInfo} from "@/utils/auth";
|
|
|
import { getDictionaries } from '@/api/mini'
|
|
import { getDictionaries } from '@/api/mini'
|
|
|
import { checkShop } from '@/api/shop'
|
|
import { checkShop } from '@/api/shop'
|
|
|
import { ghsInfo } from "@/api/ghs/index";
|
|
import { ghsInfo } from "@/api/ghs/index";
|
|
|
-import { getMobile, getNickname } from "@/api/auth";
|
|
|
|
|
|
|
+import { getMobile } from "@/api/auth";
|
|
|
import { getHasMap } from "@/api/express"
|
|
import { getHasMap } from "@/api/express"
|
|
|
import { mapNearby } from '@/api/map/index'
|
|
import { mapNearby } from '@/api/map/index'
|
|
|
import { iconSrc } from '@/utils/iconSrc'
|
|
import { iconSrc } from '@/utils/iconSrc'
|
|
@@ -399,32 +419,15 @@ export default {
|
|
|
this.hasGet = false
|
|
this.hasGet = false
|
|
|
this.count = 120
|
|
this.count = 120
|
|
|
},
|
|
},
|
|
|
- fillWxName() {
|
|
|
|
|
- let currentMiniOpenId = uni.getStorageSync('currentMiniOpenId')
|
|
|
|
|
- if (this.$util.isEmpty(currentMiniOpenId)) {
|
|
|
|
|
- this.$msg('获取失败,请重新打开小程序')
|
|
|
|
|
- return false
|
|
|
|
|
|
|
+ onNameBlur(e) {
|
|
|
|
|
+ if (e.detail && typeof e.detail.value === 'string') {
|
|
|
|
|
+ this.form.adminName = e.detail.value.trim()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ onNameInput(e) {
|
|
|
|
|
+ if (e.detail && typeof e.detail.value === 'string') {
|
|
|
|
|
+ this.form.adminName = e.detail.value.trim()
|
|
|
}
|
|
}
|
|
|
- uni.getUserProfile({
|
|
|
|
|
- desc: '获取微信昵称',
|
|
|
|
|
- success: (res) => {
|
|
|
|
|
- getNickname({
|
|
|
|
|
- iv: res.iv,
|
|
|
|
|
- encryptedData: res.encryptedData,
|
|
|
|
|
- miniOpenId: currentMiniOpenId
|
|
|
|
|
- }).then(subRes => {
|
|
|
|
|
- const name = (subRes.data && (subRes.data.name || subRes.data.nickName)) || ''
|
|
|
|
|
- if (name) {
|
|
|
|
|
- this.form.adminName = name
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$msg('没获取到微信昵称')
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- fail: () => {
|
|
|
|
|
- this.$msg('获取失败')
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
},
|
|
},
|
|
|
getSj(e){
|
|
getSj(e){
|
|
|
let that = this
|
|
let that = this
|