Compare commits

..

No commits in common. '55c9b8ccc1e1fe82db2647b3e909540bc95c4645' and '0918b9ca8806a58e87a58036c51bbfe57ce9c73f' have entirely different histories.

@ -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,15 +1,32 @@
<!-- 用户信息 --> <!-- 用户信息 -->
<template> <template>
<s-layout title="用户信息" class="set-userinfo-wrap"> <s-layout title="用户信息" class="set-userinfo-wrap">
<uni-forms :model="state.model" :rules="state.rules" labelPosition="left" border class="form-box"> <uni-forms
: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 class="content-img" isPreview :current="0" :src="state.model?.avatar" :height="160" :width="160" <su-image
:radius="80" mode="scaleToFill" /> class="content-img"
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 class="ss-reset-button avatar-action-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"> <button
class="ss-reset-button avatar-action-btn"
open-type="chooseAvatar"
@chooseavatar="onChooseAvatar">
修改 修改
</button> </button>
<!-- #endif --> <!-- #endif -->
@ -23,16 +40,25 @@
<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 v-model="state.model.nickname" type="nickname" placeholder="设置昵称" :inputBorder="false" <uni-easyinput
:placeholderStyle="placeholderStyle" /> v-model="state.model.nickname"
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 :value="item.value" color="var(--ui-BG-Main)" style="transform: scale(0.8)" <radio
:checked="parseInt(item.value) === state.model?.sex" /> :value="item.value"
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>
@ -41,8 +67,15 @@
</uni-forms-item> </uni-forms-item>
<uni-forms-item name="mobile" label="手机号" @tap="onChangeMobile"> <uni-forms-item name="mobile" label="手机号" @tap="onChangeMobile">
<uni-easyinput v-model="userInfo.mobile" placeholder="请绑定手机号" :inputBorder="false" disabled <uni-easyinput
:styles="{ disableColor: '#fff' }" :placeholderStyle="placeholderStyle" :clearable="false"> v-model="userInfo.mobile"
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" />
@ -54,19 +87,23 @@
</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 v-model="userInfo.password" placeholder="点击修改登录密码" :inputBorder="false" <uni-easyinput
:styles="{ disableColor: '#fff' }" disabled v-model="userInfo.password"
placeholderStyle="color:#BBBBBB;font-size:28rpx;line-height:normal" :clearable="false"> placeholder="点击修改登录密码"
: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 class="ss-flex" v-if="userInfo.verification?.password" :modelValue="true" /> <su-radio
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>
@ -78,8 +115,14 @@
<view class="bg-white ss-m-t-14"> <view class="bg-white ss-m-t-14">
<uni-list> <uni-list>
<uni-list-item clickable @tap="sheep.$router.go('/pages/user/address/list')" title="地址管理" showArrow <uni-list-item
:border="false" class="list-border" /> clickable
@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>
@ -89,24 +132,40 @@
<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 class="list-img" :src="sheep.$url.static('/static/img/shop/platform/WechatOfficialAccount.png')" /> <image
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 class="list-img" :src="sheep.$url.static('/static/img/shop/platform/WechatMiniProgram.png')" /> <image
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 class="list-img" :src="sheep.$url.static('/static/img/shop/platform/wechat.png')" /> <image
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 class="avatar ss-m-r-20" :src="sheep.$url.cdn(state.thirdInfo.avatar)" /> <image
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 v-if="state.thirdInfo.openid" class="ss-reset-button relieve-btn" @tap="unBindThirdOauth"> <button
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>
@ -130,12 +189,11 @@
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';
@ -235,10 +293,6 @@
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);
// //

@ -1,7 +1,7 @@
<template> <template>
<!-- 规格弹窗 --> <!-- 规格弹窗 -->
<su-popup :show="show" round="10" @close="emits('close')"> <su-popup :show="show" round="10" @close="emits('close')">
<!-- SKU 信息 --> <!-- SKU 信息 -->
<view class="ss-modal-box bg-white ss-flex-col"> <view class="ss-modal-box bg-white ss-flex-col">
<view class="modal-header ss-flex ss-col-center"> <view class="modal-header ss-flex ss-col-center">
<view class="header-left ss-m-r-30"> <view class="header-left ss-m-r-30">
@ -22,7 +22,7 @@
</view> </view>
</view> </view>
<!-- 属性选择 --> <!-- 属性选择 -->
<view class="modal-content ss-flex-1"> <view class="modal-content ss-flex-1">
<scroll-view scroll-y="true" class="modal-content-scroll" @touchmove.stop> <scroll-view scroll-y="true" class="modal-content-scroll" @touchmove.stop>
<view class="sku-item ss-m-b-20" v-for="property in propertyList" :key="property.id"> <view class="sku-item ss-m-b-20" v-for="property in propertyList" :key="property.id">
@ -42,14 +42,13 @@
</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>
<!-- :max="state.selectedSku.stock" --> <su-number-box :min="1" :max="state.selectedSku.stock" :step="1"
<su-number-box :min="1" :max="1" :step="1" v-model="state.selectedSku.goods_num" v-model="state.selectedSku.goods_num" @change="onNumberChange($event)" />
@change="onNumberChange($event)" />
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<!-- 操作区 --> <!-- 操作区 -->
<view class="modal-footer border-top"> <view class="modal-footer border-top">
<view class="buy-box ss-flex ss-col-center ss-flex ss-col-center ss-row-center"> <view class="buy-box ss-flex ss-col-center ss-flex ss-col-center ss-row-center">
<button class="ss-reset-button add-btn ui-Shadow-Main" @tap="onAddCart"></button> <button class="ss-reset-button add-btn ui-Shadow-Main" @tap="onAddCart"></button>

Loading…
Cancel
Save