merge
1.小程序-花店:1.1-浏览记录建议改成显示30条数据; 1.2-增加一个一键清空已失效商品
2.小程序-花店:增加热区跳转进入店铺 及 点击头像和名字也可以跳转进入店铺
3.小程序-花店:轮播图指示点优化去掉
4.小程序-花店:登录,注册失去焦点验证手机号
| | |
| | | export default { |
| | | |
| | | // httpBaseUri: 'https://www.hmyxianhua.com/flower', |
| | | httpBaseUri: 'http://47.99.58.211/flower', |
| | | httpBaseUri: 'https://www.hmyxianhua.com/flower', |
| | | // httpBaseUri: 'http://47.99.58.211/flower', |
| | | // httpBaseUri: 'http://localhost:8080/flower', |
| | | clientId: '', |
| | | secret: '', |
| | |
| | | </view>
|
| | |
|
| | | <!-- banner -->
|
| | | <uni-swiper-dot class="uni-swiper-dot-box" @clickItem=clickItem :info="info" :current="currentBanner"
|
| | | :mode="'dot'" :dots-styles="dotsStyles[0]" field="content">
|
| | | <!-- <uni-swiper-dot class="uni-swiper-dot-box" @clickItem=clickItem :info="info" :current="currentBanner"
|
| | | :mode="'dot'" :dots-styles="dotsStyles[0]" field="content"> -->
|
| | | <swiper class="swiper-box" @change="changeBanner" :interval="10000" :circular="true" :current="0"
|
| | | v-if="banners&&banners.length>0" :autoplay="true">
|
| | | <swiper-item v-for="(item, index) in banners" :key="index">
|
| | |
| | | </view>
|
| | | </swiper-item>
|
| | | </swiper>
|
| | | </uni-swiper-dot>
|
| | | <!-- </uni-swiper-dot> -->
|
| | | <!-- tip -->
|
| | | <view class="m-t-12" @click="getNoticeMore">
|
| | | <uni-notice-bar class="notice-bar" color="#333" background-color="#fff" show-get-more show-icon
|
| | |
| | | </view>
|
| | | <view class="t-a input form-input" v-if="loginType=='pwd'">
|
| | | <!-- <input type="text" name="userName" placeholder="请输入账号" v-model="userName" /> -->
|
| | | <u-input placeholder="请输入账号" :border="false" v-model="userName"></u-input>
|
| | | <u-input placeholder="请输入账号" :border="false" v-model="userName" @blur="validatePhoneNumber()"></u-input>
|
| | |
|
| | | </view>
|
| | | <view class="t-a input form-input" v-if="loginType=='pwd'">
|
| | |
| | | <view class="t-a input form-input" v-if="loginType=='code'">
|
| | |
|
| | |
|
| | | <u-input placeholder="请输入手机号" :border="false" v-model="phoneNumber">
|
| | | <u-input placeholder="请输入手机号" :border="false" v-model="phoneNumber" @blur="validatePhoneNumber()">
|
| | | <template slot="suffix">
|
| | | <view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
|
| | | {{ getCodeText }}
|
| | |
| | | getCodeText: '获取验证码',
|
| | | getCodeBtnColor: "#20613D",
|
| | | getCodeisWaiting: false,
|
| | | Timer: undefined, |
| | | Timer: undefined,
|
| | | protocal:false,
|
| | | // #ifdef PUB_SUPPLIER
|
| | | apitype: 'loginSupplier',
|
| | |
| | | };
|
| | | },
|
| | | methods: {
|
| | | // 手机号码正则表达式校验
|
| | | validatePhoneNumber() {
|
| | |
|
| | | // 手机号码正则表达式,可以根据需要调整
|
| | | const phoneRegex = /^[1][3-9][0-9]{9}$/;
|
| | | if (this.loginType == 'pwd') {
|
| | | if (!phoneRegex.test(this.userName)) {
|
| | | this.$message.showToast('请填写正确手机号码')
|
| | | }
|
| | | }
|
| | | if (this.loginType == 'code') {
|
| | | if (!phoneRegex.test(this.phoneNumber)) {
|
| | | this.$message.showToast('请填写正确手机号码')
|
| | | }
|
| | | }
|
| | |
|
| | | },
|
| | | async getCode() {
|
| | | console.log('getCode')
|
| | | uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。
|
| | |
| | | changeAll(e) {
|
| | | this.pcfvalue = e.detail.value[0]
|
| | | },
|
| | | async login() { |
| | | if(!this.protocal){ |
| | | this.$message.showToast('请同意用户协议') |
| | | return |
| | | async login() {
|
| | | if(!this.protocal){
|
| | | this.$message.showToast('请同意用户协议')
|
| | | return
|
| | | }
|
| | | uni.showLoading({
|
| | | title: '登陆中'
|
| | |
| | | </view> |
| | | <!-- #endif --> |
| | | <view class="t-a form-input" v-if="loginType=='code'"> |
| | | <u-input placeholder="请输入手机号" :border="false" v-model="phoneNumber"> |
| | | <u-input placeholder="请输入手机号" :border="false" v-model="phoneNumber" @blur="validatePhoneNumber()"> |
| | | <template slot="suffix"> |
| | | <view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()"> |
| | | {{ getCodeText }} |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | // 手机号码正则表达式校验 |
| | | validatePhoneNumber() { |
| | | // 手机号码正则表达式,可以根据需要调整 |
| | | const phoneRegex = /^[1][3-9][0-9]{9}$/; |
| | | if (!phoneRegex.test(this.phoneNumber)) { |
| | | this.$message.showToast('请填写正确手机号码') |
| | | } |
| | | }, |
| | | |
| | | async scanPartnerCode() { |
| | | // await this.$message.confirm('确定要绑定合伙人吗?') |
| | | //扫二维码确认 |
| | |
| | | <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data> |
| | | |
| | | <view class="follow-item m-b-40 flex" v-for="(item,index) of list" :key="index"> |
| | | <image class="avatar img100" :src="item.cover" mode="aspectFill"></image> |
| | | <view class="info"> |
| | | <image class="avatar img100" :src="item.cover" mode="aspectFill" @click="toDetail(item)"></image> |
| | | <view class="info" @click="toDetail(item)"> |
| | | <view class="name">{{ item.supplierName }}</view> |
| | | <view class="time">{{ item.createTime }}</view> |
| | | </view> |
| | |
| | | }, |
| | | onLoad() { |
| | | this.listApi = '/api/browse/history/list' |
| | | this.page.size =30 |
| | | this.getList() |
| | | |
| | | this.$http.request('get', '/api/code/value', { |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | |
| | | async deleteExpired() { |
| | | await this.$message.confirm('是否清空已失效的商品') |
| | | this.$message.showLoading() |
| | | const { |
| | | code |
| | | } = await this.$http.request('post', '/api/browse/history/clear', { |
| | | data: { |
| | | |
| | | } |
| | | }) |
| | | this.$message.hideLoading() |
| | | if (code === 0) { |
| | | this.refreshList() |
| | | } |
| | | }, |
| | | |
| | | toDetail(item) { |
| | | if (item.status == 'UP') { |
| | | |
| | |
| | | {{ query.levelStr || '级别' }} |
| | | <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> |
| | | </view> |
| | | <view class="flex1" @click="deleteExpired()"> |
| | | 一键清空已失效 |
| | | <!-- <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> --> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |