Compare commits

...

2 Commits

3 changed files with 45 additions and 41 deletions

View File

@ -18,32 +18,32 @@ import { parseQuery } from "./utils";
import Auth from './libs/wechat'; import Auth from './libs/wechat';
import { SPREAD } from './config/cache'; import { SPREAD } from './config/cache';
Vue.prototype.$wechat = Auth; Vue.prototype.$wechat = Auth;
let cookieName = "VCONSOLE", // let cookieName = "VCONSOLE",
query = parseQuery(), // query = parseQuery(),
urlSpread = query["spread"], // urlSpread = query["spread"],
vconsole = query[cookieName.toLowerCase()], // // vconsole = query[cookieName.toLowerCase()],
md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式 // vconsole = "b14d1e9baeced9bb7525ab19ee35f2d2",
md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式 // md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式
// md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
if (urlSpread !== undefined) { // if (urlSpread !== undefined) {
var spread = Cache.get(SPREAD); // var spread = Cache.get(SPREAD);
urlSpread = parseInt(urlSpread); // urlSpread = parseInt(urlSpread);
if (!Number.isNaN(urlSpread) && spread !== urlSpread) { // if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
Cache.set("spread", urlSpread || 0); // Cache.set("spread", urlSpread || 0);
} else if (spread === 0 || typeof spread !== "number") { // } else if (spread === 0 || typeof spread !== "number") {
Cache.set("spread", urlSpread || 0); // Cache.set("spread", urlSpread || 0);
} // }
} // }
if (vconsole !== undefined) { // if (vconsole !== undefined) {
if (vconsole === md5UnCrmeb && Cache.has(cookieName)) // if (vconsole === md5UnCrmeb && Cache.has(cookieName))
Cache.clear(cookieName); // Cache.clear(cookieName);
} else vconsole = Cache.get(cookieName); // } else vconsole = Cache.get(cookieName);
import VConsole from './components/vconsole.min.js' import VConsole from './components/vconsole.min.js'
if (vconsole !== undefined && vconsole === md5Crmeb) { if (process.env.isVConsole) {
Cache.set(cookieName, md5Crmeb, 3600);
let vConsole = new VConsole(); let vConsole = new VConsole();
} }

View File

@ -20,6 +20,7 @@
"title": "开发版", "title": "开发版",
"env": { "env": {
"UNI_PLATFORM": "h5", "UNI_PLATFORM": "h5",
"isVConsole": true,
"APP_BASE_URL": "http://192.168.1.147:48080" "APP_BASE_URL": "http://192.168.1.147:48080"
} }
}, },
@ -27,6 +28,7 @@
"title": "生产版", "title": "生产版",
"env": { "env": {
"UNI_PLATFORM": "h5", "UNI_PLATFORM": "h5",
"isVConsole": false,
"APP_BASE_URL": "http://api.cyywl.top" "APP_BASE_URL": "http://api.cyywl.top"
} }
} }

View File

@ -40,7 +40,7 @@
<view class="right"> <view class="right">
<view class="search"> <view class="search">
<view class="icon"> <view class="icon">
</view> </view>
<view class="input"> <view class="input">
<u--input <u--input
@ -74,12 +74,12 @@
<view class="item" v-for="item in productList" @click="goDetail(item)"> <view class="item" v-for="item in productList" @click="goDetail(item)">
<image :src="item.image" mode=""></image> <image :src="item.image" mode=""></image>
<view class="name">{{item.storeName}}</view> <view class="name">{{item.storeName}}</view>
<text><u--text color="#E50202" mode="price" :text="item.price"></u--text></text> <text><u--text color="#E50202" mode="price" :text="item.price"></u--text></text>
</view> </view>
</view> </view>
<view class="" style="margin-top: 110rpx;"> <view class="" style="margin-top: 110rpx;">
</view> </view>
</view> </view>
</template> </template>
@ -107,13 +107,13 @@
import { import {
getTemlIds getTemlIds
} from '@/api/api.js'; } from '@/api/api.js';
// import { // import {
// SUBSCRIBE_MESSAGE, // SUBSCRIBE_MESSAGE,
// TIPS_KEY // TIPS_KEY
// } from '@/config/cache'; // } from '@/config/cache';
// #endif // #endif
// #ifdef H5 // #ifdef H5
import { import {
follow follow
} from '@/api/public.js'; } from '@/api/public.js';
@ -366,17 +366,17 @@
go(){ go(){
console.log(this.productList,'------') console.log(this.productList,'------')
}, },
// banneruserInfo // banneruserInfo
getBanners(){ getBanners(){
// console.log(this.$store.tenantId,'tenantId') // console.log(this.$store.tenantId,'tenantId')
getBanner().then(res=>{ getBanner().then(res=>{
this.bannerList = res.data.list[0] this.bannerList = res.data.list[0]
console.log(this.bannerList,'banner') console.log(this.bannerList,'banner')
}) })
console.log(this.userInfo.userId,'userInfo111111') console.log(this.userInfo.userId,'userInfo111111')
}, },
getCoupon: function(id, index) { getCoupon: function(id, index) {
let that = this; let that = this;
@ -483,7 +483,7 @@
this.getGroomList(); this.getGroomList();
this.shareApi(); this.shareApi();
this.getcouponList(); this.getcouponList();
// #ifdef H5 // #ifdef H5
// that.subscribe = res.data.subscribe; // that.subscribe = res.data.subscribe;
// #endif // #endif
@ -625,7 +625,7 @@
get_host_product: function() { get_host_product: function() {
let that = this; let that = this;
that.loading = true; that.loading = true;
if (that.hotScroll) return if (that.hotScroll) return
getProductHot( getProductHot(
that.hotPage, that.hotPage,
@ -644,7 +644,9 @@
// H5 // H5
let appSearchH = uni.createSelectorQuery().select(".serch-wrapper"); let appSearchH = uni.createSelectorQuery().select(".serch-wrapper");
appSearchH.boundingClientRect(function(data) { appSearchH.boundingClientRect(function(data) {
self.searchH = data.height if(data){
self.searchH = data.height
}
}).exec() }).exec()
// #endif // #endif
}, },
@ -712,13 +714,13 @@
.left { .left {
width: 164rpx; width: 164rpx;
height: 164rpx; height: 164rpx;
.image { .image {
border: 3rpx solid #EE5423; border: 3rpx solid #EE5423;
border-radius: 50%; border-radius: 50%;
border: linear-gradient(0deg, #F77C4D, #EE5423); border: linear-gradient(0deg, #F77C4D, #EE5423);
} }
} }
.center { .center {
width: 330rpx; width: 330rpx;
@ -797,7 +799,7 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.hot { .hot {
width: 663rpx; width: 663rpx;
@ -806,7 +808,7 @@
margin-left: 44rpx; margin-left: 44rpx;
background: #fff; background: #fff;
border-radius: 20rpx; border-radius: 20rpx;
.contain { .contain {
width: 100%; width: 100%;
height: 1rpx; height: 1rpx;
@ -938,7 +940,7 @@
background: #fff; background: #fff;
overflow: hidden; overflow: hidden;
border-radius: 20rpx; border-radius: 20rpx;
image { image {
width: 100%; width: 100%;
height: 294rpx; height: 294rpx;
@ -966,7 +968,7 @@
} }
.car { .car {
position: absolute; position: absolute;
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
background: url(@/static/images/shop/car.png); background: url(@/static/images/shop/car.png);
@ -978,11 +980,11 @@
::v-deep .notice{ ::v-deep .notice{
.u-icon__icon { .u-icon__icon {
color: #FF4802 !important; color: #FF4802 !important;
span { span {
font-size: 28rpx; font-size: 28rpx;
} }
} }
} }
</style> </style>