Compare commits

..

2 Commits

Author SHA1 Message Date
zmj 0a8c7b0504 add 2024-06-22 19:58:02 +08:00
zmj 4b1c909d5e add 2024-06-22 19:48:52 +08:00
3 changed files with 878 additions and 884 deletions

View File

@ -24,15 +24,19 @@
<view class="store-info"> <view class="store-info">
<view style="display: flex;font-size: 30rpx;font-weight: bold;"> <view style="display: flex;font-size: 30rpx;font-weight: bold;">
<text v-if="userStore.userInfo.user_ship == 1 || shareInfo.store_id" <text v-if="userStore.userInfo.user_ship == 1 || shareInfo.store_id"
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{(shareInfo.real_name||( userStore.userInfo.real_name|| userStore.userInfo.nickname)) + '的供销个人门店' }}</text> style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{
(shareInfo.real_name || (
userStore.userInfo.real_name || userStore.userInfo.nickname)) + '的供销个人门店' }}</text>
<text v-else <text v-else
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{STORE_INFO.store_name}}</text> style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{
STORE_INFO.store_name }}</text>
<up-icon name="arrow-right"></up-icon> <up-icon name="arrow-right"></up-icon>
</view> </view>
</view> </view>
</template> </template>
</up-navbar> </up-navbar>
<view class="share-btn" :style="{height:btns.height + 'px',top:btns.top + 'px',left:(btns.left - 40) + 'px'}"> <view class="share-btn"
:style="{ height: btns.height + 'px', top: btns.top + 'px', left: (btns.left - 40) + 'px' }">
<up-button icon="share-square" openType="share" plain size="large" loadingSize="100" /> <up-button icon="share-square" openType="share" plain size="large" loadingSize="100" />
</view> </view>
@ -114,7 +118,8 @@
<view class="item" :class="{ 'order-active': where.order == 'desc' || where.order == 'asc' }" <view class="item" :class="{ 'order-active': where.order == 'desc' || where.order == 'asc' }"
@click="changeOrder(where.order == 'asc' ? 'desc' : 'asc')">价格</view> @click="changeOrder(where.order == 'asc' ? 'desc' : 'asc')">价格</view>
<view class="item" :class="{ 'order-active': where.order == 'sales' }" <view class="item" :class="{ 'order-active': where.order == 'sales' }"
@click="changeOrder('sales')">销量</view> @click="changeOrder('sales')">销量
</view>
</view> </view>
</view> </view>
<viewPopup v-if="show === 2" @close="show = 0"> <viewPopup v-if="show === 2" @close="show = 0">
@ -123,18 +128,16 @@
<view class="classify-list"> <view class="classify-list">
<view class="classify-list-item u-line-1" <view class="classify-list-item u-line-1"
:class="{ 'item-active': rightActive === item.id }" :class="{ 'item-active': rightActive === item.id }"
v-for="(item, index) in goodClassThree" :key="index" v-for="(item, index) in goodClassThree" :key="index" @click="changeThree(item, index)">
@click="changeThree(item, index)">
{{ item.name }} {{ item.name }}
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</viewPopup> </viewPopup>
<scroll-view class="list" id='drag_area' style="overscroll-behavior: none;" @scroll="hideHeadView" <scroll-view class="list" id='drag_area' style="overscroll-behavior: none;" @scroll="hideHeadView" scroll-y
scroll-y @scrolltolower="loadMoreGood"> @scrolltolower="loadMoreGood">
<view class="shop-item" v-for="(item, index) in goodList" :key="item.id" <view class="shop-item" v-for="(item, index) in goodList" :key="item.id" @click="openGoodPopup(item)">
@click="openGoodPopup(item)">
<view class="shop-img" <view class="shop-img"
:style="{ backgroundImage: `url(${item.image}?x-oss-process=image/format,webp)` }"> :style="{ backgroundImage: `url(${item.image}?x-oss-process=image/format,webp)` }">
</view> </view>
@ -146,7 +149,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>
@ -681,6 +684,7 @@
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)