diff --git a/components/.DS_Store b/components/.DS_Store
deleted file mode 100644
index ba9865c..0000000
Binary files a/components/.DS_Store and /dev/null differ
diff --git a/components/CustomNavBar.vue b/components/CustomNavBar.vue
deleted file mode 100644
index cff4dac..0000000
--- a/components/CustomNavBar.vue
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/components/commonTitle.vue b/components/commonTitle.vue
deleted file mode 100644
index c9655a7..0000000
--- a/components/commonTitle.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
- {{title}}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/components/customs.vue b/components/customs.vue
deleted file mode 100644
index cff4dac..0000000
--- a/components/customs.vue
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/components/shaiXuan.vue b/components/shaiXuan.vue
deleted file mode 100644
index e778e3e..0000000
--- a/components/shaiXuan.vue
+++ /dev/null
@@ -1,373 +0,0 @@
-
-
-
- 品牌
-
-
-
-
- 啤酒风格
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 全部
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
- 全部
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
- 全部
-
-
- {{ item.name }}
-
-
-
-
- 重置
- 确认
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/components/shaiXuans.vue b/components/shaiXuans.vue
deleted file mode 100644
index ec1b0ad..0000000
--- a/components/shaiXuans.vue
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 58f9323..df850ff 100644
--- a/pages.json
+++ b/pages.json
@@ -100,14 +100,6 @@
}
},
- {
- "path" : "pages/index/home",
- "style" :
- {
- "navigationBarTitleText" : ""
- }
- },
-
{
"path" : "pages/index/review",
"style" :
@@ -291,7 +283,9 @@
"path" : "coinCollect",
"style" :
{
- "navigationBarTitleText" : "品牌啤酒币"
+ "navigationBarTitleText" : "品牌啤酒币",
+ "navigationBarBackgroundColor": "#19367A",
+ "navigationBarTextStyle": "white"
}
},
{
diff --git a/pages/activityList/index.vue b/pages/activityList/index.vue
index f5cdbda..34d065e 100644
--- a/pages/activityList/index.vue
+++ b/pages/activityList/index.vue
@@ -49,12 +49,10 @@
import {
listFeaturePage
} from '@/api/platform.js'
- import commonTitle from '@/components/commonTitle.vue'
import rowBeer from '@/components/rowBeer.vue'
export default {
components: {
- commonTitle,
rowBeer,
},
data() {
diff --git a/pages/index/home.vue b/pages/index/home.vue
deleted file mode 100644
index 0168a35..0000000
--- a/pages/index/home.vue
+++ /dev/null
@@ -1,533 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.beerName }}
-
-
-
-
-
-
- 品牌名称
- {{ item.launchDate }}
-
-
- 4.9
-
- 20 条评论
-
-
-
-
-
-
-
-
-
-
-
-
- 新酒上市
-
-
-
-
-
- 生成酒单
-
-
-
-
-
- 酒币换购
-
-
-
-
-
- 关注厂牌
-
-
-
-
-
-
-
-
-
-
- {{ item.pageName }}
- {{ item.subTitle}}
-
-
-
-
-
-
- {{ it.beerName}}
- {{ it.beerStyles }}
- {{ it.brandName }}
-
-
-
- {{ it.beerOverallRating || 0 }}({{ it.beerReviewsCount || 0}})
-
-
-
-
-
- 入驻助理在线服务,1对1咨询入驻权益和使用指南!
- 立即添加
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 049ecd6..f6b070d 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -114,13 +114,11 @@
import {
listFeaturePage
} from '@/api/platform.js'
- import commonTitle from '@/components/commonTitle.vue'
import loginPopup from '@/components/loginPopup.vue';
import rowBeer from '@/components/rowBeer.vue'
import ActivityItem from '@/components/ActivityItem.vue'
export default {
components: {
- commonTitle,
loginPopup,
rowBeer,
ActivityItem
@@ -199,122 +197,78 @@
methods: {
loginSuccess() {
this.userInfo = uni.getStorageSync('userInfo')
-
- if (this.userInfo == null || this.userInfo.userType == '09') { // 没登录或者没认证门店
- console.log('登录')
- this.showJoinImg = true
- } else {
- this.showJoinImg = false
- }
+ this.showJoinImg = !this.userInfo || this.userInfo.userType === '09'
+ this.resetAndLoadData()
},
- // 重置并加载数据
+ // 重置数据并重新加载
resetAndLoadData() {
this.pageNum = 1
- this.finished = false
this.featurePageList = []
+ this.finished = false
this.getActivityList()
},
// 获取活动列表
async getActivityList() {
if (this.loading || this.finished) return
+ this.loading = true
try {
- this.loading = true
const res = await getActivities({
pageNum: this.pageNum,
- pageSize: this.pageSize
+ pageSize: this.pageSize,
+ keyword: this.keyword
})
- if (res.code === 200) {
- const { rows, total } = res
-
- // 处理数据,计算剩余天数和状态
- const processedRows = this.processActivityData(rows)
-
- // 更新列表数据
+ if (res.rows && res.rows.length > 0) {
if (this.pageNum === 1) {
- this.featurePageList = processedRows
+ this.featurePageList = res.rows
} else {
- this.featurePageList = [...this.featurePageList, ...processedRows]
+ this.featurePageList = [...this.featurePageList, ...res.rows]
}
-
- this.total = total
- this.finished = this.featurePageList.length >= total
+ this.total = res.total
this.pageNum++
+
+ // 判断是否加载完成
+ if (this.featurePageList.length >= this.total) {
+ this.finished = true
+ }
+ } else {
+ this.finished = true
}
} catch (error) {
console.error('获取活动列表失败:', error)
+ uni.showToast({
+ title: '加载失败',
+ icon: 'none'
+ })
} finally {
this.loading = false
}
},
- // 处理活动数据
- processActivityData(rows) {
- return rows.map(it => {
- // 计算剩余天数
- const targetDate = new Date(it.endDate)
- const currentDate = new Date()
- const timeDiff = targetDate.getTime() - currentDate.getTime()
- const remainingDays = Math.ceil(timeDiff / (1000 * 3600 * 24))
-
- // 设置活动状态
- let activityState = 'recruiting'
- if (remainingDays <= 0) {
- activityState = 'completed'
- } else if (it.activityStatus === 2) {
- activityState = 'in_progress'
- } else if (it.activityStatus === 3) {
- activityState = 'completed'
- }
-
- return {
- ...it,
- remainingDays,
- activityState,
- remainingBeerCount: it.remainingBeerCount || 0,
- barAwardStatus: it.barAwardStatus || 0
- }
- })
- },
- // 修改页面加载更多方法
- async changePage() {
- if (!this.finished) {
- await this.getActivityList()
+ // 加载更多
+ changePage() {
+ if (!this.loading && !this.finished) {
+ this.getActivityList()
}
},
+ // 更多热门活动
+ moreHotActivity() {
+ uni.navigateTo({
+ url: '/pages/activityList/activityList'
+ })
+ },
+ // 处理活动点击
handleActivityClick(item) {
- console.log('handleActivityClick called', item)
uni.navigateTo({
- url: "/pagesActivity/activityDetail?id=" + item.id
+ url: `/pages/activityList/details?id=${item.id}`
})
},
- handlePopupChange(e) {
- if (e && e.detail) {
- this.currentAdIndex = e.detail.current;
- }
- },
- handleAdSwiperChange(e) {
- if (e && e.detail) {
- this.currentAdIndex = e.detail.current;
- }
- },
- toAddAiad() {
+ // 跳转酒评页
+ toReview(it) {
uni.navigateTo({
- url: '/pagesMy/addAiad'
+ url: "/pages/index/review?beerId=" + it.id
})
},
- // 搜索
- toSearch() {
- uni.navigateTo({
- url: '/pagesActivity/homeSearch',
- success: () => {
- uni.$emit('openKeyboard')
- }
- })
- },
- changeTag(index) {
- this.curTag = index
- },
// 查询广告弹窗 banner列表
getBannerListFun() {
this.ADList = []
@@ -331,26 +285,18 @@
}
})
- // 检查是否需要显示开屏广告
- this.checkShowAD()
+ let showHomeAD = uni.getStorageSync('showHomeAD')
+ if (!showHomeAD) {
+ this.$refs.ADRef.open()
+ }
})
},
- // 检查是否需要显示开屏广告
- checkShowAD() {
- if (this.ADList.length === 0) return
-
- const currentSession = uni.getStorageSync('currentSession')
- const newSession = Date.now()
-
- // 每次打开小程序都显示广告
- if (!currentSession || currentSession !== newSession) {
- this.$refs.ADRef.open()
- // 记录本次会话时间
- uni.setStorageSync('currentSession', newSession)
- }
- },
// 关闭广告
closeAd() {
+ uni.setStorageSync('showHomeAD', true)
+ uni.setTabBarStyle({
+ backgroundColor: '#ffffff'
+ })
this.$refs.ADRef.close()
},
handleAD(item) {
@@ -361,62 +307,54 @@
})
}
},
- // 跳转专辑页
- toFeaturePage(item) {
+ // 立即认证门店
+ toJoin() {
+ if (!this.bannerJoin) return
uni.navigateTo({
- url: `/pages/index/featureInfo?id=${item.id}`
+ url: this.bannerJoin.bannerLink,
})
},
- // 查询专辑页列表
- getFeaturePageListFun() {
- listFeaturePage().then(res => {
- this.featurePageList = res.data
- })
- },
- // 跳转酒评页
- toReview(it) {
+ // 搜索
+ toSearch() {
uni.navigateTo({
- url: "/pages/index/review?beerId=" + it.id
+ url: '/pagesActivity/homeSearch'
})
},
- toGo(key) {
- switch (key) {
+ // 导航跳转
+ toGo(index) {
+ switch(index) {
case 1: // 新酒上市
uni.navigateTo({
- url: "/pages/index/newBeer"
+ url: '/pages/index/newBeer'
})
break;
case 2: // 生成酒单
uni.navigateTo({
- url: "/pagesActivity/winelist"
+ url: '/pages/index/featureInfo'
})
break;
- case 3: //酒币换购
+ case 3: // 酒币换购
uni.navigateTo({
- url: "/pagesCoin/beerCoin"
+ url: '/pagesCoin/beerCoin'
})
break;
- case 4: // 关注酒厂
+ case 4: // 关注厂牌
uni.navigateTo({
- url: '/pagesMy/myAttention'
+ url: '/pages/index/myJoin'
})
break;
}
},
- // 更多热门活动
- moreHotActivity() {
- uni.navigateTo({
- url: "/pages/activityList/activityList"
- })
- },
- search() {
- // 实现搜索逻辑
- console.log('搜索关键词:', this.keyword);
- },
- changeSearch() {
- // 实现搜索逻辑
- console.log('搜索关键词:', this.keyword);
+ // 处理广告轮播切换
+ handleAdSwiperChange(e) {
+ this.currentAdIndex = e.detail.current
},
+ // 处理弹窗状态变化
+ handlePopupChange(e) {
+ if (!e.show) {
+ this.closeAd()
+ }
+ }
}
}
diff --git a/pages/index/indexOld.vue b/pages/index/indexOld.vue
deleted file mode 100644
index 128f740..0000000
--- a/pages/index/indexOld.vue
+++ /dev/null
@@ -1,542 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 新酒上市
-
-
-
-
-
- 生成酒单
-
-
-
-
-
- 酒币换购
-
-
-
-
-
- 关注厂牌
-
-
-
-
-
-
-
-
-
-
- {{ item.pageName }}
- {{ item.subTitle}}
-
-
-
-
-
-
-
- 入驻助理在线服务,1对1咨询使用指南~
- 立即添加
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/index/newBeerOld.vue b/pages/index/newBeerOld.vue
deleted file mode 100644
index 1e40242..0000000
--- a/pages/index/newBeerOld.vue
+++ /dev/null
@@ -1,223 +0,0 @@
-
-
-
-
- 新酒上市
-
-
-
- {{ it.month}}月
- 共{{ it.beerCount}}款
-
-
-
-
-
-
-
- 全部风格
-
-
-
-
- {{ it.launchDate.slice(8, 10)}}/{{ it.launchDate.slice(5, 7)}}月
-
-
-
-
-
-
-
- {{it.beerName}}
-
- {{ it.beerStyles}}
-
- {{ it.brandName}}
-
-
-
-
-
-
-
- 更多新品发布信息,敬请关注更新~
-
-
-
-
-
-
-
- {{ item.beerStyles}}
-
-
-
-
- 清除筛选
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/index/searchBeer.vue b/pages/index/searchBeer.vue
index 03bbf29..3da81ed 100644
--- a/pages/index/searchBeer.vue
+++ b/pages/index/searchBeer.vue
@@ -131,7 +131,6 @@
-
-
\ No newline at end of file
diff --git a/pagesActivity/homeSearch.vue b/pagesActivity/homeSearch.vue
index 65cae00..b59e4d3 100644
--- a/pagesActivity/homeSearch.vue
+++ b/pagesActivity/homeSearch.vue
@@ -678,7 +678,7 @@
// 跳转到添加新酒款页面
toNewBeer() {
uni.navigateTo({
- url: '/pages/index/addBeer'
+ url: '/pagesActivity/newWine'
})
}
},
diff --git a/pagesActivity/myActivityDetail.vue b/pagesActivity/myActivityDetail.vue
index e255673..95c47c8 100644
--- a/pagesActivity/myActivityDetail.vue
+++ b/pagesActivity/myActivityDetail.vue
@@ -181,11 +181,9 @@
confirmPayApi
} from '@/api/user.js'
- import process from './components/progress.vue';
import rowBeer from '@/components/rowBeer.vue'
export default {
components: {
- process,
rowBeer
},
data() {
diff --git a/pagesActivity/newWine.vue b/pagesActivity/newWine.vue
index 884a1f6..8bee2f9 100644
--- a/pagesActivity/newWine.vue
+++ b/pagesActivity/newWine.vue
@@ -1,64 +1,118 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 酒款图片
+
+
+
+
+
+ 添加图片
+
+ 请上传酒款图片(必填)
-
-
-
- 酒厂名称
-
-
-
-
- {{item}}
+
+
+
+ 基本信息
+
+
+
+ 酒厂名称
+
+
+
+
+
+
+
+
+ {{item.name}}
+ {{item.description || '已有品牌'}}
+
+
+
+
+
+
+
+
+
+ 酒款名称
+
+
+
+
+
+
+
+
+ {{item.name}}
+ {{item.brewery || '已有酒款'}}
+
+
+
+
+
+
+
+
+
+ 酒精含量
+
+
+
+
+
+
+
+ 简介
+
+
+ {{form.description ? form.description.length : 0}}/72
+
-
-
- 酒款名称
-
+
+
+
+ 确认提交
-
- 酒精含量
-
-
-
- 简介
-
-
-
-
-
-
-
@@ -83,11 +137,16 @@
storefrontPhoto: '', // 门头照
position: '', // 职务
openId: '',
+ description: '', // 简介
},
userInfo: {},
QQMap: null,
- originalList: ['苹果', '香蕉', '橙子', '菠萝', '葡萄', '西瓜'],
- filteredList: [],
+ // 酒厂搜索建议
+ brewerySuggestions: [],
+ // 酒款搜索建议
+ beerSuggestions: [],
+ // 搜索防抖定时器
+ searchTimer: null,
};
},
onLoad({
@@ -105,26 +164,121 @@
}
},
methods: {
- handleSearch() {
- if (this.form.nickName.trim() === '') {
- this.filteredList = this.originalList; // 如果关键词为空,显示全部数据
- return;
- }
-
- // 模糊搜索逻辑
- this.filteredList = this.originalList.filter(item =>
- item.includes(this.form.nickName)
- );
+ // 酒厂名称搜索
+ handleBrewerySearch() {
+ // 清除之前的定时器
+ if (this.searchTimer) {
+ clearTimeout(this.searchTimer);
+ }
+
+ // 设置新的定时器,实现防抖
+ this.searchTimer = setTimeout(() => {
+ const keyword = this.form.nickName.trim();
+ if (keyword === '') {
+ this.brewerySuggestions = [];
+ return;
+ }
+
+ // 调用搜索接口
+ this.searchBreweries(keyword);
+ }, 300);
},
- breweryClick(item){
- this.form.nickName = item
- this.filteredList = []
+
+ // 酒款名称搜索
+ handleBeerSearch() {
+ // 清除之前的定时器
+ if (this.searchTimer) {
+ clearTimeout(this.searchTimer);
+ }
+
+ // 设置新的定时器,实现防抖
+ this.searchTimer = setTimeout(() => {
+ const keyword = this.form.phone.trim();
+ if (keyword === '') {
+ this.beerSuggestions = [];
+ return;
+ }
+
+ // 调用搜索接口
+ this.searchBeers(keyword);
+ }, 300);
},
+
+ // 搜索酒厂(预留接口)
+ searchBreweries(keyword) {
+ // 这里预留接口,后期对接数据库
+ // 示例代码,实际应该调用API
+ /*
+ uni.request({
+ url: base_url + '/api/breweries/search',
+ method: 'GET',
+ data: {
+ keyword: keyword
+ },
+ success: (res) => {
+ if (res.data.code === 200) {
+ this.brewerySuggestions = res.data.data;
+ }
+ }
+ });
+ */
+
+ // 临时模拟数据
+ this.brewerySuggestions = [
+ { id: 1, name: '青岛啤酒', logo: '/static/bg/pc-1.png', description: '中国知名啤酒品牌' },
+ { id: 2, name: '百威啤酒', logo: '/static/bg/pc-1.png', description: '国际知名啤酒品牌' },
+ { id: 3, name: '哈尔滨啤酒', logo: '/static/bg/pc-1.png', description: '中国知名啤酒品牌' }
+ ].filter(item => item.name.includes(keyword));
+ },
+
+ // 搜索酒款(预留接口)
+ searchBeers(keyword) {
+ // 这里预留接口,后期对接数据库
+ // 示例代码,实际应该调用API
+ /*
+ uni.request({
+ url: base_url + '/api/beers/search',
+ method: 'GET',
+ data: {
+ keyword: keyword
+ },
+ success: (res) => {
+ if (res.data.code === 200) {
+ this.beerSuggestions = res.data.data;
+ }
+ }
+ });
+ */
+
+ // 临时模拟数据
+ this.beerSuggestions = [
+ { id: 1, name: '青岛纯生', cover: '/static/bg/pc-1.png', brewery: '青岛啤酒' },
+ { id: 2, name: '百威经典', cover: '/static/bg/pc-1.png', brewery: '百威啤酒' },
+ { id: 3, name: '哈尔滨冰纯', cover: '/static/bg/pc-1.png', brewery: '哈尔滨啤酒' }
+ ].filter(item => item.name.includes(keyword));
+ },
+
+ // 选择酒厂
+ selectBrewery(item) {
+ this.form.nickName = item.name;
+ this.brewerySuggestions = [];
+
+ // 可以在这里添加其他逻辑,如自动填充酒厂相关信息
+ },
+
+ // 选择酒款
+ selectBeer(item) {
+ this.form.phone = item.name;
+ this.beerSuggestions = [];
+
+ // 可以在这里添加其他逻辑,如自动填充酒款相关信息
+ },
+
// 提交
submitForm() {
if (!this.form.barLogo) {
uni.showToast({
- title: '请上传logo',
+ title: '请上传酒款图片',
icon: 'none',
mask: true
})
@@ -132,7 +286,7 @@
}
if (!this.form.nickName) {
uni.showToast({
- title: '请输入昵称',
+ title: '请输入酒厂名称',
icon: 'none',
mask: true
})
@@ -140,7 +294,7 @@
}
if (!this.form.phone) {
uni.showToast({
- title: '请输入联系电话',
+ title: '请输入酒款名称',
icon: 'none',
mask: true
})
@@ -148,75 +302,108 @@
}
if (!this.form.barName) {
uni.showToast({
- title: '请输入门店名称',
+ title: '请输入酒精含量',
icon: 'none',
mask: true
})
return
}
- if (!this.form.address) {
+ if (!this.form.description) {
uni.showToast({
- title: '请输入门店地址',
+ title: '请输入酒款简介',
icon: 'none',
mask: true
})
return
}
- if (!this.form.businessLicense) {
- uni.showToast({
- title: '请上传营业执照',
- icon: 'none',
- mask: true
- })
- return
+
+ // 检查是否选择了已有品牌或酒款
+ const isExistingBrewery = this.brewerySuggestions.some(item => item.name === this.form.nickName);
+ const isExistingBeer = this.beerSuggestions.some(item => item.name === this.form.phone);
+
+ if (isExistingBrewery) {
+ uni.showModal({
+ title: '提示',
+ content: '该酒厂已存在,是否继续提交?',
+ success: (res) => {
+ if (res.confirm) {
+ this.submitData();
+ }
+ }
+ });
+ return;
}
- if (!this.form.storefrontPhoto) {
- uni.showToast({
- title: '请上传门头照',
- icon: 'none',
- mask: true
- })
- return
+
+ if (isExistingBeer) {
+ uni.showModal({
+ title: '提示',
+ content: '该酒款已存在,是否继续提交?',
+ success: (res) => {
+ if (res.confirm) {
+ this.submitData();
+ }
+ }
+ });
+ return;
}
- if (!this.form.position) {
- uni.showToast({
- title: '请输入店内职务',
- icon: 'none',
- mask: true
- })
- return
- }
- if(!this.form.latitude || !this.form.longitude) {
- uni.showToast({
- title: '请通过定位获取位置',
- icon: 'none',
- mask: true,
- })
- return
- }
-
-
+
+ // 直接提交
+ this.submitData();
+ },
+
+ // 提交数据
+ submitData() {
uni.showLoading({
title: '提交中',
mask: true
- })
- barRegister(this.form).then(res => {
- if (res.code == 200) {
- this.userInfo = res.data.register // 暂存用户信息
- uni.setStorageSync('token', res.data.token)
- uni.hideLoading()
- this.$refs.successRef.open()
+ });
+
+ // 这里预留接口,后期对接数据库
+ // 示例代码,实际应该调用API
+ /*
+ uni.request({
+ url: base_url + '/api/beers/add',
+ method: 'POST',
+ data: this.form,
+ success: (res) => {
+ if (res.data.code === 200) {
+ uni.showToast({
+ title: '提交成功',
+ icon: 'success'
+ });
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 1500);
+ } else {
+ uni.showToast({
+ title: res.data.msg || '提交失败',
+ icon: 'none'
+ });
+ }
+ },
+ fail: () => {
+ uni.showToast({
+ title: '提交失败',
+ icon: 'none'
+ });
+ },
+ complete: () => {
+ uni.hideLoading();
}
- }).catch(() => {
- // uni.hideLoading()
- })
-
- },
- toHome() {
- uni.setStorageSync('userInfo', this.userInfo)
- uni.reLaunch({
- url: '/pages/index/index'
- })
+ });
+ */
+
+ // 临时模拟提交成功
+ setTimeout(() => {
+ uni.hideLoading();
+ uni.showToast({
+ title: '提交成功',
+ icon: 'success'
+ });
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 1500);
+ }, 1000);
},
// 上传事件
handleUpload(key) {
@@ -301,90 +488,227 @@
\ No newline at end of file
diff --git a/pagesActivity/scanResultold.vue b/pagesActivity/scanResultold.vue
deleted file mode 100644
index 7666901..0000000
--- a/pagesActivity/scanResultold.vue
+++ /dev/null
@@ -1,652 +0,0 @@
-
-
-
-
- 无效的二维码
- 返回
-
-
-
-
-
-
-
-
- 该桶产品已于 {{ info.qrcode.verifyTime }} 扫码领取返利
-
-
-
-
- 该桶产品已转为赠品
-
-
-
-
-
- 扫码成功!
-
-
-
- 识别产品
-
-
-
-
-
-
- {{ beer.beerName}}
-
-
-
-
-
- {{ beer.brandName}}
- {{ beer.launchDate }}
-
-
- {{ beer.beerOverallRating}}
-
- {{beer.beerReviewsCount}} 条评论
-
-
-
-
-
-
-
-
-
- 品牌福利等你领
-
-
- {{ beer.scanCoinCount}}枚({{beer.brandName}})品牌啤酒币
- 品牌啤酒币可用于兑换好礼
-
-
-
-
-
-
-
-
- 厂牌返利已领取
-
-
- {{ beer.scanCoinCount}}枚({{beer.brandName}})品牌啤酒币已到账
- 品牌啤酒币可用于兑换好礼
-
-
-
- *该产品有多个进行中活动重叠,请选择要计入的活动
-
-
-
-
-
- 距离达成还剩
-
- 已达标
-
- {{ it.remainingBeerCount}}桶
-
-
-
-
- {{ it.activityName }}
- 时间:首次扫码开始累计 {{it.duration}}天内
- 目标:{{ it.beer_scope === 0 ? '全系列酒款' : '以下酒款' }}累积扫码 ≥ {{ it.activityTarget}}桶
-
-
-
-
-
-
- 赠
-
- {{it.activityRewardGoods.goodsName}} * {{it.activityRewardCount}}
- 啤酒币 * {{it.activityRewardCount}}个
-
-
-
-
-
-
-
-
-
- 距离达成还剩
-
- 已达标
-
- {{ it.remainingBeerCount}}桶
-
-
-
-
- {{ it.activityName }}
- 时间:首次扫码开始累计 {{it.duration}}天内
- 目标:{{ it.beer_scope === 0 ? '全系列酒款' : '以下酒款' }}累积扫码 ≥ {{ it.activityTarget}}桶
-
-
-
-
-
-
- 赠
-
- {{it.activityRewardGoods.goodsName}} * {{it.activityRewardCount}}
-
- 啤酒币 * {{it.activityRewardCount}}个
-
-
-
-
-
-
-
-
-
-
- 所有酒款只可领取一次,请确认后操作
-
-
-
-
- 回头再说
-
-
-
- 生成酒单
-
-
-
- 立即领取
-
-
-
- 分享赠品
-
-
-
- 分享上新
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pagesCoin/beerCoin.vue b/pagesCoin/beerCoin.vue
index da2e5f3..15c0dd7 100644
--- a/pagesCoin/beerCoin.vue
+++ b/pagesCoin/beerCoin.vue
@@ -20,6 +20,7 @@
:autoplay="true"
:interval="2000"
circular
+ @click="toCoinCollect"
>
@@ -615,6 +616,13 @@ export default {
} else {
this.isLoadAll = true
}
+ },
+
+ // 跳转到啤酒币收集页面
+ toCoinCollect() {
+ uni.navigateTo({
+ url: '/pagesCoin/coinCollect'
+ })
}
}
}
diff --git a/pagesCoin/coinCollect.vue b/pagesCoin/coinCollect.vue
index 7ddb5d8..6d95cad 100644
--- a/pagesCoin/coinCollect.vue
+++ b/pagesCoin/coinCollect.vue
@@ -1,32 +1,29 @@
-
-
+
-
-
-
-
- {{item.brandName || '--'}}
-
- {{item.goodsNum}}款商品可兑换
+
+
+
+
+
+ {{item.brandName || '--'}}
+ {{item.goodsNum}}款商品可兑换
+
+
+
+ {{item.balance}}
+
-
-
-
- {{item.balance}}
-
- 暂无品牌方啤酒币
+
+
+ 暂无品牌方啤酒币
+
@@ -54,66 +51,108 @@
}
})
},
+ // 跳转到品牌方页面
+ toBrandHome(item) {
+ if (!item || !item.breweryId) return
+ uni.navigateTo({
+ url: `/pages/index/brandHome?breweryId=${item.breweryId}&tab=3`
+ })
+ }
}
}
\ No newline at end of file
diff --git a/pagesCoin/goodsDetail.vue b/pagesCoin/goodsDetail.vue
index d4eaf09..33fd713 100644
--- a/pagesCoin/goodsDetail.vue
+++ b/pagesCoin/goodsDetail.vue
@@ -90,7 +90,7 @@
-
+
立即兑换
@@ -253,6 +253,11 @@
})
}
},
+ },
+ computed: {
+ canRedeem() {
+ return this.isLogin && this.coinBalance.balance && this.coinBalance.balance >= this.detail.redeemedNum
+ }
}
}
@@ -540,6 +545,13 @@
transform: scale(0.98);
box-shadow: 0 2rpx 8rpx rgba(25, 54, 122, 0.1);
}
+
+ &.disabled {
+ background: #CCCCCC;
+ box-shadow: none;
+ pointer-events: none;
+ opacity: 0.6;
+ }
}
}
}
diff --git a/static/Wine Review.svg b/static/Wine Review.svg
deleted file mode 100644
index 1dfc8fb..0000000
--- a/static/Wine Review.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/static/tabbar/.DS_Store b/static/tabbar/.DS_Store
deleted file mode 100644
index 0ccbe02..0000000
Binary files a/static/tabbar/.DS_Store and /dev/null differ