1.新增优选商品功能

yj-dev
杨杰 3 years ago
parent 387d1d097d
commit 7a15c4a229
  1. 16
      App.vue
  2. 22
      pages.json
  3. 77
      pages/tabBar/home/home.vue
  4. 82
      subPages/brand-classification/brand-classification.vue
  5. 81
      subPages/preferred-goods/preferred-goods.vue
  6. 35
      uni.scss

@ -5,15 +5,15 @@
// brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/',
//
url: 'https://hsg.dctpay.com/crest',
imgUrl: 'https://hsg.dctpay.com/filesystem/',
brestUrl : 'https://hsg.dctpay.com/brest',
imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
// url: 'https://hsg.dctpay.com/crest',
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
// brestUrl : 'https://hsg.dctpay.com/brest',
// imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
//
// url: 'https://hsgcs.dctpay.com/crest',
// brestUrl : 'https://hsgcs.dctpay.com/brest',
// imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
// imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
url: 'https://hsgcs.dctpay.com/crest',
brestUrl : 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
userInfo: "",
brestUserInfo : '',
openId: '',

@ -467,6 +467,28 @@
"subpackages": [{
"root": "subPages",
"pages": [{
"path": "brand-classification/brand-classification",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "品牌分类",
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white"
}
},{
"path": "preferred-goods/preferred-goods",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "商品分类",
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white"
}
},{
"path": "lottery/lottery",
"style": {
"enablePullDownRefresh": false,

@ -17,15 +17,6 @@
<input placeholder="搜索门店" placeholder-style="color:#c0c0c0;" @tap="toSearch()" />
<view class="icon search"></view>
</view>
<!-- 右侧图标按钮 -->
<!-- <view class="icon-btn"> -->
<!-- <view class="icon yuyin-home"></view> -->
<!-- <button open-type="contact" class="icon" show-message-card session-from send-message-path send-message-title> -->
<!-- <image style="width: 30px;height: 30px;" @click="toScan"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAGv0lEQVR4Xu2dgXHUSBBFWxFABuAIgAjgIsBEwBEBvRHgi2D7IsCO4EwEQARnIjgcARCBrj43WyV0s961u1vWSH+qXK6yd1rdv59Go1lNqxO2VSvQrTp6Bi8EYOUQEAACsHIFVh4+RwACsHIFVh4+RwACsHIFVh4+RwACsHIFVh4+RwACsHIFVh4+RwACsHIFVh4+RwACkKuAqj7uuu553/enIvJQRF4kHvGriPxhZucZx1DV30XknYg8zrBfbH4Ske9d1132ff/ZzBBTWksbAZD4IhZEm7qdRAtX4vln6kBEBDAD6hQQUgAoZ8r7exBrd8jfzAxnUlhTVYxcH8MM3t7Qm4yRLRwAVUXi7+OsH0q6RAAQ37mZvbk9O/t7hAIwk+R/MDPMN8Kbql6KyMtww7czGApBGABHDPvXInJVfkKH56F+0UP/ODflUnC7lB3/aVxmnpafRzd0C7schABwYIL0Q0TOzMyO14GfVFWFbiLyYI8aIRPdKAAwU31dcfSLiJxmzWCXjomqYjSAtk8qsV6YmXuu5QbghrMfZ/5TJt+HaYEAl8zaSOAeBSIAwFC1rYS54bDvS/6ud7kc1DR2zwUiAKjNjK/NLHO1LEbZhqyoKhaCxhND9x1PBAAYnp6PtHQ71lBuJnF1zy0olopdS+sRAPQVBbB0iRksW5ACqgo98T3EL83MXDl0dYYnqloDIHwlLkjHZs2oKha3/iIAzabQ5/i+7yI4Avh0baY3AWgmVTmOEoAcXZuxSgCaSVWOowQgR9dmrBKAZlK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bve5xU+94L6D77IWkYAGUUgLM42x9U8oW/Y0S46roOoKS07XaLEqtpbbPZZJW8fdj3PWoA7H5uqrDuvvbvBAoFoECAAJDgGgRpiRkYvjSzVxkHUlUsxNz37W3I0J8GwGAkqF0OMvJSsxm+ErlvKXaqgMpxQpMffgkYilHeconbl/+tXk0g2hIBCBv2h/qHXwLGycX7gkQEk5nxcnEmByETpBHQtVvdzBh2ti+gX9adVDoAuyjKiPCiXEMhJiaM4zsGr6DXRSwsTIW38v4jwJz5AixMYrGGgqVfvB849RZ6MgDCs0GDIQoQgBAZ2zVCANrNXYjnBCBExnaNEIB2cxfiOQEIkbFdIwSg3dyFeE4AQmRs1wgBaDd3IZ4TgBAZ2zVCANrNXYjnBCBExnaNEIB2cxfiOQEIkbFdIwSg3dyFeE4AQmRs18i/zMYNrphXcJEAAAAASUVORK5CYII=">
</image> -->
<!-- </button> -->
<!-- </view> -->
</view>
<!-- 占位 -->
<view v-if="showHeader" class="place"></view>
@ -160,7 +151,7 @@
homeCateList: [],
//
cpStuats: 1,
jumpType:''
jumpType: ''
};
},
@ -230,7 +221,7 @@
fail: res => {}
})
// #endif
if(JSON.stringify(options.id)){
if (JSON.stringify(options.id)) {
app.globalData.identificationCode = options.id;
return;
}
@ -312,13 +303,13 @@
* 跳转外链
*/
jumpWeb() {
if(this.jumpType == 1){
if (this.jumpType == 1) {
if (this.webUrl) {
uni.navigateTo({
url: '../order/webUrl/webUrl?url=' + this.webUrl
})
}
}else{
} else {
uni.navigateTo({
url: this.webUrl
})
@ -605,61 +596,34 @@
//
toCategory(item) {
if (!app.globalData.userInfo.phone) {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
return;
}
if (!app.globalData.userInfo) {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
return;
}
if (item.title == '在线加油') {
uni.navigateTo({
url: item.ext1
})
} else if (item.title == '肯德基') {
if (!app.globalData.userInfo) {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
return;
}
if (!app.globalData.userInfo.phone) {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
return;
}
uni.navigateTo({
url: '/pages/tabBar/order/order?id=1'
})
} else if (item.title == '电影票') {
if (!app.globalData.userInfo) {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
return;
}
if (!app.globalData.userInfo.phone) {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
return;
}
uni.navigateTo({
url: '/pages/tabBar/order/order?id=2'
})
} else if (item.title == '话费充值') {
if (!app.globalData.userInfo) {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
return;
}
if (!app.globalData.userInfo.phone) {
uni.navigateTo({
url: '../../userLogin/userLogin'
})
return;
}
uni.navigateTo({
url: '../../../subPages/recharge/recharge'
})
// uni.navigateTo({
// url:'../../../subPages/unionPay/unionPay'
// })
} else {
uni.showToast({
title: '暂未开通',
@ -711,7 +675,8 @@
}
if (item.title == '电影票') {
uni.navigateTo({
url: '/pages/tabBar/order/order?id=2'
// url: '/pages/tabBar/order/order?id=2'
url: '../../../subPages/preferred-goods/preferred-goods'
})
return;
}
@ -721,6 +686,12 @@
})
return;
}
if (item.title == '优选商品') {
uni.navigateTo({
url: '../../../subPages/preferred-goods/preferred-goods'
})
return;
}
},

@ -0,0 +1,82 @@
<template>
<view>
<image class="width94 mart20" mode="widthFix" :src="imagewxUrl+imgadres"></image>
<!-- 分割线 -->
<view class="title-split">
<view></view>
<text>商品分类</text>
<view></view>
</view>
<!-- 分类-->
<view class="width94">
<view class="width50 flleft fotct mart5" @click="jumpgoods">
<image src="../../static/img/ghkpay.png" class="preimg"></image>
</view>
<view class="width50 flleft fotct mart5">
<image src="../static/cz2.jpg" class="preimg"></image>
</view>
<view class="width50 flleft fotct mart5">
<image src="../../static/img/ghkpay.png" class="preimg"></image>
</view>
<view class="width50 flleft fotct mart5">
<image src="../static/cz1.jpg" class="preimg"></image>
</view>
</view>
</view>
</template>
<script>
let app = getApp()
export default {
data() {
return {
imageUrl: app.globalData.imgUrl,
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'preimg.png'
}
},
methods: {
//
jumpgoods(){
uni.navigateTo({
url:'../../pages/goods/goods-list/goods-list?id=1'
})
}
}
}
</script>
<style lang="scss">
.title-split {
margin: 30rpx 0 28rpx 0;
display: flex;
align-items: center;
justify-content: center;
text {
color: #161616;
font-weight: 500;
font-size: 30rpx;
padding: 0 24rpx;
}
view {
width: 140rpx;
height: 4rpx;
border-radius: 3rpx;
&:first-of-type {
background: linear-gradient(90deg, rgba(98, 98, 98, 0) 0%, #333333 100%);
}
&:last-of-type {
background: linear-gradient(90deg, #333333 0%, rgba(98, 98, 98, 0) 100%);
}
}
}
.preimg {
width: 120px;
height: 80px;
}
</style>

@ -0,0 +1,81 @@
<template>
<view>
<image class="width94 mart20" mode="widthFix" :src="imagewxUrl+imgadres"></image>
<!-- 分割线 -->
<view class="title-split">
<view></view>
<text>商品分类</text>
<view></view>
</view>
<!-- 分类-->
<view class="width94">
<view class="width50 flleft fotct mart5" @click="jumpbrand">
<image src="../../static/img/ghkpay.png" class="preimg"></image>
</view>
<view class="width50 flleft fotct mart5">
<image src="../static/cz2.jpg" class="preimg"></image>
</view>
<view class="width50 flleft fotct mart5">
<image src="../../static/img/ghkpay.png" class="preimg"></image>
</view>
<view class="width50 flleft fotct mart5">
<image src="../static/cz1.jpg" class="preimg"></image>
</view>
</view>
</view>
</template>
<script>
let app = getApp();
export default {
data() {
return {
imageUrl: app.globalData.imgUrl,
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'preimg.png'
}
},
methods: {
//
jumpbrand(){
uni.navigateTo({
url:'../brand-classification/brand-classification'
})
}
}
}
</script>
<style lang="scss">
.title-split {
margin: 30rpx 0 28rpx 0;
display: flex;
align-items: center;
justify-content: center;
text {
color: #161616;
font-weight: 500;
font-size: 30rpx;
padding: 0 24rpx;
}
view {
width: 140rpx;
height: 4rpx;
border-radius: 3rpx;
&:first-of-type {
background: linear-gradient(90deg, rgba(98, 98, 98, 0) 0%, #333333 100%);
}
&:last-of-type {
background: linear-gradient(90deg, #333333 0%, rgba(98, 98, 98, 0) 100%);
}
}
}
.preimg {
width: 120px;
height: 80px;
}
</style>

@ -656,3 +656,38 @@ $uni-font-size-paragraph:30upx;
.font12{
font-size: 12px;
}
.aliitem{
align-items: center;
display: flex;
}
.alijun{
justify-content: flex-end;
display: flex;
}
.alijusstart{
justify-content: flex-start;
align-items: center;
display: flex;
}
.alijusend{
justify-content: flex-end;
align-items: center;
display: flex;
}
.alicntend{
justify-content: end;
align-items: center;
display: flex;
}
.alijus{
justify-content: center;
align-items: center;
display: flex;
}

Loading…
Cancel
Save