邮储奶茶新增古茗和书亦烧仙草两个品牌
This commit is contained in:
parent
0e381014dc
commit
39f8eeeff6
|
@ -1,9 +1,5 @@
|
|||
NODE_ENV = 'development'
|
||||
# 兴业优酷
|
||||
# VITE_BASE_URL = 'http://192.168.110.50:8083'
|
||||
# 邮储奶茶活动
|
||||
# VITE_BASE_URL = 'http://milk.api.test.86698.cn'
|
||||
# VITE_BASE_URL = 'http://milk.test.api.cdlsxd.cn'
|
||||
VITE_BASE_URL = 'http://milk.test.api.cdlsxd.cn'
|
||||
# 邮储音视频
|
||||
VITE_BASE_URL = 'https://gateway.dev.cdlsxd.cn'
|
||||
# VITE_BASE_URL = 'https://gateway.dev.cdlsxd.cn/ycav'
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
NODE_ENV = 'test'
|
||||
|
||||
# 邮储奶茶活动(测试环境)
|
||||
# VITE_BASE_URL = 'http://milk.test.api.cdlsxd.cn'
|
||||
# VITE_YCNC_MERCH_CODE = '100310100018908'
|
||||
VITE_BASE_URL = 'http://milk.test.api.cdlsxd.cn'
|
||||
VITE_YCNC_MERCH_CODE = '100310100018908'
|
||||
|
||||
|
||||
# 邮储音视频活动(测试环境)
|
||||
VITE_BASE_URL = 'https://gateway.dev.cdlsxd.cn'
|
||||
VITE_YCNC_MERCH_CODE = '100310100018908'
|
||||
# VITE_BASE_URL = 'https://gateway.dev.cdlsxd.cn'
|
||||
# VITE_YCNC_MERCH_CODE = '100310100018908'
|
70
index.html
70
index.html
|
@ -27,43 +27,43 @@
|
|||
eruda.init()
|
||||
</script> -->
|
||||
<script>
|
||||
var clickCount = 0
|
||||
var timer = null
|
||||
var isShow = false
|
||||
function insertScript() {
|
||||
isShow = true
|
||||
// 创建一个新的script元素
|
||||
var src = 'https://fastly.jsdelivr.net/npm/eruda'
|
||||
var script = document.createElement('script')
|
||||
script.type = 'text/javascript'
|
||||
script.src = src
|
||||
// 插入到head中
|
||||
document.head.appendChild(script)
|
||||
script.onload = function () {
|
||||
eruda.init()
|
||||
}
|
||||
}
|
||||
document.addEventListener('click', function () {
|
||||
if (isShow) return false
|
||||
if (clickCount < 6) {
|
||||
clickCount++
|
||||
console.log(`Clicked ${clickCount} times`)
|
||||
// var clickCount = 0
|
||||
// var timer = null
|
||||
// var isShow = false
|
||||
// function insertScript() {
|
||||
// isShow = true
|
||||
// // 创建一个新的script元素
|
||||
// var src = 'https://fastly.jsdelivr.net/npm/eruda'
|
||||
// var script = document.createElement('script')
|
||||
// script.type = 'text/javascript'
|
||||
// script.src = src
|
||||
// // 插入到head中
|
||||
// document.head.appendChild(script)
|
||||
// script.onload = function () {
|
||||
// eruda.init()
|
||||
// }
|
||||
// }
|
||||
// document.addEventListener('click', function () {
|
||||
// if (isShow) return false
|
||||
// if (clickCount < 6) {
|
||||
// clickCount++
|
||||
// console.log(`Clicked ${clickCount} times`)
|
||||
|
||||
// 如果是第一次点击,则开始计时
|
||||
if (clickCount === 1) {
|
||||
timer = setTimeout(() => {
|
||||
clickCount = 0 // 重置点击计数
|
||||
}, 2000)
|
||||
}
|
||||
// // 如果是第一次点击,则开始计时
|
||||
// if (clickCount === 1) {
|
||||
// timer = setTimeout(() => {
|
||||
// clickCount = 0 // 重置点击计数
|
||||
// }, 2000)
|
||||
// }
|
||||
|
||||
// 如果点击次数达到6次,则清除计时器并重置状态
|
||||
if (clickCount >= 6) {
|
||||
clearTimeout(timer)
|
||||
insertScript()
|
||||
clickCount = 0 // 重置点击计数
|
||||
}
|
||||
}
|
||||
})
|
||||
// // 如果点击次数达到6次,则清除计时器并重置状态
|
||||
// if (clickCount >= 6) {
|
||||
// clearTimeout(timer)
|
||||
// insertScript()
|
||||
// clickCount = 0 // 重置点击计数
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -3,6 +3,8 @@ import BW from '/static/ycnc/bg-bwcj.png'
|
|||
import NX from '/static/ycnc/bg-nxdc.png'
|
||||
import CoCo from '/static/ycnc/bg-coco.png'
|
||||
import CBD from '/static/ycnc/bg-cbd.png'
|
||||
import GM from '/static/ycnc/bg-gm.png'
|
||||
import SYSXC from '/static/ycnc/bg-sysxc.png'
|
||||
// import CYYS from '/static/ycnc/bg-cyys.png'
|
||||
|
||||
const config = {
|
||||
|
@ -10,26 +12,43 @@ const config = {
|
|||
name:'蜜雪冰城',
|
||||
src:MX,
|
||||
height:974,
|
||||
order:1
|
||||
},
|
||||
"BW":{
|
||||
name:'霸王茶姬',
|
||||
src:BW,
|
||||
height:974,
|
||||
order:2
|
||||
},
|
||||
"NX":{
|
||||
name:'奈雪的茶',
|
||||
src:NX,
|
||||
height:584,
|
||||
order:5
|
||||
},
|
||||
"CoCo":{
|
||||
name:'CoCo',
|
||||
src:CoCo,
|
||||
height:584,
|
||||
order:6
|
||||
},
|
||||
"CBD":{
|
||||
name:'茶百道',
|
||||
src:CBD,
|
||||
height:584,
|
||||
order:7
|
||||
},
|
||||
"YCGM":{
|
||||
name:'古茗',
|
||||
src:GM,
|
||||
height:584,
|
||||
order:3,
|
||||
},
|
||||
"YCSY":{
|
||||
name:'书亦烧仙草',
|
||||
src:SYSXC,
|
||||
height:584,
|
||||
order:4
|
||||
},
|
||||
// "CYYS":{
|
||||
// name:'茶颜悦色',
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<view class="w-full h-full flex flex-col">
|
||||
<scroll-view scroll-y class="w-full h-full overflow-y-auto flex-1">
|
||||
<view class="container">
|
||||
<image class="banner" :src="detailObj.main_image"></image>
|
||||
<image class="banner" :src="detailObj.main_image" @click="testEvent"></image>
|
||||
<view class="detail flex flex-col flex-justify-between">
|
||||
<view class="proname">{{ detailObj.name }}</view>
|
||||
<view class="num">
|
||||
|
@ -89,6 +89,29 @@
|
|||
console.log(err);
|
||||
})
|
||||
}
|
||||
|
||||
var clickCount = 0
|
||||
var timer = null
|
||||
const testEvent = () => {
|
||||
if (clickCount < 6) {
|
||||
clickCount++
|
||||
console.log(`Clicked ${clickCount} times`)
|
||||
|
||||
// 如果是第一次点击,则开始计时
|
||||
if (clickCount === 1) {
|
||||
timer = setTimeout(() => {
|
||||
clickCount = 0 // 重置点击计数
|
||||
}, 2000)
|
||||
}
|
||||
|
||||
// 如果点击次数达到6次,则清除计时器并重置状态
|
||||
if (clickCount >= 6) {
|
||||
clearTimeout(timer)
|
||||
clickCount = 0 // 重置点击计数
|
||||
window.location.href = 'https://22233.cn/AAALM4HwLrAfdSCx'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
|
|
|
@ -98,7 +98,12 @@
|
|||
getProductList({params}).then(res => {
|
||||
const {milkList,
|
||||
milkVoucherList} = res
|
||||
productList.value = handleData(milkList,milkVoucherList);
|
||||
const sortMilkList = milkList.sort((a,b)=>{
|
||||
const orderA = config[a.brandFlag] ? config[a.brandFlag].order : Infinity;
|
||||
const orderB = config[b.brandFlag] ? config[b.brandFlag].order : Infinity;
|
||||
return orderA - orderB
|
||||
})
|
||||
productList.value = handleData(sortMilkList,milkVoucherList);
|
||||
}).catch(err=>{
|
||||
console.log(err);
|
||||
})
|
||||
|
|
|
@ -113,12 +113,13 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, unref, onMounted, nextTick } from "vue";
|
||||
import { ref, reactive, unref, onMounted } from "vue";
|
||||
import {onLoad} from "@dcloudio/uni-app";
|
||||
// import ticketRecieve from './components/ticket-recieve.vue';
|
||||
import member from "./components/member.vue";
|
||||
import rechargeItem from "./components/recharge-item.vue";
|
||||
import { getBrandList, getProductList, login } from "@/api/ycysp";
|
||||
// import { generateUUID } from "@/utils/utils";
|
||||
import { generateUUID,getQueryString } from "@/utils/utils";
|
||||
import { createOrder } from "@/api/ycysp";
|
||||
import useCode from "./hooks/useCode";
|
||||
// const reg =
|
||||
|
@ -135,9 +136,10 @@ const getBrand = () => {
|
|||
return getBrandList()
|
||||
.then((res) => {
|
||||
const { list } = res;
|
||||
const is_anchor_brand_id = getQueryString('brand_id')
|
||||
brandArr.value = list.map((item, index) => ({
|
||||
...item,
|
||||
isChecked: index === 0,
|
||||
isChecked: is_anchor_brand_id ? item.id === Number(is_anchor_brand_id) : index === 0,
|
||||
}));
|
||||
setTimeout(()=>{
|
||||
scrollLeft.value = 60
|
||||
|
@ -156,9 +158,10 @@ const getProduct = () => {
|
|||
getProductList({ params })
|
||||
.then((res) => {
|
||||
const { list } = res;
|
||||
const is_anchor_product_id = getQueryString('product_id')
|
||||
productArr.value = list.map((item, index) => ({
|
||||
...item,
|
||||
isSelected: index === 0,
|
||||
isSelected: is_anchor_product_id ? item.id === Number(is_anchor_product_id) : index === 0,
|
||||
}));
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -239,6 +242,11 @@ const toOrder = () => {
|
|||
});
|
||||
};
|
||||
|
||||
onLoad((options) => {
|
||||
const {brand_id,product_id} = options;
|
||||
console.log(options)
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
await getBrand();
|
||||
getProduct();
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Loading…
Reference in New Issue