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

27
package2/group/groupBuyList.vue

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

114
package2/group/studentStoreList.vue

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

228
package2/shop/merchantRegister.vue

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