wangfukang 4 weeks ago
parent
commit
63965fd723
  1. 27
      package2/group/groupBuyList.vue
  2. 114
      package2/group/studentStoreList.vue
  3. 174
      package2/shop/merchantRegister.vue

27
package2/group/groupBuyList.vue

@ -218,6 +218,7 @@
totalPages: 1,
searchForm: {
regionId: JSON.parse(uni.getStorageSync('area')).id,
merchantType: 1,
shopType: '',
shopArea: '',
pageNumber: 1,
@ -287,11 +288,12 @@
url: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/e6adc80518c24c488522ab19f036af27.png',
index: 4
}, {
name: '看病买药',
displayName: '救急小站',
sticker: '急',
name: '同学小店',
displayName: '同学店铺',
sticker: '校',
isStudentOnly: true,
value: '',
url: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/766761af471a4f9f90e9a137f9c4f701.png',
url: '/static/images/img/songshu.png',
index: 5
}],
menuBtn1: [{
@ -404,6 +406,7 @@
this.searchForm.sortOrder = 'shoprank'
this.searchForm.orderOrder = 'desc'
this.searchForm.shopArea = ''
this.$delete(this.searchForm, 'isStudent')
this.searchForm.sort = 'shoprank'
this.searchScore = false
this.searchScore = false
@ -564,6 +567,10 @@
})
} else if (type == 'search') {
if (item) {
if (item.isStudentOnly) {
this.searchStudentShop()
return
}
uni.navigateTo({
url: '/package2/group/searchGroup?shopType=' + (item.value || '')
})
@ -581,6 +588,18 @@
back() {
uni.navigateBack()
},
searchStudentShop() {
this.searchForm.pageNumber = 1
this.searchForm.shopArea = ''
this.searchForm.shopType = ''
this.searchForm.sort = 'shoprank'
this.searchForm.sortOrder = 'shoprank'
this.searchForm.orderOrder = 'desc'
this.searchScore = false
this.searchSale = false
this.$set(this.searchForm, 'isStudent', 1)
this.getShopList()
},
checkArea() {
this.isArea = !this.isArea
}

114
package2/group/studentStoreList.vue

@ -40,7 +40,7 @@
</view>
<input class="hot-search-input" type="text" placeholder="输入你想拼的校园快乐" v-model="searchForm.keyWord"
confirm-type="search" @confirm="goSearch" />
<view class="trend-badge" @tap.stop="goSearch">上升</view>
<view class="trend-badge" @tap.stop="goSearch">搜索</view>
</view>
</view>
@ -59,18 +59,8 @@
<view class="sort-strip">
<view class="sort-title">校园拼团雷达</view>
<view class="sort-item" :class="{'active': sortMode === 'all'}" @tap="searchShop('all','')">随便逛</view>
<view class="sort-item" :class="{'active': sortMode === 'sale'}" @tap="searchShop('sale','')">正在热拼</view>
<view class="sort-item" :class="{'active': sortMode === 'score'}" @tap="searchShop('score','')">同校推荐</view>
<view class="sort-item area-sort" :class="{'active': searchForm.shopArea !== ''}" @tap="checkArea">
{{areaTitle}} <text></text>
<view class="area-panel" v-if="isArea">
<view class="area-item" @tap.stop="searchShop('area','')">全部区域</view>
<view class="area-item" v-for="item in shopArea" :key="item.id" @tap.stop="searchShop('area',item)">
{{item.title}}
</view>
</view>
</view>
<view class="sort-item" :class="{'active': searchSale}" @tap="searchShop('sale','')">拼单最多</view>
<view class="sort-item" :class="{'active': searchScore}" @tap="searchShop('score','')">同学最爱</view>
</view>
<view class="shop-list">
@ -166,6 +156,7 @@
totalPages: 1,
searchForm: {
regionId: '',
merchantType: 2,
shopName: '',
shopType: '',
keyWord: '',
@ -184,63 +175,64 @@
tabList: [{
name: '全部',
key: '',
keyword: '',
value: '',
icon: '逛',
sub: '随便看看'
}, {
name: '学生小店',
key: 'student',
keyword: '学生',
value: 5,
isStudentOnly: true,
icon: '舍',
sub: '宿舍宝藏'
}, {
name: '课程资料',
name: '考学课程',
key: 'course',
keyword: '课',
value: 11,
icon: '课',
sub: '学分救星'
}, {
name: '零食饮品',
key: 'snack',
keyword: '零食',
name: '美食',
key: 'food',
value: 1,
icon: '吃',
sub: '夜宵补给'
sub: '烤肉/火锅'
}, {
name: '美甲服务',
key: 'nail',
keyword: '美甲',
icon: '',
sub: '周末变美'
name: '休闲玩乐',
key: 'play',
value: 12,
icon: '',
sub: '网台K棋'
}, {
name: 'KTV',
key: 'ktv',
keyword: 'KTV',
icon: '',
sub: '开嗓搭子'
name: '美发美容',
key: 'beauty',
value: 13,
icon: '',
sub: '清爽一下'
}, {
name: '台球',
key: 'billiards',
keyword: '台球',
icon: '',
sub: '下课约局'
name: '甜点饮品',
key: 'drink',
value: 2,
icon: '',
sub: '快乐补给'
}, {
name: '烤肉套餐',
key: 'bbq',
keyword: '烤肉',
icon: '',
sub: '拼桌快乐'
name: '酒店民宿',
key: 'hotel',
value: 14,
icon: '',
sub: '小憩一下'
}, {
name: '网吧',
key: 'internet',
keyword: '网吧',
icon: '',
sub: '五黑集合'
name: '电影演出',
key: 'movie',
value: 15,
icon: '',
sub: '下课约影'
}, {
name: '棋牌室',
key: 'chess',
keyword: '棋牌',
icon: '',
sub: '凑桌开玩'
name: '其他',
key: 'other',
value: 16,
icon: '',
sub: '更多美好'
}],
hotWords: ['🍢 宿舍夜宵拼团', '🎤 KTV四人局还差1人', '💅 周末美甲搭子', '🥩 烤肉套餐同校热拼'],
quickHotWords: ['夜宵', 'KTV', '美甲', '台球', '烤肉', '资料'],
@ -374,9 +366,15 @@
},
switchTab(item) {
this.checkedTab = item.key
this.searchForm.keyWord = item.keyword
this.searchForm.shopType = item.value || ''
this.resetList()
this.searchForm.keyWord = ''
if (item.isStudentOnly) {
this.searchForm.shopType = ''
this.$set(this.searchForm, 'isStudent', 1)
} else {
this.searchForm.shopType = item.value || ''
this.$delete(this.searchForm, 'isStudent')
}
this.getShopList()
},
quickSearch(item) {
@ -408,13 +406,11 @@
this.areaTitle = '区域'
}
} else if (type == 'score') {
this.sortMode = 'score'
this.searchScore = true
this.searchScore = !this.searchScore
this.searchSale = false
this.searchForm.sort = 'shopScore'
} else if (type == 'sale') {
this.sortMode = 'sale'
this.searchSale = true
this.searchSale = !this.searchSale
this.searchScore = false
this.searchForm.sort = 'saleCount'
} else if (type == 'all') {
@ -422,6 +418,10 @@
this.searchForm.sortOrder = 'shoprank'
this.searchForm.orderOrder = 'desc'
this.searchForm.shopArea = ''
this.searchForm.shopType = ''
this.searchForm.keyWord = ''
this.$delete(this.searchForm, 'isStudent')
this.checkedTab = ''
this.searchForm.sort = 'shoprank'
this.areaTitle = '区域'
this.searchScore = false

174
package2/shop/merchantRegister.vue

@ -1,7 +1,12 @@
<template>
<!-- 商家入驻 -->
<view class="page1">
<view class="content" style="border-top: 1px solid #eee;">
<view class="register-hero">
<view class="hero-title">商家入驻</view>
<view class="hero-subtitle">完善资料后提交审核开启校园经营</view>
</view>
<view class="form-wrap">
<view class="content">
<view class="value">
<view class="name">
店铺名称
@ -10,6 +15,15 @@
<input type="text" v-model="formData.shopName" placeholder="输入店铺名称" />
</view>
</view>
<view class="value">
<view class="name">
商家类型
</view>
<view class="text">
<uni-data-select class="uni-data-select" :localdata="merchantTypeList" v-model="formData.merchantType"
:clear="false" placeholder="请选择商家类型"></uni-data-select>
</view>
</view>
<view class="value">
<view class="name">
学生商家
@ -58,8 +72,12 @@
所属区域
</view>
<view class="text" style="text-align: right;">
<uni-data-select class="uni-data-select" :localdata="addressList" v-model="formData.regionId"
placeholder="请选择所属区域" @change="regionChange"></uni-data-select>
<picker :range="addressList" range-key="text" @change="regionChange">
<view class="picker-text" :class="{ placeholder: !formData.region }">
{{ formData.region || '请选择所属区域' }}
<uni-icons type="bottom" size="14" color="#999"></uni-icons>
</view>
</picker>
</view>
</view>
</view>
@ -84,9 +102,9 @@
<view class="name" style="flex: 1;">
验证码
</view>
<view class="text" style="display: flex;width: 340rpx;">
<input type="number" v-model="formData.code" placeholder="请输入验证码" style="width: 200rpx;text-align: center;" />
<view class="code-btn" style="font-size: 24rpx;" size="mini" type="default" @click="sendLoginSms" :disabled="choose" :class="choose == false ? 'hasChosen':'notChosen'">
<view class="text code-row">
<input type="number" v-model="formData.code" placeholder="请输入验证码" />
<view class="code-btn" size="mini" type="default" @click="sendLoginSms" :disabled="choose" :class="choose == false ? 'hasChosen':'notChosen'">
{{ choose ? clock + '重新获取' : '获取验证码' }}
</view>
</view>
@ -177,6 +195,7 @@
</view>
<button @tap.stop="submit()">保存</button>
</view>
<common-loading />
</view>
@ -191,6 +210,13 @@
data() {
return {
addressList:[],
merchantTypeList: [{
value: 1,
text: '外卖商家'
}, {
value: 2,
text: '团购商家'
}],
formData: {
regionId:'',
region:'',
@ -211,6 +237,7 @@
qita:[],
shopImages:'',
id:'',
merchantType:1, //1 2
isStudent:0, //1 0
unionid:''
},
@ -350,25 +377,25 @@
let that = this;
this.tui.request('/app/shopArea/getByParentId/0', 'get', {}, false, false, true).then((res) => {
if (res.code !== 200) return
that.addressList = res.result.map(item => {
that.addressList = (Array.isArray(res.result) ? res.result : []).map(item => {
return {
value: item.id,
text: item.title
text: item.title || item.name || item.regionName || item.areaName || '未命名区域'
}
})
console.log(that.addressList)
})
},
regionChange(e){
for (let i = 0; i < this.addressList.length; i++) {
if (this.addressList[i].value == e) {
this.formData.regionId = e;
this.formData.region = this.addressList[i].text
}
const index = e.detail.value
const region = this.addressList[index]
if (region) {
this.formData.regionId = region.value;
this.formData.region = region.text
}
console.log(this.region)
},
sendLoginSms(){ //
if (this.choose) return
this.isChoose = false
if(reg(this.formData.mobile,this.clock) && this.isChoose == false){
this.choose = true
@ -441,43 +468,108 @@
page,.page1{
font-size: 24rpx;
width: 100%;
height: 100%;
background: rgba(247, 248, 248, 0.6);
min-height: 100%;
background: #F5F8F5;
color: #00231C;
overflow: scroll;
}
.register-hero{
width: 100%;
height: 280rpx;
padding: 88rpx 34rpx 0;
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat;
background-size: cover;
box-sizing: border-box;
}
.hero-title{
font-size: 44rpx;
line-height: 64rpx;
font-weight: 700;
}
.hero-subtitle{
margin-top: 10rpx;
font-size: 26rpx;
color: rgba(0, 35, 28, 0.68);
}
.form-wrap{
width: 94%;
margin: -42rpx auto 0;
padding-bottom: 24rpx;
position: relative;
z-index: 2;
}
.content{
width: 100%;
height: auto;
background: #fff;
margin-bottom: 20rpx;
margin-bottom: 22rpx;
border-radius: 18rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 35, 28, 0.06);
overflow: hidden;
}
.value{
width: 100%;
height: 80rpx;
min-height: 92rpx;
display: flex;
line-height: 80rpx;
border-top: 1px solid #eee;
padding: 0 20rpx;
align-items: center;
line-height: 92rpx;
border-top: 1px solid #eef2ef;
padding: 0 24rpx;
box-sizing: border-box;
}
.value:first-child{
border-top: none;
}
.name{
width: 20%;
width: 180rpx;
font-size: 28rpx;
font-weight: 600;
color: #00231C;
}
.text{
width: 80%;
flex: 1;
min-width: 0;
}
.text input{
height: 80rpx;
line-height: 80rpx;
height: 92rpx;
line-height: 92rpx;
text-align: right;
font-size: 28rpx;
}
.text textarea{
width: 100%;
height: 120rpx;
line-height: 40rpx;
padding-top:20rpx;
text-align: right;
font-size: 28rpx;
}
.picker-text{
min-height: 92rpx;
line-height: 92rpx;
font-size: 28rpx;
color: #333;
white-space: nowrap;
}
.picker-text.placeholder{
color: #6a6a6a;
}
.code-row{
display: flex;
align-items: center;
width: 360rpx;
}
.code-row input{
flex: 1;
min-width: 0;
height: 92rpx;
line-height: 92rpx;
text-align: center;
}
.upload-img {
width: 180rpx;
height: 180rpx;
border-radius: 16rpx;
}
.red-dot{
width: 40rpx;
@ -496,28 +588,29 @@
height: 90rpx;
line-height: 90rpx;
font-size: 36rpx;
color: #fff;
background: #5fd9ee;
color: #00231C;
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
border-radius: 20rpx;
margin: 40rpx auto;
font-weight: 700;
box-shadow: 0 10rpx 24rpx rgba(0, 35, 28, 0.12);
}
.hasChosen{
height: 74rpx;
line-height: 74rpx;
color: #fff;
color: #A6FFEA;
border: none;
background: #5fd9ee;
background: #00231C;
}
.code-btn{
font-size: 24rpx;
background: #00BFFF;
color: #fff;
background: #00231C;
color: #A6FFEA;
height: 60rpx;
line-height: 60rpx;
border-radius: 20rpx;
padding: 0 10rpx;
margin-top: 10rpx;
width: 140rpx;
flex: 0 0 170rpx;
width: 170rpx;
text-align: center;
white-space: nowrap;
}
.uni-select{
border: none !important;
@ -526,4 +619,13 @@
.uni-stat__select {
height: 100% !important;
}
.uni-data-select{
text-align: right;
}
.uni-data-select .uni-select{
justify-content: flex-end;
}
.uni-data-select .uni-select__input-text{
text-align: right;
}
</style>
Loading…
Cancel
Save