This commit is contained in:
zmj 2024-06-22 19:48:52 +08:00
parent e5406af13b
commit 4b1c909d5e
3 changed files with 20 additions and 30 deletions

View File

@ -48,7 +48,7 @@
<view class="nav-item" @click="navTo('/pagesOrder/order/order?type=0')"> <view class="nav-item" @click="navTo('/pagesOrder/order/order?type=0')">
<image src="@/static/tab/da.png"></image> <image src="@/static/tab/da.png"></image>
<text>我的订单</text> <text>我的订单</text>
<view class="badge">{{ userStore.userInfo.no_writeoff }}</view> <view class="badge">{{ userStore.userInfo.no_writeoff }}</view>
</view> </view>
<view class="nav-item" @click="navTo('/pages/my/my')"> <view class="nav-item" @click="navTo('/pages/my/my')">
<image src="@/static/tab/ca.png"></image> <image src="@/static/tab/ca.png"></image>
@ -146,7 +146,7 @@
</view> </view>
</view> </view>
<view style="display: flex;" v-if='item.batch>0'> <view style="display: flex;" v-if='item.batch>0'>
<view>{{item.batch}}{{item.unit_name }}起卖</view> <view style="color: red;">起批量: {{item.batch}}{{item.unit_name }}起卖</view>
</view> </view>
<view style="display: flex;align-items: center;" v-if='userStore?.userInfo?.user_ship==1'> <view style="display: flex;align-items: center;" v-if='userStore?.userInfo?.user_ship==1'>
<text class='price' style="font-size: 24rpx;">会员价</text> <text class='price' style="font-size: 24rpx;">会员价</text>
@ -664,23 +664,23 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
image { image {
height: 40rpx; height: 40rpx;
width: 40rpx; width: 40rpx;
} }
.badge{ .badge {
position: absolute; position: absolute;
top: -10rpx; top: -10rpx;
right: 0; right: 0;
background-color: #FF0000; background-color: #FF0000;
color: #FFFFFF; color: #FFFFFF;
padding: 0 5rpx; padding: 0 5rpx;
border-radius: 50rpx; border-radius: 50rpx;
font-size: 18rpx; font-size: 18rpx;
} }
} }
} }

View File

@ -9,7 +9,7 @@
<view class="login-box"> <view class="login-box">
<image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png"> <image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png">
</image> </image>
<view class="tips">欢迎登录惠农批发</view> <view class="tips">欢迎登录泸优采</view>
<block v-if="showWeixin"> <block v-if="showWeixin">
<up-transition :show="showWeixin"> <up-transition :show="showWeixin">
<view class="btn"> <view class="btn">
@ -18,7 +18,7 @@
</view> </view>
<view class="btn" v-if="config.ENV=='dev'"> <view class="btn" v-if="config.ENV=='dev'">
<up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon <up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon
name="weixin-fill" color="#fff" size="28"></up-icon></up-button> name="account-fill" color="#fff" size="28"></up-icon></up-button>
</view> </view>
<!-- <view class="btn"> <!-- <view class="btn">
<up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff" <up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"

View File

@ -3,12 +3,13 @@
<view style="text-align: center;"> <view style="text-align: center;">
<image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png"> <image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png">
</image> </image>
<view class="tips">欢迎登录惠农批发</view> <view class="tips">欢迎登录泸优采</view>
</view> </view>
<view class='card'> <view class='card'>
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<text>手机号</text> <up-input v-model="formData.account" placeholder="请输入手机号"></up-input> <text>手机号</text>
<up-input v-model="formData.account" placeholder="请输入手机号"></up-input>
</view> </view>
<view style="margin: 30rpx 0;"> <view style="margin: 30rpx 0;">
</view> </view>
@ -24,18 +25,12 @@
</view> </view>
</view> </view>
</view> </view>
<view class="submit-btn"> <view class="submit-btn">
<up-button @click="submit" color="#20B128" size="large"> <up-button @click="submit" color="#20B128" size="large">
登录</up-button> 登录</up-button>
</view> </view>
</view> </view>
</template> </template>
@ -92,16 +87,11 @@
const submit = () => { const submit = () => {
userLoginApi({ userLoginApi({
account: zh.value, ...formData
"password": "123456",
"terminal": 2,
"scene": 1
}).then(res => { }).then(res => {
getStoreInfo().then(res => { getStoreInfo().then(res => {
uni.setStorageSync("STORE_INFO", JSON.stringify(res.data)) uni.setStorageSync("STORE_INFO", JSON.stringify(res.data))
}) })
uni.setStorageSync('token', res.data.token); uni.setStorageSync('token', res.data.token);
userStore.setToken(res.data.token); userStore.setToken(res.data.token);
console.log(res.data.token) console.log(res.data.token)