Compare commits

..

2 Commits

@ -1,5 +1,5 @@
{ {
"name": "芋道商城", "name": "郑大商城",
"appid": "__UNI__460BC4C", "appid": "__UNI__460BC4C",
"description": "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。", "description": "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。",
"versionName": "2.1.0", "versionName": "2.1.0",

@ -1,32 +1,15 @@
<!-- 用户信息 --> <!-- 用户信息 -->
<template> <template>
<s-layout title="用户信息" class="set-userinfo-wrap"> <s-layout title="用户信息" class="set-userinfo-wrap">
<uni-forms <uni-forms :model="state.model" :rules="state.rules" labelPosition="left" border class="form-box">
:model="state.model"
:rules="state.rules"
labelPosition="left"
border
class="form-box"
>
<!-- 头像 --> <!-- 头像 -->
<view class="ss-flex ss-row-center ss-col-center ss-p-t-60 ss-p-b-0 bg-white"> <view class="ss-flex ss-row-center ss-col-center ss-p-t-60 ss-p-b-0 bg-white">
<view class="header-box-content"> <view class="header-box-content">
<su-image <su-image class="content-img" isPreview :current="0" :src="state.model?.avatar" :height="160" :width="160"
class="content-img" :radius="80" mode="scaleToFill" />
isPreview
:current="0"
:src="state.model?.avatar"
:height="160"
:width="160"
:radius="80"
mode="scaleToFill"
/>
<view class="avatar-action"> <view class="avatar-action">
<!-- #ifdef MP --> <!-- #ifdef MP -->
<button <button class="ss-reset-button avatar-action-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
class="ss-reset-button avatar-action-btn"
open-type="chooseAvatar"
@chooseavatar="onChooseAvatar">
修改 修改
</button> </button>
<!-- #endif --> <!-- #endif -->
@ -40,25 +23,16 @@
<view class="bg-white ss-p-x-30"> <view class="bg-white ss-p-x-30">
<!-- 昵称 + 性别 --> <!-- 昵称 + 性别 -->
<uni-forms-item name="nickname" label="昵称"> <uni-forms-item name="nickname" label="昵称">
<uni-easyinput <uni-easyinput v-model="state.model.nickname" type="nickname" placeholder="设置昵称" :inputBorder="false"
v-model="state.model.nickname" :placeholderStyle="placeholderStyle" />
type="nickname"
placeholder="设置昵称"
:inputBorder="false"
:placeholderStyle="placeholderStyle"
/>
</uni-forms-item> </uni-forms-item>
<uni-forms-item name="sex" label="性别"> <uni-forms-item name="sex" label="性别">
<view class="ss-flex ss-col-center ss-h-100"> <view class="ss-flex ss-col-center ss-h-100">
<radio-group @change="onChangeGender" class="ss-flex ss-col-center"> <radio-group @change="onChangeGender" class="ss-flex ss-col-center">
<label class="radio" v-for="item in sexRadioMap" :key="item.value"> <label class="radio" v-for="item in sexRadioMap" :key="item.value">
<view class="ss-flex ss-col-center ss-m-r-32"> <view class="ss-flex ss-col-center ss-m-r-32">
<radio <radio :value="item.value" color="var(--ui-BG-Main)" style="transform: scale(0.8)"
:value="item.value" :checked="parseInt(item.value) === state.model?.sex" />
color="var(--ui-BG-Main)"
style="transform: scale(0.8)"
:checked="parseInt(item.value) === state.model?.sex"
/>
<view class="gender-name">{{ item.name }}</view> <view class="gender-name">{{ item.name }}</view>
</view> </view>
</label> </label>
@ -67,15 +41,8 @@
</uni-forms-item> </uni-forms-item>
<uni-forms-item name="mobile" label="手机号" @tap="onChangeMobile"> <uni-forms-item name="mobile" label="手机号" @tap="onChangeMobile">
<uni-easyinput <uni-easyinput v-model="userInfo.mobile" placeholder="请绑定手机号" :inputBorder="false" disabled
v-model="userInfo.mobile" :styles="{ disableColor: '#fff' }" :placeholderStyle="placeholderStyle" :clearable="false">
placeholder="请绑定手机号"
:inputBorder="false"
disabled
:styles="{ disableColor: '#fff' }"
:placeholderStyle="placeholderStyle"
:clearable="false"
>
<template v-slot:right> <template v-slot:right>
<view class="ss-flex ss-col-center"> <view class="ss-flex ss-col-center">
<su-radio v-if="userInfo.verification?.mobile" :modelValue="true" /> <su-radio v-if="userInfo.verification?.mobile" :modelValue="true" />
@ -87,23 +54,19 @@
</uni-easyinput> </uni-easyinput>
</uni-forms-item> </uni-forms-item>
<uni-forms-item name="level" label="会员等级">
<uni-easyinput v-model="state.laevelname" :inputBorder="false" disabled :styles="{ disableColor: '#fff' }"
:placeholderStyle="placeholderStyle" :clearable="false">
</uni-easyinput>
</uni-forms-item>
<uni-forms-item name="password" label="登录密码" @tap="onSetPassword"> <uni-forms-item name="password" label="登录密码" @tap="onSetPassword">
<uni-easyinput <uni-easyinput v-model="userInfo.password" placeholder="点击修改登录密码" :inputBorder="false"
v-model="userInfo.password" :styles="{ disableColor: '#fff' }" disabled
placeholder="点击修改登录密码" placeholderStyle="color:#BBBBBB;font-size:28rpx;line-height:normal" :clearable="false">
:inputBorder="false"
:styles="{ disableColor: '#fff' }"
disabled
placeholderStyle="color:#BBBBBB;font-size:28rpx;line-height:normal"
:clearable="false"
>
<template v-slot:right> <template v-slot:right>
<view class="ss-flex ss-col-center"> <view class="ss-flex ss-col-center">
<su-radio <su-radio class="ss-flex" v-if="userInfo.verification?.password" :modelValue="true" />
class="ss-flex"
v-if="userInfo.verification?.password"
:modelValue="true"
/>
<button v-else class="ss-reset-button ss-flex ss-col-center ss-row-center"> <button v-else class="ss-reset-button ss-flex ss-col-center ss-row-center">
<text class="_icon-forward" style="color: #bbbbbb; font-size: 26rpx" /> <text class="_icon-forward" style="color: #bbbbbb; font-size: 26rpx" />
</button> </button>
@ -115,14 +78,8 @@
<view class="bg-white ss-m-t-14"> <view class="bg-white ss-m-t-14">
<uni-list> <uni-list>
<uni-list-item <uni-list-item clickable @tap="sheep.$router.go('/pages/user/address/list')" title="地址管理" showArrow
clickable :border="false" class="list-border" />
@tap="sheep.$router.go('/pages/user/address/list')"
title="地址管理"
showArrow
:border="false"
class="list-border"
/>
</uni-list> </uni-list>
</view> </view>
</uni-forms> </uni-forms>
@ -132,40 +89,24 @@
<view class="title-box ss-p-l-30">第三方账号绑定</view> <view class="title-box ss-p-l-30">第三方账号绑定</view>
<view class="account-list ss-flex ss-row-between"> <view class="account-list ss-flex ss-row-between">
<view v-if="'WechatOfficialAccount' === sheep.$platform.name" class="ss-flex ss-col-center"> <view v-if="'WechatOfficialAccount' === sheep.$platform.name" class="ss-flex ss-col-center">
<image <image class="list-img" :src="sheep.$url.static('/static/img/shop/platform/WechatOfficialAccount.png')" />
class="list-img"
:src="sheep.$url.static('/static/img/shop/platform/WechatOfficialAccount.png')"
/>
<text class="list-name">微信公众号</text> <text class="list-name">微信公众号</text>
</view> </view>
<view v-if="'WechatMiniProgram' === sheep.$platform.name" class="ss-flex ss-col-center"> <view v-if="'WechatMiniProgram' === sheep.$platform.name" class="ss-flex ss-col-center">
<image <image class="list-img" :src="sheep.$url.static('/static/img/shop/platform/WechatMiniProgram.png')" />
class="list-img"
:src="sheep.$url.static('/static/img/shop/platform/WechatMiniProgram.png')"
/>
<text class="list-name">微信小程序</text> <text class="list-name">微信小程序</text>
</view> </view>
<view v-if="'App' === sheep.$platform.name" class="ss-flex ss-col-center"> <view v-if="'App' === sheep.$platform.name" class="ss-flex ss-col-center">
<image <image class="list-img" :src="sheep.$url.static('/static/img/shop/platform/wechat.png')" />
class="list-img"
:src="sheep.$url.static('/static/img/shop/platform/wechat.png')"
/>
<text class="list-name">微信开放平台</text> <text class="list-name">微信开放平台</text>
</view> </view>
<view class="ss-flex ss-col-center"> <view class="ss-flex ss-col-center">
<view class="info ss-flex ss-col-center" v-if="state.thirdInfo"> <view class="info ss-flex ss-col-center" v-if="state.thirdInfo">
<image <image class="avatar ss-m-r-20" :src="sheep.$url.cdn(state.thirdInfo.avatar)" />
class="avatar ss-m-r-20"
:src="sheep.$url.cdn(state.thirdInfo.avatar)"
/>
<text class="name">{{ state.thirdInfo.nickname }}</text> <text class="name">{{ state.thirdInfo.nickname }}</text>
</view> </view>
<view class="bind-box ss-m-l-20"> <view class="bind-box ss-m-l-20">
<button <button v-if="state.thirdInfo.openid" class="ss-reset-button relieve-btn" @tap="unBindThirdOauth">
v-if="state.thirdInfo.openid"
class="ss-reset-button relieve-btn"
@tap="unBindThirdOauth"
>
解绑 解绑
</button> </button>
<button v-else class="ss-reset-button bind-btn" @tap="bindThirdOauth"></button> <button v-else class="ss-reset-button bind-btn" @tap="bindThirdOauth"></button>
@ -189,11 +130,12 @@
import { showAuthModal } from '@/sheep/hooks/useModal'; import { showAuthModal } from '@/sheep/hooks/useModal';
import FileApi from '@/sheep/api/infra/file'; import FileApi from '@/sheep/api/infra/file';
import UserApi from '@/sheep/api/member/user'; import UserApi from '@/sheep/api/member/user';
// const laevelname = ''
const state = reactive({ const state = reactive({
model: {}, // model: {}, //
rules: {}, rules: {},
thirdInfo: {}, // thirdInfo: {}, //
laevelname:'不是会员'
}); });
const placeholderStyle = 'color:#BBBBBB;font-size:28rpx;line-height:normal'; const placeholderStyle = 'color:#BBBBBB;font-size:28rpx;line-height:normal';
@ -293,6 +235,10 @@
const getUserInfo = async () => { const getUserInfo = async () => {
// //
const userInfo = await sheep.$store('user').getInfo(); const userInfo = await sheep.$store('user').getInfo();
if (userInfo.level!==null){
state.laevelname = userInfo.level.name
console.log(state.laevelname,'78789');
}
state.model = clone(userInfo); state.model = clone(userInfo);
// //

@ -42,8 +42,9 @@
</view> </view>
<view class="buy-num-box ss-flex ss-col-center ss-row-between ss-m-b-40"> <view class="buy-num-box ss-flex ss-col-center ss-row-between ss-m-b-40">
<view class="label-text">购买数量</view> <view class="label-text">购买数量</view>
<su-number-box :min="1" :max="state.selectedSku.stock" :step="1" <!-- :max="state.selectedSku.stock" -->
v-model="state.selectedSku.goods_num" @change="onNumberChange($event)" /> <su-number-box :min="1" :max="1" :step="1" v-model="state.selectedSku.goods_num"
@change="onNumberChange($event)" />
</view> </view>
</scroll-view> </scroll-view>
</view> </view>

Loading…
Cancel
Save