mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-19 01:48:47 +08:00
首页修改准备
This commit is contained in:
parent
a6ac994db5
commit
eaf6c6affd
0
doc/2021-01-15.sql
Normal file
0
doc/2021-01-15.sql
Normal file
@ -49,7 +49,7 @@ public class GoodsMainController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('goods:goods_main:list')")
|
@PreAuthorize("@ss.hasPermi('goods:goods_main:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(UsernamePasswordAuthenticationToken token, GoodsMain goodsMain) {
|
public TableDataInfo list(GoodsMain goodsMain) {
|
||||||
startPage();
|
startPage();
|
||||||
LambdaQueryWrapper<GoodsMain> lqw = Wrappers.lambdaQuery(goodsMain);
|
LambdaQueryWrapper<GoodsMain> lqw = Wrappers.lambdaQuery(goodsMain);
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.winery.controller.goods;
|
package com.ruoyi.winery.controller.goods;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
|
||||||
@ -128,4 +129,16 @@ public class GoodsSpecController extends BaseController {
|
|||||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
return toAjax(iWineryGoodsSpecService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
return toAjax(iWineryGoodsSpecService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品规格列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('goods:goods_spec:list')")
|
||||||
|
@GetMapping("/listByIds/{ids}")
|
||||||
|
public TableDataInfo listByIds(@PathVariable String[] ids) {
|
||||||
|
startPage();
|
||||||
|
List<GoodsSpec> list = iWineryGoodsSpecService.listByIds(Arrays.asList(ids));
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,6 +68,10 @@ private static final long serialVersionUID=1L;
|
|||||||
@Excel(name = "商品图片")
|
@Excel(name = "商品图片")
|
||||||
private String goodsImg;
|
private String goodsImg;
|
||||||
|
|
||||||
|
/** 商品图片 */
|
||||||
|
@Excel(name = "商品价格")
|
||||||
|
private BigDecimal goodsPrice;
|
||||||
|
|
||||||
/** 创建者 */
|
/** 创建者 */
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "hope_wine",
|
"name": "hope_wine",
|
||||||
"version": "0.0.2",
|
"version": "1.0.0",
|
||||||
"description": "A WePY project",
|
"description": "希望软件小程序",
|
||||||
"main": "weapp/app.js",
|
"main": "weapp/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "./node_modules/.bin/wepy build --watch",
|
"dev": "./node_modules/.bin/wepy build --watch",
|
||||||
|
|||||||
@ -104,6 +104,14 @@
|
|||||||
"id": -1,
|
"id": -1,
|
||||||
"name": "商品详情",
|
"name": "商品详情",
|
||||||
"pathName": "pages/mall/goods-detail",
|
"pathName": "pages/mall/goods-detail",
|
||||||
|
"query": "",
|
||||||
|
"scene": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": -1,
|
||||||
|
"name": "酒庄详情",
|
||||||
|
"pathName": "pages/winery/winery-detail",
|
||||||
|
"query": "",
|
||||||
"scene": null
|
"scene": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -13,6 +13,17 @@ class MallApis {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
getGoodsById(id) {
|
||||||
|
return request.get({
|
||||||
|
url: baseUrl + 'goods/goods_main/' + id,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getGoodsSpecByIds(ids) {
|
||||||
|
return request.get({
|
||||||
|
url: baseUrl + 'goods/goods_spec/listByIds/' + ids,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new MallApis()
|
export default new MallApis()
|
||||||
|
|||||||
@ -100,7 +100,8 @@ pages: [
|
|||||||
'pages/form5',
|
'pages/form5',
|
||||||
'pages/form6',
|
'pages/form6',
|
||||||
'pages/mall/index',
|
'pages/mall/index',
|
||||||
'pages/mall/goods-detail'
|
'pages/mall/goods-detail',
|
||||||
|
'pages/winery/winery-detail'
|
||||||
],
|
],
|
||||||
navigateToMiniProgramAppIdList: [
|
navigateToMiniProgramAppIdList: [
|
||||||
'wx88736d7d39e2eda6'
|
'wx88736d7d39e2eda6'
|
||||||
@ -141,7 +142,8 @@ usingComponents: {
|
|||||||
"van-grid": "./vant/grid/index",
|
"van-grid": "./vant/grid/index",
|
||||||
"van-grid-item": "./vant/grid-item/index",
|
"van-grid-item": "./vant/grid-item/index",
|
||||||
"van-dialog": "./vant/dialog/index",
|
"van-dialog": "./vant/dialog/index",
|
||||||
"van-image": "./vant/image/index"
|
"van-image": "./vant/image/index",
|
||||||
|
"van-loading": "./vant/loading/index"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</config>
|
</config>
|
||||||
|
|||||||
@ -1,3 +1,11 @@
|
|||||||
|
<wxs module="filters" lang="babel">
|
||||||
|
const parseImage = (imageKey) => {
|
||||||
|
return 'https://winery-1257413599.cos.ap-beijing.myqcloud.com/' + imageKey
|
||||||
|
}
|
||||||
|
module.exports.parseImage = parseImage;
|
||||||
|
</wxs>
|
||||||
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<van-nav-bar
|
<van-nav-bar
|
||||||
@ -19,37 +27,40 @@
|
|||||||
</van-row>
|
</van-row>
|
||||||
|
|
||||||
|
|
||||||
<!-- <div style="display: flex;flex-wrap: wrap;">-->
|
<div style="display: flex;flex-wrap: wrap;">
|
||||||
<!-- <div class="filter-button" v-for="(item,index) in filterButtons">-->
|
<div class="filter-button" v-for="(item,index) in filterButtons">
|
||||||
<!-- <van-button round size="small" :color=" currentFilter === item ? '#7232dd' : '#7232dd' "-->
|
<van-button round size="small" :color=" currentFilter === item ? '#7232dd' : '#7232dd' "
|
||||||
<!-- :plain="currentFilter === item ? false : true" @tap="onFilterBtn(item)">{{item}}-->
|
:plain="currentFilter === item ? false : true" @tap="onFilterBtn(item)">{{item}}
|
||||||
<!-- </van-button>-->
|
</van-button>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<view v-for="(item, index) in records" :key="index"
|
<view v-for="(item, index) in records" :key="index"
|
||||||
style="margin-top: 10px;border: #fafafa 1px solid; border-radius: 10px;">
|
style="margin-top: 10px;border: #fafafa 1px solid; border-radius: 10px;">
|
||||||
<van-card
|
<van-card
|
||||||
price="2.00"
|
|
||||||
:desc="item.goodsDesc"
|
|
||||||
:title="item.goodsName"
|
:title="item.goodsName"
|
||||||
:thumb="parseImage(item.goodsFaceImg)"
|
:desc="item.goodsAlias"
|
||||||
|
:price="item.goodsPrice"
|
||||||
|
:thumb="filters.parseImage(item.goodsFaceImg)"
|
||||||
@tap="onItem(item)"
|
@tap="onItem(item)"
|
||||||
>
|
>
|
||||||
<view slot="num" style="float:right;">
|
<!-- <view slot="num" style="float:right;">-->
|
||||||
<div>{{'已优惠¥xx元'}}</div>
|
<!-- <div>{{'已优惠¥xx元'}}</div>-->
|
||||||
</view>
|
<!-- </view>-->
|
||||||
|
|
||||||
</van-card>
|
</van-card>
|
||||||
|
|
||||||
{{parseImage(item.goodsFaceImg)}}
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
import wepy from '@wepy/core'
|
import wepy from '@wepy/core'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { mapActions, mapState } from '@wepy/x'
|
import { mapActions, mapState } from '@wepy/x'
|
||||||
@ -80,8 +91,7 @@ wepy.component({
|
|||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
onItem(item) {
|
onItem(item) {
|
||||||
console.log(item)
|
appManager.navigateTo(`goods-detail?id=${item.id}`)
|
||||||
appManager.navigateTo(`goods-detail?id=${item}`)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onFilterBtn(item) {
|
onFilterBtn(item) {
|
||||||
@ -94,14 +104,14 @@ wepy.component({
|
|||||||
},
|
},
|
||||||
|
|
||||||
ready() {
|
ready() {
|
||||||
// let i = 0
|
let i = 0
|
||||||
// while (true) {
|
while (true) {
|
||||||
// this.filterButtons.push('按钮按钮' + i)
|
this.filterButtons.push('按钮按钮' + i)
|
||||||
// i++
|
i++
|
||||||
// if (i > 8) {
|
if (i > 8) {
|
||||||
// break
|
break
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
mailApis.getGoodsList({}).then(r => {
|
mailApis.getGoodsList({}).then(r => {
|
||||||
|
|
||||||
|
|||||||
@ -1,44 +1,42 @@
|
|||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
|
||||||
.header {
|
|
||||||
width: 100%;
|
|
||||||
height: 536rpx;
|
|
||||||
z-index: -10;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<wxs module="m1" lang="babel">
|
|
||||||
const getTime = (time) => {
|
<wxs module="filters" lang="babel">
|
||||||
let date = getDate(time);
|
const parseImage = (imageKey) => {
|
||||||
let hour = date.getHours();
|
return 'https://winery-1257413599.cos.ap-beijing.myqcloud.com/' + imageKey
|
||||||
let mins = date.getMinutes();
|
|
||||||
let sec = date.getSeconds();
|
|
||||||
let milli = date.getMilliseconds();
|
|
||||||
return `${hour}:${mins}:${sec}.${milli}`;
|
|
||||||
}
|
}
|
||||||
module.exports.getTime = getTime;
|
module.exports.parseImage = parseImage;
|
||||||
</wxs>
|
</wxs>
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<nav-bar title="商品详情" />
|
<nav-bar title="商品详情" />
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
|
||||||
|
<van-loading v-if="!goodsItem" style="margin-top: 20px;" />
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
|
|
||||||
<swiper indicator-dots="true" autoplay="true" interval="3000">
|
<swiper indicator-dots="true" autoplay="true" interval="3000">
|
||||||
<block v-for="(item,index) in goodsImages" wx:key="index">
|
<block v-for="(item,index) in goodsImages" wx:key="index">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<view class="swiper-item">
|
<view class="swiper-item">
|
||||||
<image :src="item" />
|
<image :src="filters.parseImage(item)" style="width: 100%;height: 150px;" mode="scaleToFill" />
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</block>
|
</block>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
|
||||||
<van-cell title="标题能显示多长标题能显示多长" value="内容能显示多长" label="描述信息描述信息描述信息描述信息描述信息描述信息描述信息描述信息" border="{{ false }}" />
|
<van-cell :title="goodsItems.goodsName" value="内容能显示多长" label="描述信息描述信息描述信息描述信息描述信息描述信息描述信息描述信息"
|
||||||
|
border="{{ false }}" />
|
||||||
<van-cell title="选择规格" is-link @tap="onShowSpec" />
|
<van-cell title="选择规格" is-link @tap="onShowSpec" />
|
||||||
|
|
||||||
<div style="margin: 10px 15px;">
|
<div style="margin: 10px 15px;">
|
||||||
<span>商品详情</span>
|
<span>商品详情</span>
|
||||||
<div style="margin-top: 10px;">
|
<div style="margin-top: 10px;">
|
||||||
<rich-text :nodes="detail" />
|
<rich-text :nodes="goodsItem.goodsDesc" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -51,13 +49,13 @@ module.exports.getTime = getTime;
|
|||||||
bind:close="onCloseSpec"
|
bind:close="onCloseSpec"
|
||||||
>
|
>
|
||||||
<van-card
|
<van-card
|
||||||
price="2.00"
|
:title="goodsSpec.specName"
|
||||||
desc="描述信息"
|
:desc="goods.specDesc"
|
||||||
title="商品标题"
|
:price="goodsSpec.specPrice"
|
||||||
thumb="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=751441608,3469454349&fm=15&gp=0.jpg"
|
:thumb="filters.parseImage(goodsSpec.specImg)"
|
||||||
>
|
>
|
||||||
<view slot="num" style="float:right;">
|
<view slot="num" style="float:right;">
|
||||||
<div>{{'已优惠¥xx元'}}</div>
|
<!-- <div>{{'已优惠¥xx元'}}</div>-->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</van-card>
|
</van-card>
|
||||||
@ -76,7 +74,8 @@ module.exports.getTime = getTime;
|
|||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
|
|
||||||
<van-button round type="danger" size="small" style="float:right;margin-top:10px;margin-right: 10px;">下一步</van-button>
|
<van-button round type="danger" size="small" style="float:right;margin-top:10px;margin-right: 10px;">下一步
|
||||||
|
</van-button>
|
||||||
|
|
||||||
</van-popup>
|
</van-popup>
|
||||||
|
|
||||||
@ -86,30 +85,40 @@ module.exports.getTime = getTime;
|
|||||||
<van-goods-action-button color="#be99ff" text="加入购物车" type="warning" @tap="onShowSpec" />
|
<van-goods-action-button color="#be99ff" text="加入购物车" type="warning" @tap="onShowSpec" />
|
||||||
<van-goods-action-button color="#7232dd" text="立即购买" @tap="onShowSpec" />
|
<van-goods-action-button color="#7232dd" text="立即购买" @tap="onShowSpec" />
|
||||||
</van-goods-action>
|
</van-goods-action>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import wepy from '@wepy/core'
|
import wepy from '@wepy/core'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { mapActions } from '@wepy/x'
|
import { mapActions } from '@wepy/x'
|
||||||
|
import mailApis from '../../apis/mailApis'
|
||||||
|
|
||||||
wepy.page({
|
wepy.page({
|
||||||
store,
|
store,
|
||||||
hooks: {},
|
hooks: {},
|
||||||
|
|
||||||
data: {
|
data: {
|
||||||
goodsImages: [
|
|
||||||
'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=751441608,3469454349&fm=15&gp=0.jpg',
|
|
||||||
'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=751441608,3469454349&fm=15&gp=0.jpg',
|
|
||||||
'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=751441608,3469454349&fm=15&gp=0.jpg'
|
|
||||||
],
|
|
||||||
detail: '<p style=\'color: #AC1630\'>富文本详情</p>',
|
detail: '<p style=\'color: #AC1630\'>富文本详情</p>',
|
||||||
|
|
||||||
isShowSpec: false,
|
isShowSpec: false,
|
||||||
count: 1
|
count: 1,
|
||||||
|
goodsItem: null,
|
||||||
|
goodsSpec: null
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {},
|
computed: {
|
||||||
|
|
||||||
|
goodsImages() {
|
||||||
|
if (!this.goodsItem || !this.goodsItem.goodsImg) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.goodsItem.goodsImg.split(',')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions([
|
...mapActions([
|
||||||
@ -134,11 +143,23 @@ wepy.page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
callAppLaunch() {
|
callAppLaunch() {
|
||||||
|
},
|
||||||
|
async init(id) {
|
||||||
|
const goodsReq = await mailApis.getGoodsById(id)
|
||||||
|
this.goodsItem = goodsReq.data
|
||||||
|
const ids = this.goodsItem.goodsSpec.split(',')
|
||||||
|
console.log(ids)
|
||||||
|
const goodsSpecReq = await mailApis.getGoodsSpecByIds(ids)
|
||||||
|
|
||||||
|
this.goodsSpec = goodsSpecReq.rows[0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
ready() {
|
onLoad(options) {
|
||||||
|
this.init(options.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<config>
|
<config>
|
||||||
|
|||||||
152
mini-app/src/pages/winery/winery-detail.wpy
Normal file
152
mini-app/src/pages/winery/winery-detail.wpy
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
<style lang="less">
|
||||||
|
|
||||||
|
.bg {
|
||||||
|
z-index: -1;
|
||||||
|
height: 100%;
|
||||||
|
position: fixed;
|
||||||
|
width: 200rpx;
|
||||||
|
background-color: #AC1630;
|
||||||
|
}
|
||||||
|
|
||||||
|
.winery-item {
|
||||||
|
|
||||||
|
width: 400rpx;
|
||||||
|
height: 60px;
|
||||||
|
|
||||||
|
margin-bottom: 20px;
|
||||||
|
box-shadow: 4px 4px 10px #cccccc;
|
||||||
|
border: #ffffff 1px solid;
|
||||||
|
border-radius: 20px;
|
||||||
|
|
||||||
|
background-color: white;
|
||||||
|
padding: 15px 70rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.winery-item-icon {
|
||||||
|
position: absolute;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 4px 4px 10px #cccccc;
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-left: -40rpx;
|
||||||
|
border: #ffffff 1px solid;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.winery-item-arrow {
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
width: 45px;
|
||||||
|
height: 45px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 4px 4px 10px #cccccc;
|
||||||
|
margin-top: 18.5px;
|
||||||
|
margin-left: 500rpx;
|
||||||
|
border: #ffffff 1px solid;
|
||||||
|
border-radius: 50%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<wxs module="filters" lang="babel">
|
||||||
|
const parseImage = (imageKey) => {
|
||||||
|
return 'https://winery-1257413599.cos.ap-beijing.myqcloud.com/' + imageKey
|
||||||
|
}
|
||||||
|
module.exports.parseImage = parseImage;
|
||||||
|
</wxs>
|
||||||
|
<template>
|
||||||
|
|
||||||
|
<nav-bar title="了解酒庄" />
|
||||||
|
<div class="bg" />
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
|
||||||
|
<div style="display: flex;" v-for="(item,index) in wineryDefine.WINERY_LIST" @tap="onTap(item)">
|
||||||
|
<div class="winery-item-icon">
|
||||||
|
<van-image style="margin-top: 5px;" round width="50px" height="50px" :src="userInfo.avatar" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="winery-item">
|
||||||
|
<div class="fxc" style="margin-left: 20px;">
|
||||||
|
<span style="font-size: 20px;font-weight: bold;">{{item.name}}</span>
|
||||||
|
<span style="color: #999;">{{item.desc}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="winery-item-arrow">
|
||||||
|
<van-icon name="arrow" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import wepy from '@wepy/core'
|
||||||
|
import store from '@/store'
|
||||||
|
import { mapActions, mapState } from '@wepy/x'
|
||||||
|
import defaultMix from '../../mixins/defaultMix'
|
||||||
|
|
||||||
|
wepy.page({
|
||||||
|
store,
|
||||||
|
hooks: {},
|
||||||
|
|
||||||
|
mixins: [defaultMix],
|
||||||
|
data: {
|
||||||
|
pageIndex: 0
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
...mapState({
|
||||||
|
'imageDefine': state => state.imageDefine,
|
||||||
|
'userInfo': state => state.user.userInfo,
|
||||||
|
'wineryDefine': state => state.wineryDefine
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
...mapActions([
|
||||||
|
'setUserAction'
|
||||||
|
]),
|
||||||
|
handleViewTap() {
|
||||||
|
console.log('handleVieTap clicked')
|
||||||
|
},
|
||||||
|
onTap(item) {
|
||||||
|
console.log(item)
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
async init(id) {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad(options) {
|
||||||
|
this.init(options.id)
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<config>
|
||||||
|
{
|
||||||
|
navigationBarTitleText: '',
|
||||||
|
usingComponents: {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</config>
|
||||||
44
mini-app/src/store/constant/wineryDefine.js
Normal file
44
mini-app/src/store/constant/wineryDefine.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import { imgbaseUrl } from './imageDefine'
|
||||||
|
|
||||||
|
export const wineryDefine = {
|
||||||
|
WINERY_LIST: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name: '贺兰神',
|
||||||
|
icon: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
||||||
|
desc: 'since 1998'
|
||||||
|
}, {
|
||||||
|
id: '2',
|
||||||
|
name: '贺东庄园',
|
||||||
|
icon: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
||||||
|
desc: 'since 1998'
|
||||||
|
}, {
|
||||||
|
id: '3',
|
||||||
|
name: '志辉源石',
|
||||||
|
icon: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
||||||
|
desc: 'since 1998'
|
||||||
|
}, {
|
||||||
|
id: '4',
|
||||||
|
name: '银色高地',
|
||||||
|
icon: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
||||||
|
desc: 'since 1998'
|
||||||
|
}, {
|
||||||
|
id: '5',
|
||||||
|
name: '贺兰晴雪',
|
||||||
|
icon: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
||||||
|
desc: 'since 1998'
|
||||||
|
}, {
|
||||||
|
id: '6',
|
||||||
|
name: '贺兰神',
|
||||||
|
icon: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
||||||
|
desc: 'since 1998'
|
||||||
|
}, {
|
||||||
|
id: '7',
|
||||||
|
name: '贺兰神',
|
||||||
|
icon: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
||||||
|
desc: 'since 1998'
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
@ -2,6 +2,7 @@ import Vuex from '@wepy/x'
|
|||||||
import { wineryForm } from './wineryForm'
|
import { wineryForm } from './wineryForm'
|
||||||
import { imageDefine } from './constant/imageDefine'
|
import { imageDefine } from './constant/imageDefine'
|
||||||
import { navDefine } from './constant/navDefine'
|
import { navDefine } from './constant/navDefine'
|
||||||
|
import { wineryDefine } from './constant/wineryDefine'
|
||||||
|
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
state: {
|
state: {
|
||||||
@ -13,11 +14,12 @@ export default new Vuex.Store({
|
|||||||
avatar: 'https://img.yzcdn.cn/vant/cat.jpeg'
|
avatar: 'https://img.yzcdn.cn/vant/cat.jpeg'
|
||||||
},
|
},
|
||||||
token: '',
|
token: '',
|
||||||
company: '企业名称',
|
company: '企业名称'
|
||||||
},
|
},
|
||||||
wineryForm,
|
wineryForm,
|
||||||
imageDefine,
|
imageDefine,
|
||||||
navDefine
|
navDefine,
|
||||||
|
wineryDefine
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user