Browse Source

会员等级图标

shish 6 years ago
parent
commit
3b9ae6503f

+ 11 - 9
mall/src/pages/goods/detail.vue

@@ -39,18 +39,23 @@
         </div>
       </div>
     </div>
-    <!-- 商品简介 -->
     <!-- 商品详情 -->
+
     <div class="module-wrap shop-detail">
       <div class="module-tit app-size-30">商品详情</div>
       <div class="module-det">
         <!-- <app-img :src="imgNormal" alt mode="widthFix" /> -->
         <div class="module-det-text">
-<rich-text :nodes="data.content"></rich-text>
+          <template v-if="$util.isEmpty(data.content) == false">
+            <rich-text :nodes="data.content"></rich-text>
+          </template>
+          <template v-else>
+            <rich-text :nodes="data.briefContent"></rich-text>
+          </template>
         </div>
       </div>
     </div>
-    <!-- 商品详情 -->
+
     <!-- 简要说明 -->
     <div class="module-wrap shop-desc">
       <div class="module-tit app-size-30">简要说明</div>
@@ -115,11 +120,9 @@ export default {
     };
   },
   onLoad(option) {},
-  mounted() {
-   
-  },
+  mounted() {},
   computed: {
-   ...mapGetters({ shopUser: "getShopUser" })
+    ...mapGetters({ shopUser: "getShopUser" })
   },
   methods: {
     init() {
@@ -150,8 +153,7 @@ export default {
         this.jweixinFn(shareParams);
       });
 
-      getShopUser(true)
-
+      getShopUser(true);
     },
     async _getDetail() {
       await getDetail({ id: this.option.id }).then(res => {

+ 594 - 517
mall/src/pages/member/detail.vue

@@ -1,527 +1,604 @@
 <template>
-	<div class="app-content">
-		<!-- 客户信息 -->
-		<div class="module-com user-info">
-			<div class="user-wrap">
-				<app-avatar-module :src="data.avatarUrl" />
-				<div class="user-top-right">
-					<div>
-						<div class="flex-center">
-							<span class="app-size-32">{{ data.userName }}</span>
-							<app-vip-module class="level-img" v-if="data.isMember == 1" :text="`VIP${data.userAsset.memberLevel}`" />
-						</div>
-						<div class="app-color-3">{{ data.id }}</div>
-					</div>
-					<div class="source-wrap">
-						<i v-if="data.source == 0" class="iconfont iconweixinlaiyuan"></i>
-						<i v-if="data.source == 1" class="iconfont iconzhifubao"></i>
-						<i class="iconfont iconweixingongzhonghao" :class="[data.subscribe? 'app-color-4' : '']"></i>
-						<i v-if="data.mobile" class="iconfont iconshoujihao1"></i>
-					</div>
-				</div>
-			</div>
-			<div class="user-bottom">
-				<div class="data-list" v-for="(item, index) in fundsData" :key="index">
-					<div class="app-size-30 app-bold">{{ item.value }}</div>
-					<div class="app-color-3">{{ item.name }}</div>
-				</div>
-			</div>
-		</div>
-		<!-- 客户按钮 -->
-		<div class="module-com tabs-wrap">
-			<div class="tabs-list" v-for="(item, index) in tabsData" :key="index" @click="pageTo(item)">
-				<div class="tabs-img">
-					<img :src="item.img" alt mode="widthFix" />
-				</div>
-				<div class="tabs-name">{{ item.name }}</div>
-			</div>
-		</div>
-		<!-- 备注 -->
-		<div class="module-com remark-wrap" v-if="!$util.isEmpty(data.remarkList)">
-			<div class="app-blod">备注</div>
-			<div class="list-wrap">
-				<div class="list-line" v-for="(item, index) in data.remarkList" :key="index">
-					<div>{{ item.remark }}</div>
-					<div @click="delRemarkFn(item)">
-						<i class="iconfont icondelete"></i>
-					</div>
-				</div>
-			</div>
-		</div>
-		<!-- 消费记录 -->
-		<div class="module-com remark-wrap" v-if="!$util.isEmpty(data.orderList)">
-			<div class="app-blod">消费记录</div>
-			<div class="list-wrap">
-				<block v-for="(item, index) in data.orderList" :key="index">
-					<div class="list-line" v-if="index < 3 || orderMoreStatus">
-						<div class="flex-center">
-							<div class="time">{{ item.createTime }}</div>
-							<div>{{ item.orderName }}</div>
-						</div>
-						<div class="price">¥{{ item.actPrice }}</div>
-					</div>
-				</block>
-			</div>
-			<div class="more-text" v-if="!orderMoreStatus" @click="orderMoreFn">更多 ></div>
-		</div>
-		<!-- 充值弹窗 -->
-		<modal-module :show="rechargeModal" @cancel="modalCancel" @click="rechargeModalClick" :maskClosable="false" title="充值" padding="30rpx 30rpx">
-			<template v-slot:content>
-				<div class="app-modal-input-wrap">
-					<div class="inp-list-line">
-						<div class="line-label">充值金额</div>
-						<div class="line-input">
-							<input type="text" v-model="rechargeForm.rechargeAmount" :adjust-position="false" class="inp-input" />
-							<div class="inp-prompt">元</div>
-						</div>
-					</div>
-					<div class="inp-list-line">
-						<div class="line-label">确认密码</div>
-						<div class="line-input">
-							<input type="text" v-model="rechargeForm.confirmPassword" :adjust-position="false" class="inp-input" />
-						</div>
-					</div>
-				</div>
-			</template>
-		</modal-module>
-		<!-- 修改密码弹窗 -->
-		<modal-module :show="passwordModal" @cancel="modalCancel" @click="passwordModalClick" :maskClosable="false" title="重置密码" padding="30rpx 30rpx">
-			<template v-slot:content>
-				<div class="app-modal-input-wrap">
-					<div class="inp-list-line">
-						<div class="line-label">重置密码</div>
-						<div class="line-input">
-							<input type="text" v-model="passwordForm.password" :adjust-position="false" class="inp-input" />
-						</div>
-					</div>
-				</div>
-			</template>
-		</modal-module>
-		<!-- 升级 -->
-		<modal-module :show="upgradeModal" @cancel="modalCancel" @click="upgradeModalClick" :maskClosable="false" title="升级" padding="30rpx 30rpx">
-			<template v-slot:content>
-				<div class="app-modal-input-wrap">
-					<div class="inp-list-line">
-						<div class="line-label">请选择等级</div>
-						<div class="line-input">
-							<picker mode="selector" :value="upgradeForm.memberLevel" :range="levelData.list" range-key="level" @change="changeLevelFn" class="inp-select">
-								<div v-if="upgradeForm.memberLevel">{{ levelSelData.level }}</div>
-								<div class="tui-placeholder" v-else>请选择</div>
-							</picker>
-						</div>
-					</div>
-					<div class="inp-list-line">
-						<div class="line-label">确认密码</div>
-						<div class="line-input">
-							<input type="text" v-model="upgradeForm.confirmPassword" class="inp-input" />
-						</div>
-					</div>
-				</div>
-			</template>
-		</modal-module>
-		<!-- 添加备注 -->
-		<modal-module :show="remarkModal" @cancel="modalCancel" @click="remarkModalClick" :maskClosable="false" title="添加备注" padding="30rpx 30rpx">
-			<template v-slot:content>
-				<div class="app-modal-input-wrap">
-					<div class="inp-list-line">
-						<textarea v-model="remarkForm.remark" placeholder-style="phcolor" placeholder="请填写备注内容,如客户喜好,消费情况等" />
-					</div>
-				</div>
-			</template>
-		</modal-module>
-		<!-- 删除备注弹窗 -->
-		<modal-module :show="promptRemarkModal" @cancel="modalCancel" @click="promptModalClick" :content="promptModalText" color="#333" :size="32" padding="30rpx 30rpx"></modal-module>
-	</div>
+  <div class="app-content">
+    <!-- 客户信息 -->
+    <div class="module-com user-info">
+      <div class="user-wrap">
+        <app-avatar-module :src="data.avatarUrl" />
+        <div class="user-top-right">
+          <div>
+            <div class="flex-center">
+              <span class="app-size-32">{{ data.userName }}</span>
+              <app-vip-module
+                class="level-img"
+                v-if="data.member >= 0"
+                :text="`VIP${data.userAsset.member}`"
+                :vipImgUrl="`${constant.imgUrl}/retail/interest/vip.png`"
+              />
+            </div>
+            <div class="app-color-3">{{ data.id }}</div>
+          </div>
+          <div class="source-wrap">
+            <i v-if="data.source == 0" class="iconfont iconweixinlaiyuan"></i>
+            <i v-if="data.source == 1" class="iconfont iconzhifubao"></i>
+            <i
+              class="iconfont iconweixingongzhonghao"
+              :class="[data.subscribe? 'app-color-4' : '']"
+            ></i>
+            <i v-if="data.mobile" class="iconfont iconshoujihao1"></i>
+          </div>
+        </div>
+      </div>
+      <div class="user-bottom">
+        <div class="data-list" v-for="(item, index) in fundsData" :key="index">
+          <div class="app-size-30 app-bold">{{ item.value }}</div>
+          <div class="app-color-3">{{ item.name }}</div>
+        </div>
+      </div>
+    </div>
+    <!-- 客户按钮 -->
+    <div class="module-com tabs-wrap">
+      <div class="tabs-list" v-for="(item, index) in tabsData" :key="index" @click="pageTo(item)">
+        <div class="tabs-img">
+          <img :src="item.img" alt mode="widthFix" />
+        </div>
+        <div class="tabs-name">{{ item.name }}</div>
+      </div>
+    </div>
+    <!-- 备注 -->
+    <div class="module-com remark-wrap" v-if="!$util.isEmpty(data.remarkList)">
+      <div class="app-blod">备注</div>
+      <div class="list-wrap">
+        <div class="list-line" v-for="(item, index) in data.remarkList" :key="index">
+          <div>{{ item.remark }}</div>
+          <div @click="delRemarkFn(item)">
+            <i class="iconfont icondelete"></i>
+          </div>
+        </div>
+      </div>
+    </div>
+    <!-- 消费记录 -->
+    <div class="module-com remark-wrap" v-if="!$util.isEmpty(data.orderList)">
+      <div class="app-blod">消费记录</div>
+      <div class="list-wrap">
+        <block v-for="(item, index) in data.orderList" :key="index">
+          <div class="list-line" v-if="index < 3 || orderMoreStatus">
+            <div class="flex-center">
+              <div class="time">{{ item.createTime }}</div>
+              <div>{{ item.orderName }}</div>
+            </div>
+            <div class="price">¥{{ item.actPrice }}</div>
+          </div>
+        </block>
+      </div>
+      <div class="more-text" v-if="!orderMoreStatus" @click="orderMoreFn">更多 ></div>
+    </div>
+    <!-- 充值弹窗 -->
+    <modal-module
+      :show="rechargeModal"
+      @cancel="modalCancel"
+      @click="rechargeModalClick"
+      :maskClosable="false"
+      title="充值"
+      padding="30rpx 30rpx"
+    >
+      <template v-slot:content>
+        <div class="app-modal-input-wrap">
+          <div class="inp-list-line">
+            <div class="line-label">充值金额</div>
+            <div class="line-input">
+              <input
+                type="text"
+                v-model="rechargeForm.rechargeAmount"
+                :adjust-position="false"
+                class="inp-input"
+              />
+              <div class="inp-prompt">元</div>
+            </div>
+          </div>
+          <div class="inp-list-line">
+            <div class="line-label">确认密码</div>
+            <div class="line-input">
+              <input
+                type="text"
+                v-model="rechargeForm.confirmPassword"
+                :adjust-position="false"
+                class="inp-input"
+              />
+            </div>
+          </div>
+        </div>
+      </template>
+    </modal-module>
+    <!-- 修改密码弹窗 -->
+    <modal-module
+      :show="passwordModal"
+      @cancel="modalCancel"
+      @click="passwordModalClick"
+      :maskClosable="false"
+      title="重置密码"
+      padding="30rpx 30rpx"
+    >
+      <template v-slot:content>
+        <div class="app-modal-input-wrap">
+          <div class="inp-list-line">
+            <div class="line-label">重置密码</div>
+            <div class="line-input">
+              <input
+                type="text"
+                v-model="passwordForm.password"
+                :adjust-position="false"
+                class="inp-input"
+              />
+            </div>
+          </div>
+        </div>
+      </template>
+    </modal-module>
+    <!-- 升级 -->
+    <modal-module
+      :show="upgradeModal"
+      @cancel="modalCancel"
+      @click="upgradeModalClick"
+      :maskClosable="false"
+      title="升级"
+      padding="30rpx 30rpx"
+    >
+      <template v-slot:content>
+        <div class="app-modal-input-wrap">
+          <div class="inp-list-line">
+            <div class="line-label">请选择等级</div>
+            <div class="line-input">
+              <picker
+                mode="selector"
+                :value="upgradeForm.memberLevel"
+                :range="levelData.list"
+                range-key="level"
+                @change="changeLevelFn"
+                class="inp-select"
+              >
+                <div v-if="upgradeForm.memberLevel">{{ levelSelData.level }}</div>
+                <div class="tui-placeholder" v-else>请选择</div>
+              </picker>
+            </div>
+          </div>
+          <div class="inp-list-line">
+            <div class="line-label">确认密码</div>
+            <div class="line-input">
+              <input type="text" v-model="upgradeForm.confirmPassword" class="inp-input" />
+            </div>
+          </div>
+        </div>
+      </template>
+    </modal-module>
+    <!-- 添加备注 -->
+    <modal-module
+      :show="remarkModal"
+      @cancel="modalCancel"
+      @click="remarkModalClick"
+      :maskClosable="false"
+      title="添加备注"
+      padding="30rpx 30rpx"
+    >
+      <template v-slot:content>
+        <div class="app-modal-input-wrap">
+          <div class="inp-list-line">
+            <textarea
+              v-model="remarkForm.remark"
+              placeholder-style="phcolor"
+              placeholder="请填写备注内容,如客户喜好,消费情况等"
+            />
+          </div>
+        </div>
+      </template>
+    </modal-module>
+    <!-- 删除备注弹窗 -->
+    <modal-module
+      :show="promptRemarkModal"
+      @cancel="modalCancel"
+      @click="promptModalClick"
+      :content="promptModalText"
+      color="#333"
+      :size="32"
+      padding="30rpx 30rpx"
+    ></modal-module>
+  </div>
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import AppVipModule from '@/components/module/app-vip'
-import AppAvatarModule from '@/components/module/app-avatar'
-import ModalModule from '@/components/plugin/modal'
+import { mapGetters } from "vuex";
+import AppVipModule from "@/components/module/app-vip";
+import AppAvatarModule from "@/components/module/app-avatar";
+import ModalModule from "@/components/plugin/modal";
 // api
-import { getLevel } from '@/utils/config'
-import { getUserDet, remarkAdd, remarkDel, upgrade, rechargeB, resetPassword } from '@/api/member'
+import { getLevel } from "@/utils/config";
+import {
+  getUserDet,
+  remarkAdd,
+  remarkDel,
+  upgrade,
+  rechargeB,
+  resetPassword
+} from "@/api/member";
 export default {
-	name: 'member-detail',
-	components: {
-		AppVipModule,
-		AppAvatarModule,
-		ModalModule
-	},
-	props: {},
-	data() {
-		return {
-			constant: this.$constant,
-			// data
-			data: {},
-			// modal
-			rechargeModal: false,
-			passwordModal: false,
-			upgradeModal: false,
-			remarkModal: false,
-			// 用户资金情况
-			fundsData: [
-				{
-					name: '消费次数',
-					value: 0
-				},
-				{
-					name: '累计消费(¥)',
-					value: 0
-				},
-				{
-					name: '成长值',
-					value: 0
-				},
-				{
-					name: '余额',
-					value: 0
-				}
-			],
-			// tab按钮
-			tabsData: [
-				{
-					name: '优惠券',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
-					funtion: () => {
-						this.$msg('功能开发中...')
-					}
-				},
-				{
-					name: '邀请有礼',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-2.png`,
-					funtion: () => {
-						this.$msg('功能开发中...')
-					}
-				},
-				{
-					name: '消费登记',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-3.png`,
-					funtion: () => {
-						this.$msg('功能开发中...')
-					}
-				},
-				{
-					name: '备注',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-4.png`,
-					funtion: () => {
-						this.remarkModal = true
-					}
-				},
-				{
-					name: '充值',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-5.png`,
-					funtion: () => {
-						this.rechargeModal = true
-					}
-				},
-				{
-					name: '重置密码',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-6.png`,
-					funtion: () => {
-						this.passwordModal = true
-					}
-				},
-				{
-					name: '升级',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-7.png`,
-					funtion: () => {
-						this.upgradeModal = true
-					}
-				},
-				{
-					name: '发消息',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-8.png`,
-					url: '/pages/chat/index'
-				}
-			],
-			// 重置密码
-			passwordForm: {
-				password: ''
-			},
-			// 充值
-			rechargeForm: {
-				rechargeAmount: 0,
-				confirmPassword: ''
-			},
-			// 升级
-			levelSelData: {},
-			upgradeForm: {
-				memberLevel: '',
-				confirmPassword: ''
-			},
-			// 备注
-			remarkForm: {
-				remark: ''
-			},
-			remarkOperateData: {},
-			// 订单
-			orderMoreStatus: false,
-			// 确认操作提示
-			promptRemarkModal: false,
-			promptModalText: '是否要删除该备注?'
-		}
-	},
-	computed: {
-		...mapGetters({ levelData: 'getLevel' })
-	},
-	onLoad() {
-		// this.init()
-	},
-	methods: {
-		init() {
-			this._getUserDet()
-			getLevel()
-		},
-		// api
-		_getUserDet() {
-			getUserDet({ userId: this.option.id }).then(res => {
-				if (this.$util.isEmpty(res.data)) return false
-				this.data = res.data
-				this.fundsData[0].value = res.data.userAsset.totalBuyNum
-				this.fundsData[1].value = res.data.userAsset.totalExpend
-				this.fundsData[2].value = res.data.userAsset.growth
-				this.fundsData[3].value = res.data.userAsset.balance
-			})
-		},
-		_rechargeB() {
-			rechargeB({
-				userId: this.data.id,
-				...this.rechargeForm
-			}).then(res => {
-				this.$msg('充值成功!')
-				this.modalCancel()
-			})
-		},
-		_upgrade() {
-			upgrade({
-				userId: this.data.id,
-				...this.upgradeForm
-			}).then(res => {
-				this.$msg('升级成功!')
-				this.modalCancel()
-			})
-		},
-		_resetPassword() {
-			resetPassword({
-				userId: this.data.id,
-				...this.passwordForm
-			}).then(res => {
-				this.$msg('重置成功!')
-				this.modalCancel()
-			})
-		},
-		_remarkAdd() {
-			remarkAdd({
-				userId: this.data.id,
-				...this.remarkForm
-			}).then(res => {
-				this.$msg('添加成功!')
-				this.modalCancel()
-				this._getUserDet()
-			})
-		},
-		_delRemark() {
-			remarkDel({ id: this.remarkOperateData.id }).then(res => {
-				this.$msg('删除成功!')
-				this.modalCancel()
-				this._getUserDet()
-			})
-		},
-		// operate ===========================
-		orderMoreFn() {
-			this.orderMoreStatus = false
-		},
-		delRemarkFn(item) {
-			this.remarkOperateData = item
-			this.promptModalText = '是否要删除该备注?'
-			this.promptRemarkModal = true
-		},
-		// 弹窗按钮
-		changeLevelFn(e) {
-			this.levelSelData = this.levelData.list[e.detail.value]
-			this.upgradeForm.memberLevel = this.levelSelData.level
-		},
-		passwordModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				this.modalCancel()
-				this.promptModalText = '确认重置密码?'
-				this.promptRemarkModal = true
-			}
-		},
-		upgradeModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				this.modalCancel()
-				this.promptModalText = '确认升级?'
-				this.promptRemarkModal = true
-			}
-		},
-		rechargeModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				this.modalCancel()
-				this.promptModalText = '确认充值?'
-				this.promptRemarkModal = true
-			}
-		},
-		remarkModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				this._remarkAdd()
-			}
-		},
-		promptModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				if (this.promptModalText == '是否要删除该备注?') {
-					this._delRemark()
-				}
-				if (this.promptModalText == '确认升级?') {
-					this._upgrade()
-				}
-				if (this.promptModalText == '确认充值?') {
-					this._rechargeB()
-				}
-				if (this.promptModalText == '确认重置密码?') {
-					this._resetPassword()
-				}
-			}
-		},
-		modalCancel() {
-			this.rechargeModal = false
-			this.passwordModal = false
-			this.upgradeModal = false
-			this.remarkModal = false
-			this.promptRemarkModal = false
-		}
-	}
-}
+  name: "member-detail",
+  components: {
+    AppVipModule,
+    AppAvatarModule,
+    ModalModule
+  },
+  props: {},
+  data() {
+    return {
+      constant: this.$constant,
+      // data
+      data: {},
+      // modal
+      rechargeModal: false,
+      passwordModal: false,
+      upgradeModal: false,
+      remarkModal: false,
+      // 用户资金情况
+      fundsData: [
+        {
+          name: "消费次数",
+          value: 0
+        },
+        {
+          name: "累计消费(¥)",
+          value: 0
+        },
+        {
+          name: "成长值",
+          value: 0
+        },
+        {
+          name: "余额",
+          value: 0
+        }
+      ],
+      // tab按钮
+      tabsData: [
+        {
+          name: "优惠券",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
+          funtion: () => {
+            this.$msg("功能开发中...");
+          }
+        },
+        {
+          name: "邀请有礼",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-2.png`,
+          funtion: () => {
+            this.$msg("功能开发中...");
+          }
+        },
+        {
+          name: "消费登记",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-3.png`,
+          funtion: () => {
+            this.$msg("功能开发中...");
+          }
+        },
+        {
+          name: "备注",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-4.png`,
+          funtion: () => {
+            this.remarkModal = true;
+          }
+        },
+        {
+          name: "充值",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-5.png`,
+          funtion: () => {
+            this.rechargeModal = true;
+          }
+        },
+        {
+          name: "重置密码",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-6.png`,
+          funtion: () => {
+            this.passwordModal = true;
+          }
+        },
+        {
+          name: "升级",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-7.png`,
+          funtion: () => {
+            this.upgradeModal = true;
+          }
+        },
+        {
+          name: "发消息",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-8.png`,
+          url: "/pages/chat/index"
+        }
+      ],
+      // 重置密码
+      passwordForm: {
+        password: ""
+      },
+      // 充值
+      rechargeForm: {
+        rechargeAmount: 0,
+        confirmPassword: ""
+      },
+      // 升级
+      levelSelData: {},
+      upgradeForm: {
+        memberLevel: "",
+        confirmPassword: ""
+      },
+      // 备注
+      remarkForm: {
+        remark: ""
+      },
+      remarkOperateData: {},
+      // 订单
+      orderMoreStatus: false,
+      // 确认操作提示
+      promptRemarkModal: false,
+      promptModalText: "是否要删除该备注?"
+    };
+  },
+  computed: {
+    ...mapGetters({ levelData: "getLevel" })
+  },
+  onLoad() {
+    // this.init()
+  },
+  methods: {
+    init() {
+      this._getUserDet();
+      getLevel();
+    },
+    // api
+    _getUserDet() {
+      getUserDet({ userId: this.option.id }).then(res => {
+        if (this.$util.isEmpty(res.data)) return false;
+        this.data = res.data;
+        this.fundsData[0].value = res.data.userAsset.totalBuyNum;
+        this.fundsData[1].value = res.data.userAsset.totalExpend;
+        this.fundsData[2].value = res.data.userAsset.growth;
+        this.fundsData[3].value = res.data.userAsset.balance;
+      });
+    },
+    _rechargeB() {
+      rechargeB({
+        userId: this.data.id,
+        ...this.rechargeForm
+      }).then(res => {
+        this.$msg("充值成功!");
+        this.modalCancel();
+      });
+    },
+    _upgrade() {
+      upgrade({
+        userId: this.data.id,
+        ...this.upgradeForm
+      }).then(res => {
+        this.$msg("升级成功!");
+        this.modalCancel();
+      });
+    },
+    _resetPassword() {
+      resetPassword({
+        userId: this.data.id,
+        ...this.passwordForm
+      }).then(res => {
+        this.$msg("重置成功!");
+        this.modalCancel();
+      });
+    },
+    _remarkAdd() {
+      remarkAdd({
+        userId: this.data.id,
+        ...this.remarkForm
+      }).then(res => {
+        this.$msg("添加成功!");
+        this.modalCancel();
+        this._getUserDet();
+      });
+    },
+    _delRemark() {
+      remarkDel({ id: this.remarkOperateData.id }).then(res => {
+        this.$msg("删除成功!");
+        this.modalCancel();
+        this._getUserDet();
+      });
+    },
+    // operate ===========================
+    orderMoreFn() {
+      this.orderMoreStatus = false;
+    },
+    delRemarkFn(item) {
+      this.remarkOperateData = item;
+      this.promptModalText = "是否要删除该备注?";
+      this.promptRemarkModal = true;
+    },
+    // 弹窗按钮
+    changeLevelFn(e) {
+      this.levelSelData = this.levelData.list[e.detail.value];
+      this.upgradeForm.memberLevel = this.levelSelData.level;
+    },
+    passwordModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+        this.modalCancel();
+        this.promptModalText = "确认重置密码?";
+        this.promptRemarkModal = true;
+      }
+    },
+    upgradeModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+        this.modalCancel();
+        this.promptModalText = "确认升级?";
+        this.promptRemarkModal = true;
+      }
+    },
+    rechargeModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+        this.modalCancel();
+        this.promptModalText = "确认充值?";
+        this.promptRemarkModal = true;
+      }
+    },
+    remarkModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+        this._remarkAdd();
+      }
+    },
+    promptModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+        if (this.promptModalText == "是否要删除该备注?") {
+          this._delRemark();
+        }
+        if (this.promptModalText == "确认升级?") {
+          this._upgrade();
+        }
+        if (this.promptModalText == "确认充值?") {
+          this._rechargeB();
+        }
+        if (this.promptModalText == "确认重置密码?") {
+          this._resetPassword();
+        }
+      }
+    },
+    modalCancel() {
+      this.rechargeModal = false;
+      this.passwordModal = false;
+      this.upgradeModal = false;
+      this.remarkModal = false;
+      this.promptRemarkModal = false;
+    }
+  }
+};
 </script>
 
 <style lang='scss' scoped>
-	.app-content {
-		background-image: url('../../static/images/member/bg.png');
-		background-size: 100% 330px;
-		background-repeat: no-repeat;
-		padding-top: 30px;
-		padding-bottom: 30px;
-	}
-	// 公共
-	.module-com {
-		margin: 0 30px 20px;
-		padding: 20px;
-		background-color: #fff;
-		box-shadow: 0px 6px 16px #ddd;
-		border-radius: 10px;
-	}
-	// 用户信息
-	.user-info {
-		padding: 40px 30px 50px;
-		.user-wrap {
-			@include disFlex(center, space-between);
-			margin-bottom: 60px;
-			.user-top-right {
-				@include disFlex(flex-start, space-between);
-				width: calc(100% - 120px);
-				.flex-center {
-					margin-bottom: 14px;
-					.level-img {
-						margin-left: 10px;
-						width: 80px;
-						/deep/.vip-text {
-							top: -2px;
-							left: 26px;
-							font-weight: 400;
-							transform: scale(0.7);
-						}
-					}
-				}
-				.source-wrap {
-					.iconfont {
-						margin-left: 10px;
-					}
-					.iconweixinlaiyuan {
-						color: #35b801;
-					}
-					.iconzhifubao {
-						color: #00aaed;
-					}
-					.iconshoujihao1 {
-						color: #fc2e47;
-					}
-				}
-			}
-		}
-		.user-bottom {
-			width: 100%;
-			@include disFlex(center, space-between);
-			.data-list {
-				text-align: center;
-				.app-size-30 {
-					margin-bottom: 14px;
-				}
-			}
-		}
-	}
-	// tabs
-	.tabs-wrap {
-		padding: 40px 10px;
-		@include disFlex(center, center);
-		flex-wrap: wrap;
-		.tabs-list {
-			width: 25%;
-			margin-bottom: 50px;
-			text-align: center;
-			.tabs-img {
-				width: 50px;
-				height: 50px;
-				margin: 0 auto 14px;
-				img {
-					height: 100%;
-				}
-			}
-			.tabs-name {
-				color: $fontColor2;
-			}
-			&:nth-child(n + 5) {
-				margin-bottom: 0;
-			}
-		}
-	}
-	// 备注
-	.remark-wrap {
-		.list-wrap {
-			margin-top: 24px;
-			.list-line {
-				@include disFlex(center, space-between);
-				margin-top: 10px;
-				padding: 16px 20px;
-				background-color: #f7f7f8;
-				color: $fontColor2;
-				border-radius: 4px;
-				.iconfont {
-					color: $fontColor3;
-				}
-				.time {
-					margin-right: 70px;
-				}
-				.price {
-					color: #333;
-				}
-			}
-		}
-		.more-text {
-			margin-top: 24px;
-			text-align: center;
-			color: $fontColor3;
-		}
-	}
+.app-content {
+  background-image: url("../../static/images/member/bg.png");
+  background-size: 100% 330px;
+  background-repeat: no-repeat;
+  padding-top: 30px;
+  padding-bottom: 30px;
+}
+// 公共
+.module-com {
+  margin: 0 30px 20px;
+  padding: 20px;
+  background-color: #fff;
+  box-shadow: 0px 6px 16px #ddd;
+  border-radius: 10px;
+}
+// 用户信息
+.user-info {
+  padding: 40px 30px 50px;
+  .user-wrap {
+    @include disFlex(center, space-between);
+    margin-bottom: 60px;
+    .user-top-right {
+      @include disFlex(flex-start, space-between);
+      width: calc(100% - 120px);
+      .flex-center {
+        margin-bottom: 14px;
+        .level-img {
+          margin-left: 10px;
+          width: 80px;
+          /deep/.vip-text {
+            top: -2px;
+            left: 26px;
+            font-weight: 400;
+            transform: scale(0.7);
+          }
+        }
+      }
+      .source-wrap {
+        .iconfont {
+          margin-left: 10px;
+        }
+        .iconweixinlaiyuan {
+          color: #35b801;
+        }
+        .iconzhifubao {
+          color: #00aaed;
+        }
+        .iconshoujihao1 {
+          color: #fc2e47;
+        }
+      }
+    }
+  }
+  .user-bottom {
+    width: 100%;
+    @include disFlex(center, space-between);
+    .data-list {
+      text-align: center;
+      .app-size-30 {
+        margin-bottom: 14px;
+      }
+    }
+  }
+}
+// tabs
+.tabs-wrap {
+  padding: 40px 10px;
+  @include disFlex(center, center);
+  flex-wrap: wrap;
+  .tabs-list {
+    width: 25%;
+    margin-bottom: 50px;
+    text-align: center;
+    .tabs-img {
+      width: 50px;
+      height: 50px;
+      margin: 0 auto 14px;
+      img {
+        height: 100%;
+      }
+    }
+    .tabs-name {
+      color: $fontColor2;
+    }
+    &:nth-child(n + 5) {
+      margin-bottom: 0;
+    }
+  }
+}
+// 备注
+.remark-wrap {
+  .list-wrap {
+    margin-top: 24px;
+    .list-line {
+      @include disFlex(center, space-between);
+      margin-top: 10px;
+      padding: 16px 20px;
+      background-color: #f7f7f8;
+      color: $fontColor2;
+      border-radius: 4px;
+      .iconfont {
+        color: $fontColor3;
+      }
+      .time {
+        margin-right: 70px;
+      }
+      .price {
+        color: #333;
+      }
+    }
+  }
+  .more-text {
+    margin-top: 24px;
+    text-align: center;
+    color: $fontColor3;
+  }
+}
 </style>

+ 0 - 2
shop/src/views/goods/goods-add.vue

@@ -57,7 +57,6 @@
 				</el-form-item>
 				<el-form-item label="图片" prop="shopImg">
 					<div class="list-wrap">
-						<!--<cl-upload v-model="ruleForm.shopImg"  :props="{multiple:true}"></cl-upload>-->
 						<elxUpload
 							:limit="4"
 							:fileList.sync="fileList_show"
@@ -75,7 +74,6 @@
 				</el-form-item>
 				<el-form-item label="简介" prop="content">
 					<cl-editor-quill v-model="ruleForm.content" @load="editor"></cl-editor-quill>
-					<!-- <el-input type="textarea" v-model="ruleForm.desc"></el-input> -->
 				</el-form-item>
 				<el-form-item label="自动涨价 ">
 					<el-checkbox-group v-model="ruleForm.autoRise">

+ 298 - 253
store/src/admin/goodsManage/add.vue

@@ -1,268 +1,313 @@
 <template>
-	<div class="app-content">
-		<!-- 商品基本信息 -->
-		<form @submit="formSubmit">
-			<div class="module-com input-line-wrap">
-				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title required">名称</div>
-					<input v-model="form.goodsName" placeholder-class="phcolor" class="tui-input" name="goodsName" placeholder="请输入" maxlength="50" type="text" />
-				</tui-list-cell>
-				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">已售</div>
-					<input v-model="form.sold" placeholder-class="phcolor" class="tui-input" name="sold" placeholder="请输入" maxlength="50" type="number" />
-				</tui-list-cell>
-				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">库存</div>
-					<input v-model="form.stock" placeholder-class="phcolor" class="tui-input" name="stock" placeholder="请输入" maxlength="50" type="number" />
-				</tui-list-cell>
-				<tui-list-cell class="line-cell category-wrap" :hover="false">
-					<div class="tui-title">类型</div>
-					<div class="tui-input">
-						<block v-for="(item, index) in categoryData" :key="index">
-							<button class="admin-button-com" :class="[form.categoryIdList.includes(item.id) ? '' : 'default']" @click="selCategoryFn(item)">{{ item.categoryName || '暂无' }}</button>
-						</block>
-					</div>
-				</tui-list-cell>
-				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title required">价格</div>
-					<input v-model="form.price" placeholder-class="phcolor" class="tui-input" name="price" placeholder="请输入" maxlength="50" type="number" />
-					<div class="tui-prompt">元</div>
-				</tui-list-cell>
-				<!-- <tui-list-cell class="line-cell" :arrow="true">
+  <div class="app-content">
+    <!-- 商品基本信息 -->
+    <form @submit="formSubmit">
+      <div class="module-com input-line-wrap">
+        <tui-list-cell class="line-cell" :hover="false">
+          <div class="tui-title required">名称</div>
+          <input
+            v-model="form.goodsName"
+            placeholder-class="phcolor"
+            class="tui-input"
+            name="goodsName"
+            placeholder="请输入"
+            maxlength="50"
+            type="text"
+          />
+        </tui-list-cell>
+        <tui-list-cell class="line-cell" :hover="false">
+          <div class="tui-title">已售</div>
+          <input
+            v-model="form.sold"
+            placeholder-class="phcolor"
+            class="tui-input"
+            name="sold"
+            placeholder="请输入"
+            maxlength="50"
+            type="number"
+          />
+        </tui-list-cell>
+        <tui-list-cell class="line-cell" :hover="false">
+          <div class="tui-title">库存</div>
+          <input
+            v-model="form.stock"
+            placeholder-class="phcolor"
+            class="tui-input"
+            name="stock"
+            placeholder="请输入"
+            maxlength="50"
+            type="number"
+          />
+        </tui-list-cell>
+        <tui-list-cell class="line-cell category-wrap" :hover="false">
+          <div class="tui-title">类型</div>
+          <div class="tui-input">
+            <block v-for="(item, index) in categoryData" :key="index">
+              <button
+                class="admin-button-com"
+                :class="[form.categoryIdList.includes(item.id) ? '' : 'default']"
+                @click="selCategoryFn(item)"
+              >{{ item.categoryName || '暂无' }}</button>
+            </block>
+          </div>
+        </tui-list-cell>
+        <tui-list-cell class="line-cell" :hover="false">
+          <div class="tui-title required">价格</div>
+          <input
+            v-model="form.price"
+            placeholder-class="phcolor"
+            class="tui-input"
+            name="price"
+            placeholder="请输入"
+            maxlength="50"
+            type="number"
+          />
+          <div class="tui-prompt">元</div>
+        </tui-list-cell>
+        <!-- <tui-list-cell class="line-cell" :arrow="true">
 					<div class="tui-title">分类</div>
 					<div v-if="form.receiveFullAddress" class="tui-input">{{ form.receiveFullAddress }}</div>
 					<div v-else class="tui-placeholder">请选择</div>
-				</tui-list-cell>-->
-				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">自动涨价</div>
-					<label for="autoPrice" class="tui-input" @click="autoRiseChange(form.autoRise)">
-						<checkbox id="autoPrice" class="ljd-checkbox" :checked="form.autoRise == 1"></checkbox>
-						<span>需要</span>
-					</label>
-				</tui-list-cell>
-				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">配送方式</div>
-					<label for="autoPrice" class="tui-input" @click="needSendChange(form.needSend)">
-						<checkbox id="autoPrice" class="ljd-checkbox" :checked="form.needSend == 1" @change="giftChange"></checkbox>
-						<span>到店自提</span>
-					</label>
-				</tui-list-cell>
-				<tui-list-cell class="line-cell" :hover="false">
-					<div class="tui-title">运费</div>
-					<radio-group class="tui-input flex-center-between" @change="freightChange">
-						<label class="list" for="customLink">
-							<radio id="customLink" value="0" :checked="form.freightType == 0" />
-							<span class="checkbox-text">按距离收费</span>
-						</label>
-						<label class="list" for="goodsLink">
-							<radio id="goodsLink" value="1" :checked="form.freightType == 1" />
-							<span class="checkbox-text">免运费</span>
-						</label>
-					</radio-group>
-				</tui-list-cell>
-			</div>
-			<!-- 商品图片 -->
-			<div class="module-com input-line-wrap goods-wrap">
-				<div class="module-tit">
-					<span>商品图片</span>
-					<span class="app-color-3">(最多上传4张)</span>
-				</div>
-				<div class="module-det">
-					<app-uploader ref="appUploader" :imgList.sync="form.shopImg" :isMain="true" :num="4" />
-				</div>
-			</div>
-			<!-- 商品简介 -->
-			<div class="module-com input-line-wrap summary-wrap">
-				<div class="module-tit">商品简介</div>
-				<div class="module-det" style="padding-bottom: 10px">
-					<!-- <span class="app-price">商品简介请在电脑端进行修改</span> -->
-					<textarea v-model="form.briefContent" class="goods-summary" placeholder-class="phcolor" placeholder="请输入商品简介" />
-				</div>
-			</div>
-			<!-- button -->
-			<div class="app-footer">
-				<button class="admin-button-com middle default" formType="submit" @click="status = 1">上架</button>
-				<button class="admin-button-com middle blue" formType="submit" @click="status = 0">加入仓库</button>
-			</div>
-		</form>
-	</div>
+        </tui-list-cell>-->
+        <tui-list-cell class="line-cell" :hover="false">
+          <div class="tui-title">自动涨价</div>
+          <label for="autoPrice" class="tui-input" @click="autoRiseChange(form.autoRise)">
+            <checkbox id="autoPrice" class="ljd-checkbox" :checked="form.autoRise == 1"></checkbox>
+            <span>需要</span>
+          </label>
+        </tui-list-cell>
+        <tui-list-cell class="line-cell" :hover="false">
+          <div class="tui-title">配送方式</div>
+          <label for="autoPrice" class="tui-input" @click="needSendChange(form.needSend)">
+            <checkbox
+              id="autoPrice"
+              class="ljd-checkbox"
+              :checked="form.needSend == 1"
+              @change="giftChange"
+            ></checkbox>
+            <span>到店自提</span>
+          </label>
+        </tui-list-cell>
+        <tui-list-cell class="line-cell" :hover="false">
+          <div class="tui-title">运费</div>
+          <radio-group class="tui-input flex-center-between" @change="freightChange">
+            <label class="list" for="customLink">
+              <radio id="customLink" value="0" :checked="form.freightType == 0" />
+              <span class="checkbox-text">按距离收费</span>
+            </label>
+            <label class="list" for="goodsLink">
+              <radio id="goodsLink" value="1" :checked="form.freightType == 1" />
+              <span class="checkbox-text">免运费</span>
+            </label>
+          </radio-group>
+        </tui-list-cell>
+      </div>
+      <!-- 商品图片 -->
+      <div class="module-com input-line-wrap goods-wrap">
+        <div class="module-tit">
+          <span>商品图片</span>
+          <span class="app-color-3">(最多上传4张)</span>
+        </div>
+        <div class="module-det">
+          <app-uploader ref="appUploader" :imgList.sync="form.shopImg" :isMain="true" :num="4" />
+        </div>
+      </div>
+      <!-- 商品简介 -->
+      <div class="module-com input-line-wrap summary-wrap">
+        <div class="module-tit">商品简介</div>
+        <div class="module-det" style="padding-bottom: 10px">
+          <textarea
+            v-model="form.briefContent"
+            class="goods-summary"
+            placeholder-class="phcolor"
+            placeholder="请输入商品简介"
+          />
+        </div>
+      </div>
+      <!-- button -->
+      <div class="app-footer">
+        <button class="admin-button-com middle default" formType="submit" @click="status = 0">加入仓库</button>
+        <button class="admin-button-com middle blue" formType="submit" @click="status = 1">上架</button>
+      </div>
+    </form>
+  </div>
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import TuiListCell from '@/components/plugin/list-cell'
-import AppUploader from '@/components/app-uploader'
-const form = require('@/utils/formValidation.js')
+import { mapGetters } from "vuex";
+import TuiListCell from "@/components/plugin/list-cell";
+import AppUploader from "@/components/app-uploader";
+const form = require("@/utils/formValidation.js");
 // api
-import { getCategory } from '@/utils/config'
-import { getDetailB, addB, updateB } from '@/api/goods'
+import { getCategory } from "@/utils/config";
+import { getDetailB, addB, updateB } from "@/api/goods";
 export default {
-	name: 'goods-add',
-	components: {
-		TuiListCell,
-		AppUploader
-	},
-	data() {
-		return {
-			// 上架状态
-			status: 1,
-			form: {
-				goodsName: '',
-				stock: '',
-				price: '',
-				categoryIdList: [],
-				// goodsStyle: '1',
-				// content: '',
-				autoRise: '1',
-				needSend: '0',
-				freightType: '0',
-				shopImg: []
-				// goodsStyleList: [],
-			}
-		}
-	},
-	computed: {
-		...mapGetters({ categoryData: 'getCategory' })
-	},
-	onLoad() {
-		// this.init()
-	},
-	methods: {
-		init() {
-			getCategory().then(() => {
-				if (this.option.id) {
-					this._getDet()
-				}
-			})
-		},
-		_getDet() {
-			return getDetailB({ id: this.option.id }).then(res => {
-				if (this.$util.isEmpty(res.data)) return
-				Object.keys(this.form).forEach((i, index) => {
-					this.form[i] = res.data[i]
-				})
-			})
-		},
-		// 确认
-		confirmFn() {
+  name: "goods-add",
+  components: {
+    TuiListCell,
+    AppUploader
+  },
+  data() {
+    return {
+      // 上架状态
+      status: 1,
+      form: {
+        goodsName: "",
+        stock: "",
+        price: "",
+        categoryIdList: [],
+        // goodsStyle: '1',
+        // content: '',
+        autoRise: "1",
+        needSend: "0",
+        freightType: "0",
+		shopImg: [],
+		briefContent:""
+        // goodsStyleList: [],
+      }
+    };
+  },
+  computed: {
+    ...mapGetters({ categoryData: "getCategory" })
+  },
+  onLoad() {
+    // this.init()
+  },
+  methods: {
+    init() {
+      getCategory().then(() => {
+        if (this.option.id) {
+          this._getDet();
+        }
+      });
+    },
+    _getDet() {
+      return getDetailB({ id: this.option.id }).then(res => {
+        if (this.$util.isEmpty(res.data)) return;
+        Object.keys(this.form).forEach((i, index) => {
+          this.form[i] = res.data[i];
+        });
+      });
+    },
+    // 确认
+    confirmFn() {
+      if (this.form.categoryIdList == 0) {
+        this.$msg("请选择分类");
+        return false;
+      }
 
-			if(this.form.categoryIdList == 0){
-				this.$msg('请选择分类')
-				return false
-			}
+      if (this.form.shopImg.length == 0) {
+        this.$msg("请上传图片");
+        return false;
+      }
 
-			if(this.form.shopImg.length == 0){
-				this.$msg('请上传图片')
-				return false
-			}
-
-			let host = this.option.id ? updateB : addB
-			let form = JSON.parse(JSON.stringify(this.form))
-			form.shopImg = this.$util.imgSubstr(form.shopImg)
-			host({
-				status: this.status,
-				...form
-			}).then(res => {
-				this.$msg('操作成功!')
-			})
-		},
-		// operate
-		selCategoryFn(item) {
-			let index = this.form.categoryIdList.findIndex(e => e == item.id)
-			if (index == -1) {
-				this.form.categoryIdList.push(item.id)
-			} else {
-				this.form.categoryIdList.splice(index, 1)
-			}
-			console.log(this.form.categoryIdList)
-		},
-		autoRiseChange(e) {
-			this.form.autoRise = e == '0' ? '1' : '0'
-		},
-		needSendChange(e) {
-			this.form.needSend = e == '0' ? '1' : '0'
-		},
-		freightChange(e) {
-			this.form.freightType = e.detail.value
-		},
-		// 表单验证
-		formSubmit(e) {
-			// 表单规则
-			let rules = [
-				{
-					name: 'goodsName',
-					rule: ['required'],
-					msg: ['请输入商品名']
-				},
-				{
-					name: 'price',
-					rule: ['required'],
-					msg: ['请输入价格']
-				}
-			]
-			// 进行表单检查
-			let formData = e.detail.value
-			let checkRes = form.validation(formData, rules)
-			// 验证通过!
-			if (!checkRes) {
-				setTimeout(() => {
-					this.confirmFn()
-				})
-			} else {
-				this.$msg(checkRes)
-			}
-		}
-	}
-}
+      let host = this.option.id ? updateB : addB;
+      let form = JSON.parse(JSON.stringify(this.form));
+      form.shopImg = this.$util.imgSubstr(form.shopImg);
+      host({
+        status: this.status,
+        ...form
+      }).then(res => {
+        this.$msg("操作成功!");
+      });
+    },
+    // operate
+    selCategoryFn(item) {
+      let index = this.form.categoryIdList.findIndex(e => e == item.id);
+      if (index == -1) {
+        this.form.categoryIdList.push(item.id);
+      } else {
+        this.form.categoryIdList.splice(index, 1);
+      }
+      console.log(this.form.categoryIdList);
+    },
+    autoRiseChange(e) {
+      this.form.autoRise = e == "0" ? "1" : "0";
+    },
+    needSendChange(e) {
+      this.form.needSend = e == "0" ? "1" : "0";
+    },
+    freightChange(e) {
+      this.form.freightType = e.detail.value;
+    },
+    // 表单验证
+    formSubmit(e) {
+      // 表单规则
+      let rules = [
+        {
+          name: "goodsName",
+          rule: ["required"],
+          msg: ["请输入商品名"]
+        },
+        {
+          name: "price",
+          rule: ["required"],
+          msg: ["请输入价格"]
+        }
+      ];
+      // 进行表单检查
+      let formData = e.detail.value;
+      let checkRes = form.validation(formData, rules);
+      // 验证通过!
+      if (!checkRes) {
+        setTimeout(() => {
+          this.confirmFn();
+        });
+      } else {
+        this.$msg(checkRes);
+      }
+    }
+  }
+};
 </script>
 
 <style lang="scss" scoped>
-	.app-content {
-		min-height: calc(100vh - 100px);
-		padding-bottom: 100px;
-	}
-	// 公共模块
-	.module-com {
-		margin-bottom: 20px;
-		background-color: #fff;
-		color: $fontColor2;
-		.module-tit {
-			padding: 20px 30px;
-			font-size: 28px;
-			// font-weight: 600;
-			// border-bottom: 1px solid $borderColor;
-		}
-		.module-det {
-			padding: 0 30px;
-		}
-	}
-	.category-wrap {
-		align-items: flex-start;
-		padding-bottom: 0 !important;
-		.tui-input {
-			@include disFlex(center, flex-start);
-			flex-wrap: wrap;
-			.admin-button-com {
-				// width: 104px;
-				margin-right: 20px;
-				margin-bottom: 20px;
-				// &:nth-child(4n + 1) {
-				// 	margin-left: 0;
-				// }
-			}
-		}
-	}
-	.summary-wrap {
-		.goods-summary {
-			height: 400px;
-			// font-size: 24px;
-		}
-	}
-	// button
-	.app-footer {
-		justify-content: space-evenly;
-		.admin-button-com {
-			width: 46%;
-		}
-	}
+.app-content {
+  min-height: calc(100vh - 100px);
+  padding-bottom: 100px;
+}
+// 公共模块
+.module-com {
+  margin-bottom: 20px;
+  background-color: #fff;
+  color: $fontColor2;
+  .module-tit {
+    padding: 20px 30px;
+    font-size: 28px;
+    // font-weight: 600;
+    // border-bottom: 1px solid $borderColor;
+  }
+  .module-det {
+    padding: 0 30px;
+  }
+}
+.category-wrap {
+  align-items: flex-start;
+  padding-bottom: 0 !important;
+  .tui-input {
+    @include disFlex(center, flex-start);
+    flex-wrap: wrap;
+    .admin-button-com {
+      // width: 104px;
+      margin-right: 20px;
+      margin-bottom: 20px;
+      // &:nth-child(4n + 1) {
+      // 	margin-left: 0;
+      // }
+    }
+  }
+}
+.summary-wrap {
+  .goods-summary {
+    height: 400px;
+    // font-size: 24px;
+  }
+}
+// button
+.app-footer {
+  justify-content: space-evenly;
+  .admin-button-com {
+    width: 46%;
+  }
+}
 </style>

+ 597 - 519
store/src/admin/member/detail.vue

@@ -1,530 +1,608 @@
 <template>
-	<div class="app-content">
-		<!-- 客户信息 -->
-		<div class="module-com user-info">
-			<div class="user-wrap">
-				<app-avatar-module :src="data.avatarUrl" />
-				<div class="user-top-right">
-					<div>
-						<div class="flex-center">
-							<span class="app-size-32">{{ data.userName }}</span>
-							<app-vip-module class="level-img" v-if="data.member && data.member != 0" :text="`VIP${data.member}`" />
-						</div>
-						<div class="app-color-3">{{ data.id }}</div>
-					</div>
-					<div class="source-wrap">
-						<i v-if="data.source == 0" class="iconfont iconweixinlaiyuan"></i>
-						<i v-if="data.source == 1" class="iconfont iconzhifubao"></i>
-						<i class="iconfont iconweixingongzhonghao" :class="[data.subscribe? 'app-color-4' : '']"></i>
-						<i v-if="data.mobile" class="iconfont iconshoujihao1"></i>
-					</div>
-				</div>
-			</div>
-			<div class="user-bottom">
-				<div class="data-list" v-for="(item, index) in fundsData" :key="index">
-					<div class="app-size-30 app-bold">{{ item.value }}</div>
-					<div class="app-color-3">{{ item.name }}</div>
-				</div>
-			</div>
-		</div>
-		<!-- 客户按钮 -->
-		<div class="module-com tabs-wrap">
-			<div class="tabs-list" v-for="(item, index) in tabsData" :key="index" @click="pageTo(item)">
-				<div class="tabs-img">
-					<img :src="item.img" alt mode="widthFix" />
-				</div>
-				<div class="tabs-name">{{ item.name }}</div>
-			</div>
-		</div>
-		<!-- 备注 -->
-		<div class="module-com remark-wrap" v-if="!$util.isEmpty(data.remarkList)">
-			<div class="app-blod">客户备注</div>
-			<div class="list-wrap">
-				<div class="list-line" v-for="(item, index) in data.remarkList" :key="index">
-					<div>{{ item.remark }}</div>
-					<div @click="delRemarkFn(item)">
-						<i class="iconfont icondelete"></i>
-					</div>
-				</div>
-			</div>
-		</div>
-		<!-- 消费记录 -->
-		<div class="module-com remark-wrap" v-if="!$util.isEmpty(data.orderList)">
-			<div class="app-blod">最近消费</div>
-			<div class="list-wrap">
-				<block v-for="(item, index) in data.orderList" :key="index">
-					<div class="list-line" v-if="index < 3 || orderMoreStatus">
-						<div class="flex-center">
-							<div class="time">{{ item.createTime }}</div>
-							<div>{{ item.orderName }}</div>
-						</div>
-						<div class="price">¥{{ item.actPrice }}</div>
-					</div>
-				</block>
-			</div>
-			<!-- <div class="more-text" v-if="!orderMoreStatus" @click="orderMoreFn">更多 ></div> -->
-		</div>
-		<!-- 充值弹窗 -->
-		<modal-module :show="rechargeModal" @cancel="modalCancel" @click="rechargeModalClick" :maskClosable="false" title="充值" padding="30rpx 30rpx">
-			<template v-slot:content>
-				<div class="app-modal-input-wrap">
-					<div class="inp-list-line">
-						<div class="line-label">充值金额</div>
-						<div class="line-input">
-							<input type="text" placeholder="请输入金额(元)" v-model="rechargeForm.rechargeAmount" :adjust-position="false" class="inp-input" />
-						</div>
-					</div>
-					<div class="inp-list-line">
-						<div class="line-label">确认密码</div>
-						<div class="line-input">
-							<input type="password" v-model="rechargeForm.confirmPassword" :adjust-position="false" class="inp-input" />
-						</div>
-					</div>
-				</div>
-			</template>
-		</modal-module>
-		<!-- 修改密码弹窗 -->
-		<modal-module :show="passwordModal" @cancel="modalCancel" @click="passwordModalClick" :maskClosable="false" title="重置密码" padding="30rpx 30rpx">
-			<template v-slot:content>
-				<div class="app-modal-input-wrap">
-					<div class="inp-list-line">
-						<div class="line-label">密码</div>
-						<div class="line-input">
-							<input type="password" v-model="passwordForm.password" :adjust-position="false" class="inp-input" />
-						</div>
-					</div>
-				</div>
-			</template>
-		</modal-module>
-		<!-- 升级 -->
-		<modal-module :show="upgradeModal" @cancel="modalCancel" @click="upgradeModalClick" :maskClosable="false" title="升级" padding="30rpx 30rpx">
-			<template v-slot:content>
-				<div class="app-modal-input-wrap">
-					<div class="inp-list-line">
-						<div class="line-label">会员等级</div>
-						<div class="line-input">
-							<picker mode="selector" :value="upgradeForm.member" :range="levelData.list" range-key="level" @change="changeLevelFn" class="inp-select">
-								<div v-if="upgradeForm.member">{{ levelSelData.level }}</div>
-								<div class="tui-placeholder" v-else>请选择</div>
-							</picker>
-						</div>
-					</div>
-					<div class="inp-list-line">
-						<div class="line-label">确认密码</div>
-						<div class="line-input">
-							<input type="text" v-model="upgradeForm.confirmPassword" class="inp-input" />
-						</div>
-					</div>
-				</div>
-			</template>
-		</modal-module>
-		<!-- 添加备注 -->
-		<modal-module :show="remarkModal" @cancel="modalCancel" @click="remarkModalClick" :maskClosable="false" title="添加客户备注" padding="30rpx 30rpx">
-			<template v-slot:content>
-				<div class="app-modal-input-wrap">
-					<div class="inp-list-line">
-						<textarea v-model="remarkForm.remark" placeholder-style="phcolor" placeholder="请填写客户信息备注内容,如客户喜好、居住地址等" />
-					</div>
-				</div>
-			</template>
-		</modal-module>
-		<!-- 删除备注弹窗 -->
-		<modal-module :show="promptRemarkModal" @cancel="modalCancel" @click="promptModalClick" :content="promptModalText" color="#333" :size="32" padding="30rpx 30rpx"></modal-module>
-	</div>
+  <div class="app-content">
+    <!-- 客户信息 -->
+    <div class="module-com user-info">
+      <div class="user-wrap">
+        <app-avatar-module :src="data.avatarUrl" />
+        <div class="user-top-right">
+          <div>
+            <div class="flex-center">
+              <span class="app-size-32">{{ data.userName }}</span>
+              <app-vip-module
+                class="level-img"
+                v-if="data.member >= 0"
+                :text="`VIP${data.member}`"
+                :vipImg="`${constant.imgUrl}/retail/interest/vip.png`"
+              />
+            </div>
+            <div class="app-color-3">{{ data.id }}</div>
+          </div>
+          <div class="source-wrap">
+            <i v-if="data.source == 0" class="iconfont iconweixinlaiyuan"></i>
+            <i v-if="data.source == 1" class="iconfont iconzhifubao"></i>
+            <i
+              class="iconfont iconweixingongzhonghao"
+              :class="[data.subscribe? 'app-color-4' : '']"
+            ></i>
+            <i v-if="data.mobile" class="iconfont iconshoujihao1"></i>
+          </div>
+        </div>
+      </div>
+      <div class="user-bottom">
+        <div class="data-list" v-for="(item, index) in fundsData" :key="index">
+          <div class="app-size-30 app-bold">{{ item.value }}</div>
+          <div class="app-color-3">{{ item.name }}</div>
+        </div>
+      </div>
+    </div>
+    <!-- 客户按钮 -->
+    <div class="module-com tabs-wrap">
+      <div class="tabs-list" v-for="(item, index) in tabsData" :key="index" @click="pageTo(item)">
+        <div class="tabs-img">
+          <img :src="item.img" alt mode="widthFix" />
+        </div>
+        <div class="tabs-name">{{ item.name }}</div>
+      </div>
+    </div>
+    <!-- 备注 -->
+    <div class="module-com remark-wrap" v-if="!$util.isEmpty(data.remarkList)">
+      <div class="app-blod">客户备注</div>
+      <div class="list-wrap">
+        <div class="list-line" v-for="(item, index) in data.remarkList" :key="index">
+          <div>{{ item.remark }}</div>
+          <div @click="delRemarkFn(item)">
+            <i class="iconfont icondelete"></i>
+          </div>
+        </div>
+      </div>
+    </div>
+    <!-- 消费记录 -->
+    <div class="module-com remark-wrap" v-if="!$util.isEmpty(data.orderList)">
+      <div class="app-blod">最近消费</div>
+      <div class="list-wrap">
+        <block v-for="(item, index) in data.orderList" :key="index">
+          <div class="list-line" v-if="index < 3 || orderMoreStatus">
+            <div class="flex-center">
+              <div class="time">{{ item.createTime }}</div>
+              <div>{{ item.orderName }}</div>
+            </div>
+            <div class="price">¥{{ item.actPrice }}</div>
+          </div>
+        </block>
+      </div>
+      <!-- <div class="more-text" v-if="!orderMoreStatus" @click="orderMoreFn">更多 ></div> -->
+    </div>
+    <!-- 充值弹窗 -->
+    <modal-module
+      :show="rechargeModal"
+      @cancel="modalCancel"
+      @click="rechargeModalClick"
+      :maskClosable="false"
+      title="充值"
+      padding="30rpx 30rpx"
+    >
+      <template v-slot:content>
+        <div class="app-modal-input-wrap">
+          <div class="inp-list-line">
+            <div class="line-label">充值金额</div>
+            <div class="line-input">
+              <input
+                type="text"
+                placeholder="请输入金额(元)"
+                v-model="rechargeForm.rechargeAmount"
+                :adjust-position="false"
+                class="inp-input"
+              />
+            </div>
+          </div>
+          <div class="inp-list-line">
+            <div class="line-label">确认密码</div>
+            <div class="line-input">
+              <input
+                type="password"
+                v-model="rechargeForm.confirmPassword"
+                :adjust-position="false"
+                class="inp-input"
+              />
+            </div>
+          </div>
+        </div>
+      </template>
+    </modal-module>
+    <!-- 修改密码弹窗 -->
+    <modal-module
+      :show="passwordModal"
+      @cancel="modalCancel"
+      @click="passwordModalClick"
+      :maskClosable="false"
+      title="重置密码"
+      padding="30rpx 30rpx"
+    >
+      <template v-slot:content>
+        <div class="app-modal-input-wrap">
+          <div class="inp-list-line">
+            <div class="line-label">密码</div>
+            <div class="line-input">
+              <input
+                type="password"
+                v-model="passwordForm.password"
+                :adjust-position="false"
+                class="inp-input"
+              />
+            </div>
+          </div>
+        </div>
+      </template>
+    </modal-module>
+    <!-- 升级 -->
+    <modal-module
+      :show="upgradeModal"
+      @cancel="modalCancel"
+      @click="upgradeModalClick"
+      :maskClosable="false"
+      title="升级"
+      padding="30rpx 30rpx"
+    >
+      <template v-slot:content>
+        <div class="app-modal-input-wrap">
+          <div class="inp-list-line">
+            <div class="line-label">会员等级</div>
+            <div class="line-input">
+              <picker
+                mode="selector"
+                :value="upgradeForm.member"
+                :range="levelData.list"
+                range-key="level"
+                @change="changeLevelFn"
+                class="inp-select"
+              >
+                <div v-if="upgradeForm.member">{{ levelSelData.level }}</div>
+                <div class="tui-placeholder" v-else>请选择</div>
+              </picker>
+            </div>
+          </div>
+          <div class="inp-list-line">
+            <div class="line-label">确认密码</div>
+            <div class="line-input">
+              <input type="text" v-model="upgradeForm.confirmPassword" class="inp-input" />
+            </div>
+          </div>
+        </div>
+      </template>
+    </modal-module>
+    <!-- 添加备注 -->
+    <modal-module
+      :show="remarkModal"
+      @cancel="modalCancel"
+      @click="remarkModalClick"
+      :maskClosable="false"
+      title="添加客户备注"
+      padding="30rpx 30rpx"
+    >
+      <template v-slot:content>
+        <div class="app-modal-input-wrap">
+          <div class="inp-list-line">
+            <textarea
+              v-model="remarkForm.remark"
+              placeholder-style="phcolor"
+              placeholder="请填写客户信息备注内容,如客户喜好、居住地址等"
+            />
+          </div>
+        </div>
+      </template>
+    </modal-module>
+    <!-- 删除备注弹窗 -->
+    <modal-module
+      :show="promptRemarkModal"
+      @cancel="modalCancel"
+      @click="promptModalClick"
+      :content="promptModalText"
+      color="#333"
+      :size="32"
+      padding="30rpx 30rpx"
+    ></modal-module>
+  </div>
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import AppVipModule from '@/components/module/app-vip'
-import AppAvatarModule from '@/components/module/app-avatar'
-import ModalModule from '@/components/plugin/modal'
+import { mapGetters } from "vuex";
+import AppVipModule from "@/components/module/app-vip";
+import AppAvatarModule from "@/components/module/app-avatar";
+import ModalModule from "@/components/plugin/modal";
 // api
-import { getLevel } from '@/utils/config'
-import { getUserDet, remarkAdd, remarkDel, upgrade, rechargeB, resetPassword } from '@/api/member'
+import { getLevel } from "@/utils/config";
+import {
+  getUserDet,
+  remarkAdd,
+  remarkDel,
+  upgrade,
+  rechargeB,
+  resetPassword
+} from "@/api/member";
 export default {
-	name: 'member-detail',
-	components: {
-		AppVipModule,
-		AppAvatarModule,
-		ModalModule
-	},
-	props: {},
-	data() {
-		return {
-			constant: this.$constant,
-			// data
-			data: {},
-			// modal
-			rechargeModal: false,
-			passwordModal: false,
-			upgradeModal: false,
-			remarkModal: false,
-			// 用户资金情况
-			fundsData: [
-				{
-					name: '消费次数',
-					value: 0
-				},
-				{
-					name: '累计消费(¥)',
-					value: 0
-				},
-				{
-					name: '成长值',
-					value: 0
-				},
-				{
-					name: '余额',
-					value: 0
-				}
-			],
-			// tab按钮
-			tabsData: [
-				{
-					name: '优惠券',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
-					funtion: () => {
-						this.$msg('即将开通...')
-					}
-				},
-				{
-					name: '老带新',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-2.png`,
-					funtion: () => {
-						this.$msg('即将开通...')
-					}
-				},
-				{
-					name: '消费登记',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-3.png`,
-					funtion: () => {
-						this.$msg('即将开通...')
-					}
-				},
-				{
-					name: '备注',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-4.png`,
-					funtion: () => {
-						this.remarkModal = true
-					}
-				},
-				{
-					name: '充值',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-5.png`,
-					funtion: () => {
-						this.rechargeModal = true
-					}
-				},
-				{
-					name: '重置密码',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-6.png`,
-					funtion: () => {
-						this.passwordModal = true
-					}
-				},
-				{
-					name: '升级',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-7.png`,
-					funtion: () => {
-						this.upgradeModal = true
-					}
-				},
-				{
-					name: '发消息',
-					img: `${this.$constant.imgUrl}/retail/member/tab-icon-8.png`,
-					//url: '/pages/chat/index'
-					funtion: () => {
-						this.$msg('即将开通...')
-					}
-				}
-			],
-			// 重置密码
-			passwordForm: {
-				password: ''
-			},
-			// 充值
-			rechargeForm: {
-				rechargeAmount: '',
-				confirmPassword: ''
-			},
-			// 升级
-			levelSelData: {},
-			upgradeForm: {
-				member: '',
-				confirmPassword: ''
-			},
-			// 备注
-			remarkForm: {
-				remark: ''
-			},
-			remarkOperateData: {},
-			// 订单
-			orderMoreStatus: false,
-			// 确认操作提示
-			promptRemarkModal: false,
-			promptModalText: '是否要删除该备注?'
+  name: "member-detail",
+  components: {
+    AppVipModule,
+    AppAvatarModule,
+    ModalModule
+  },
+  props: {},
+  data() {
+    return {
+      constant: this.$constant,
+      // data
+      data: {},
+      // modal
+      rechargeModal: false,
+      passwordModal: false,
+      upgradeModal: false,
+      remarkModal: false,
+      // 用户资金情况
+      fundsData: [
+        {
+          name: "消费次数",
+          value: 0
+        },
+        {
+          name: "累计消费(¥)",
+          value: 0
+        },
+        {
+          name: "成长值",
+          value: 0
+        },
+        {
+          name: "余额",
+          value: 0
+        }
+      ],
+      // tab按钮
+      tabsData: [
+        {
+          name: "优惠券",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
+          funtion: () => {
+            this.$msg("即将开通...");
+          }
+        },
+        {
+          name: "老带新",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-2.png`,
+          funtion: () => {
+            this.$msg("即将开通...");
+          }
+        },
+        {
+          name: "消费登记",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-3.png`,
+          funtion: () => {
+            this.$msg("即将开通...");
+          }
+        },
+        {
+          name: "备注",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-4.png`,
+          funtion: () => {
+            this.remarkModal = true;
+          }
+        },
+        {
+          name: "充值",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-5.png`,
+          funtion: () => {
+            this.rechargeModal = true;
+          }
+        },
+        {
+          name: "重置密码",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-6.png`,
+          funtion: () => {
+            this.passwordModal = true;
+          }
+        },
+        {
+          name: "升级",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-7.png`,
+          funtion: () => {
+            this.upgradeModal = true;
+          }
+        },
+        {
+          name: "发消息",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-8.png`,
+          //url: '/pages/chat/index'
+          funtion: () => {
+            this.$msg("即将开通...");
+          }
+        }
+      ],
+      // 重置密码
+      passwordForm: {
+        password: ""
+      },
+      // 充值
+      rechargeForm: {
+        rechargeAmount: "",
+        confirmPassword: ""
+      },
+      // 升级
+      levelSelData: {},
+      upgradeForm: {
+        member: "",
+        confirmPassword: ""
+      },
+      // 备注
+      remarkForm: {
+        remark: ""
+      },
+      remarkOperateData: {},
+      // 订单
+      orderMoreStatus: false,
+      // 确认操作提示
+      promptRemarkModal: false,
+	  promptModalText: "是否要删除该备注?"
+    };
+  },
+  computed: {
+    ...mapGetters({ levelData: "getLevel" })
+  },
+  onLoad() {
+  },
+  methods: {
+    init() {
+      this._getUserDet();
+      getLevel();
+    },
+    _getUserDet() {
+      getUserDet({ userId: this.option.id }).then(res => {
+        if (this.$util.isEmpty(res.data)){
+			return false;
 		}
-	},
-	computed: {
-		...mapGetters({ levelData: 'getLevel' })
-	},
-	onLoad() {
-		// this.init()
-	},
-	methods: {
-		init() {
-			this._getUserDet()
-			getLevel()
-		},
-		// api
-		_getUserDet() {
-			getUserDet({ userId: this.option.id }).then(res => {
-				if (this.$util.isEmpty(res.data)) return false
-				this.data = res.data
-				this.fundsData[0].value = res.data.userAsset.totalBuyNum
-				this.fundsData[1].value = res.data.userAsset.totalExpend
-				this.fundsData[2].value = res.data.userAsset.growth
-				this.fundsData[3].value = res.data.userAsset.balance
-			})
-		},
-		_rechargeB() {
-			rechargeB({
-				userId: this.data.id,
-				...this.rechargeForm
-			}).then(res => {
-				this._getUserDet()
-				this.$msg('充值成功!')
-				this.modalCancel()
-			})
-		},
-		_upgrade() {
-			upgrade({
-				userId: this.data.id,
-				...this.upgradeForm
-			}).then(res => {
-				this.$msg('升级成功!')
-				this.modalCancel()
-			})
-		},
-		_resetPassword() {
-			resetPassword({
-				userId: this.data.id,
-				...this.passwordForm
-			}).then(res => {
-				this.$msg('重置成功!')
-				this.modalCancel()
-			})
-		},
-		_remarkAdd() {
-			remarkAdd({
-				userId: this.data.id,
-				...this.remarkForm
-			}).then(res => {
-				this.$msg('添加成功!')
-				this.modalCancel()
-				this._getUserDet()
-			})
-		},
-		_delRemark() {
-			remarkDel({ id: this.remarkOperateData.id }).then(res => {
-				this.$msg('删除成功!')
-				this.modalCancel()
-				this._getUserDet()
-			})
-		},
-		// operate ===========================
-		orderMoreFn() {
-			this.orderMoreStatus = false
-		},
-		delRemarkFn(item) {
-			this.remarkOperateData = item
-			this.promptModalText = '是否要删除该备注?'
-			this.promptRemarkModal = true
-		},
-		// 弹窗按钮
-		changeLevelFn(e) {
-			this.levelSelData = this.levelData.list[e.detail.value]
-			this.upgradeForm.member = this.levelSelData.level
-		},
-		passwordModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				this.modalCancel()
-				this.promptModalText = '确认重置密码?'
-				this.promptRemarkModal = true
-			}
-		},
-		upgradeModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				this.modalCancel()
-				this.promptModalText = '确认升级?'
-				this.promptRemarkModal = true
-			}
-		},
-		rechargeModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				this.modalCancel()
-				this.promptModalText = '确认充值?'
-				this.promptRemarkModal = true
-			}
-		},
-		remarkModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				this._remarkAdd()
-			}
-		},
-		promptModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				if (this.promptModalText == '是否要删除该备注?') {
-					this._delRemark()
-				}
-				if (this.promptModalText == '确认升级?') {
-					this._upgrade()
-				}
-				if (this.promptModalText == '确认充值?') {
-					this._rechargeB()
-				}
-				if (this.promptModalText == '确认重置密码?') {
-					this._resetPassword()
-				}
-			}
-		},
-		modalCancel() {
-			this.rechargeModal = false
-			this.passwordModal = false
-			this.upgradeModal = false
-			this.remarkModal = false
-			this.promptRemarkModal = false
-		}
-	}
-}
+		this.data = res.data;
+        this.fundsData[0].value = res.data.userAsset.totalBuyNum;
+        this.fundsData[1].value = res.data.userAsset.totalExpend;
+        this.fundsData[2].value = res.data.userAsset.growth;
+        this.fundsData[3].value = res.data.userAsset.balance;
+      });
+    },
+    _rechargeB() {
+      rechargeB({
+        userId: this.data.id,
+        ...this.rechargeForm
+      }).then(res => {
+        this._getUserDet();
+        this.$msg("充值成功!");
+        this.modalCancel();
+      });
+    },
+    _upgrade() {
+      upgrade({
+        userId: this.data.id,
+        ...this.upgradeForm
+      }).then(res => {
+        this.$msg("升级成功!");
+        this.modalCancel();
+      });
+    },
+    _resetPassword() {
+      resetPassword({
+        userId: this.data.id,
+        ...this.passwordForm
+      }).then(res => {
+        this.$msg("重置成功!");
+        this.modalCancel();
+      });
+    },
+    _remarkAdd() {
+      remarkAdd({
+        userId: this.data.id,
+        ...this.remarkForm
+      }).then(res => {
+        this.$msg("添加成功!");
+        this.modalCancel();
+        this._getUserDet();
+      });
+    },
+    _delRemark() {
+      remarkDel({ id: this.remarkOperateData.id }).then(res => {
+        this.$msg("删除成功!");
+        this.modalCancel();
+        this._getUserDet();
+      });
+    },
+    // operate ===========================
+    orderMoreFn() {
+      this.orderMoreStatus = false;
+    },
+    delRemarkFn(item) {
+      this.remarkOperateData = item;
+      this.promptModalText = "是否要删除该备注?";
+      this.promptRemarkModal = true;
+    },
+    // 弹窗按钮
+    changeLevelFn(e) {
+      this.levelSelData = this.levelData.list[e.detail.value];
+      this.upgradeForm.member = this.levelSelData.level;
+    },
+    passwordModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+        this.modalCancel();
+        this.promptModalText = "确认重置密码?";
+        this.promptRemarkModal = true;
+      }
+    },
+    upgradeModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+        this.modalCancel();
+        this.promptModalText = "确认升级?";
+        this.promptRemarkModal = true;
+      }
+    },
+    rechargeModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+        this.modalCancel();
+        this.promptModalText = "确认充值?";
+        this.promptRemarkModal = true;
+      }
+    },
+    remarkModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+        this._remarkAdd();
+      }
+    },
+    promptModalClick(e) {
+      if (e.index === 0) {
+        this.modalCancel();
+      } else {
+        if (this.promptModalText == "是否要删除该备注?") {
+          this._delRemark();
+        }
+        if (this.promptModalText == "确认升级?") {
+          this._upgrade();
+        }
+        if (this.promptModalText == "确认充值?") {
+          this._rechargeB();
+        }
+        if (this.promptModalText == "确认重置密码?") {
+          this._resetPassword();
+        }
+      }
+    },
+    modalCancel() {
+      this.rechargeModal = false;
+      this.passwordModal = false;
+      this.upgradeModal = false;
+      this.remarkModal = false;
+      this.promptRemarkModal = false;
+    }
+  }
+};
 </script>
 
 <style lang='scss' scoped>
-	.app-content {
-		background-image: url('../../static/images/member/bg.png');
-		background-size: 100% 330px;
-		background-repeat: no-repeat;
-		padding-top: 30px;
-		padding-bottom: 30px;
-	}
-	// 公共
-	.module-com {
-		margin: 0 30px 20px;
-		padding: 20px;
-		background-color: #fff;
-		box-shadow: 0px 6px 16px #ddd;
-		border-radius: 10px;
-	}
-	// 用户信息
-	.user-info {
-		padding: 40px 30px 50px;
-		.user-wrap {
-			@include disFlex(center, space-between);
-			margin-bottom: 60px;
-			.user-top-right {
-				@include disFlex(flex-start, space-between);
-				width: calc(100% - 120px);
-				.flex-center {
-					margin-bottom: 14px;
-					.level-img {
-						margin-left: 10px;
-						width: 80px;
-						/deep/.vip-text {
-							top: -2px;
-							left: 26px;
-							font-weight: 400;
-							transform: scale(0.7);
-						}
-					}
-				}
-				.source-wrap {
-					.iconfont {
-						margin-left: 10px;
-					}
-					.iconweixinlaiyuan {
-						color: #35b801;
-					}
-					.iconzhifubao {
-						color: #00aaed;
-					}
-					.iconshoujihao1 {
-						color: #fc2e47;
-					}
-				}
-			}
-		}
-		.user-bottom {
-			width: 100%;
-			@include disFlex(center, space-between);
-			.data-list {
-				text-align: center;
-				.app-size-30 {
-					margin-bottom: 14px;
-				}
-			}
-		}
-	}
-	// tabs
-	.tabs-wrap {
-		padding: 40px 10px;
-		@include disFlex(center, center);
-		flex-wrap: wrap;
-		.tabs-list {
-			width: 25%;
-			margin-bottom: 50px;
-			text-align: center;
-			.tabs-img {
-				width: 50px;
-				height: 50px;
-				margin: 0 auto 14px;
-				img {
-					height: 100%;
-				}
-			}
-			.tabs-name {
-				color: $fontColor2;
-			}
-			&:nth-child(n + 5) {
-				margin-bottom: 0;
-			}
-		}
-	}
-	// 备注
-	.remark-wrap {
-		.list-wrap {
-			margin-top: 24px;
-			.list-line {
-				@include disFlex(center, space-between);
-				margin-top: 10px;
-				padding: 16px 20px;
-				background-color: #f7f7f8;
-				color: $fontColor2;
-				border-radius: 4px;
-				.iconfont {
-					color: $fontColor3;
-				}
-				.time {
-					margin-right: 70px;
-				}
-				.price {
-					color: #333;
-				}
-			}
-		}
-		.more-text {
-			margin-top: 24px;
-			text-align: center;
-			color: $fontColor3;
-		}
-	}
+.app-content {
+  background-image: url("../../static/images/member/bg.png");
+  background-size: 100% 330px;
+  background-repeat: no-repeat;
+  padding-top: 30px;
+  padding-bottom: 30px;
+}
+// 公共
+.module-com {
+  margin: 0 30px 20px;
+  padding: 20px;
+  background-color: #fff;
+  box-shadow: 0px 6px 16px #ddd;
+  border-radius: 10px;
+}
+// 用户信息
+.user-info {
+  padding: 40px 30px 50px;
+  .user-wrap {
+    @include disFlex(center, space-between);
+    margin-bottom: 60px;
+    .user-top-right {
+      @include disFlex(flex-start, space-between);
+      width: calc(100% - 120px);
+      .flex-center {
+        margin-bottom: 14px;
+        .level-img {
+          margin-left: 10px;
+          width: 80px;
+          /deep/.vip-text {
+            top: -2px;
+            left: 26px;
+            font-weight: 400;
+            transform: scale(0.7);
+          }
+        }
+      }
+      .source-wrap {
+        .iconfont {
+          margin-left: 10px;
+        }
+        .iconweixinlaiyuan {
+          color: #35b801;
+        }
+        .iconzhifubao {
+          color: #00aaed;
+        }
+        .iconshoujihao1 {
+          color: #fc2e47;
+        }
+      }
+    }
+  }
+  .user-bottom {
+    width: 100%;
+    @include disFlex(center, space-between);
+    .data-list {
+      text-align: center;
+      .app-size-30 {
+        margin-bottom: 14px;
+      }
+    }
+  }
+}
+// tabs
+.tabs-wrap {
+  padding: 40px 10px;
+  @include disFlex(center, center);
+  flex-wrap: wrap;
+  .tabs-list {
+    width: 25%;
+    margin-bottom: 50px;
+    text-align: center;
+    .tabs-img {
+      width: 50px;
+      height: 50px;
+      margin: 0 auto 14px;
+      img {
+        height: 100%;
+      }
+    }
+    .tabs-name {
+      color: $fontColor2;
+    }
+    &:nth-child(n + 5) {
+      margin-bottom: 0;
+    }
+  }
+}
+// 备注
+.remark-wrap {
+  .list-wrap {
+    margin-top: 24px;
+    .list-line {
+      @include disFlex(center, space-between);
+      margin-top: 10px;
+      padding: 16px 20px;
+      background-color: #f7f7f8;
+      color: $fontColor2;
+      border-radius: 4px;
+      .iconfont {
+        color: $fontColor3;
+      }
+      .time {
+        margin-right: 70px;
+      }
+      .price {
+        color: #333;
+      }
+    }
+  }
+  .more-text {
+    margin-top: 24px;
+    text-align: center;
+    color: $fontColor3;
+  }
+}
 </style>