|
|
@@ -5,17 +5,13 @@
|
|
|
<view class="module-com user-info">
|
|
|
<view class="user-info_top">
|
|
|
<view class="user-info_lf">
|
|
|
- <AppAvatarModule class="avatar" :src="userInfo.avatar" :width="100"></AppAvatarModule>
|
|
|
+ <image :src="userInfo.avatar" style="width:110upx;height:110upx;position:absolute;border-radius:10upx;"></image>
|
|
|
<view class="dec-bx">
|
|
|
<view>
|
|
|
- <text>{{userInfo.name}}</text>
|
|
|
- <text v-if="userInfo.level == 0" class="level-common">{{userInfo.levelName}}会员</text>
|
|
|
- <text v-else-if="userInfo.level == 1"></text>
|
|
|
- <text v-else class="level">{{userInfo.levelName}}会员</text>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- No.{{userInfo.sn}}
|
|
|
+ <text style="font-weight:bold;">{{userInfo.name}}</text> <text @click="changeNameFn()" style="color:#3385ff;margin-left:30upx;font-size:28upx;">修改</text>
|
|
|
</view>
|
|
|
+ <view>{{userInfo.originName}}</view>
|
|
|
+ <view>ID {{userInfo.sn}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -44,16 +40,16 @@
|
|
|
<view class="address-des_bx">
|
|
|
<view>
|
|
|
<view>
|
|
|
- {{userInfo.name}} {{userInfo.mobile}}
|
|
|
+ {{userInfo.name}}
|
|
|
</view>
|
|
|
- <view style="margin-bottom:20upx;color:#333333">{{userInfo.superInfo.name||''}}</view>
|
|
|
+ <view style="margin-bottom:20upx;color:#333333">{{userInfo.superInfo.name||''}} {{userInfo.mobile}}</view>
|
|
|
<view>
|
|
|
{{userInfo.address}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view>
|
|
|
<i @click="callUp" class="iconfont icondianhua1"></i>
|
|
|
- <i @click.stop="navigate(userInfo.lat,userInfo.long,userInfo.customName)" class="iconfont icondianhua" style="font-size:47upx;margin-left:60upx;margin-right:18upx;color:#3385ff;"></i>
|
|
|
+ <i @click.stop="navigate(userInfo.lat,userInfo.long,userInfo.customName)" class="iconfont icondianhua" style="font-size:48upx;margin-left:60upx;margin-right:18upx;color:#3385ff;"></i>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -111,20 +107,31 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</templete>
|
|
|
+
|
|
|
+ <modal-module :show="changeShow" @click="confirmChange" :maskClosable="true" title="修改名称" padding="30rpx 30rpx" >
|
|
|
+ <template v-slot:content>
|
|
|
+ <div class="app-modal-input-wrap">
|
|
|
+ <div class="inp-list-line">
|
|
|
+ <div class="line-input">
|
|
|
+ <input type="number" ref="input" style="width:61.8%;text-align:center;" :focus="changeFocus" v-model="customName" :adjust-position="false" class="inp-input" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { mapGetters } from "vuex";
|
|
|
-import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
import TuiListCell from '@/components/plugin/list-cell'
|
|
|
import { share } from "@/mixins";
|
|
|
+import ModalModule from "@/components/plugin/modal"
|
|
|
import { getUserDet,debt} from "@/api/member";
|
|
|
-import { updateDebtLimit,updateCustomBlack,changeDiscount} from "@/api/custom";
|
|
|
+import { updateDebtLimit,updateCustomBlack,changeDiscount,changeName} from "@/api/custom";
|
|
|
export default {
|
|
|
- name: "member-detail",
|
|
|
+ name: "detail",
|
|
|
components: {
|
|
|
- AppAvatarModule,
|
|
|
- TuiListCell
|
|
|
+ TuiListCell,ModalModule
|
|
|
},
|
|
|
mixins: [share],
|
|
|
props: {},
|
|
|
@@ -167,12 +174,45 @@ export default {
|
|
|
this.$msg("开发中")
|
|
|
}
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ customName:'',
|
|
|
+ changeShow:false,
|
|
|
+ changeFocus:false
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
|
onLoad() {},
|
|
|
methods: {
|
|
|
+ changeNameFn(){
|
|
|
+ this.customName = this.userInfo.name
|
|
|
+ this.changeShow = true
|
|
|
+ setTimeout(x => {
|
|
|
+ this.$nextTick(() => this.setFocus());
|
|
|
+ }, 200);
|
|
|
+ },
|
|
|
+ setFocus() {
|
|
|
+ this.changeFocus = true
|
|
|
+ },
|
|
|
+ confirmChange(val) {
|
|
|
+ let that=this;
|
|
|
+ if (val.index == 0) {
|
|
|
+ that.changeShow = false
|
|
|
+ that.changeFocus = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.$util.isEmpty(this.customName)){
|
|
|
+ this.$msg('请填写名称')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ changeName({name:this.customName,id:this.userInfo.id}).then(res=>{
|
|
|
+ that.changeShow = false
|
|
|
+ that.changeFocus = false
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg(res.msg)
|
|
|
+ that.getUserDetail()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
createOrder(){
|
|
|
this.$util.pageTo({url: '/admin/billing/index',type:2,query: {customId: this.userInfo.id,customName:this.userInfo.name}})
|
|
|
},
|
|
|
@@ -188,12 +228,9 @@ export default {
|
|
|
latitude: latituded,
|
|
|
longitude: longituded,
|
|
|
address: address,
|
|
|
- success: function() {
|
|
|
- console.log('success');
|
|
|
- }
|
|
|
+ success: function() { }
|
|
|
});
|
|
|
},
|
|
|
- //修改欠款额度
|
|
|
amendMoney(){
|
|
|
updateDebtLimit({ id: this.option.id,debtLimit:this.debtLimit }).then(res => {
|
|
|
uni.showToast({title:'修改成功',icon: "none"});
|
|
|
@@ -242,7 +279,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
init() {
|
|
|
- this.getUserDetail();
|
|
|
+ this.getUserDetail()
|
|
|
},
|
|
|
getUserDetail() {
|
|
|
getUserDet({ id: this.option.id }).then(res => {
|
|
|
@@ -299,7 +336,11 @@ export default {
|
|
|
}
|
|
|
& > view:nth-child(2) {
|
|
|
color: #666666;
|
|
|
- font-size: 30upx;
|
|
|
+ font-size:28upx;
|
|
|
+ }
|
|
|
+ & > view:nth-child(3) {
|
|
|
+ color: #666666;
|
|
|
+ font-size:25upx;
|
|
|
}
|
|
|
.level{
|
|
|
margin-left:30upx;
|