积分商城
This commit is contained in:
parent
02bff90102
commit
e24a07c0fb
@ -47,27 +47,42 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="bai-center">
|
<view class="bai-center">
|
||||||
<scroll-view scroll-x="true" class="tap-top">
|
<scroll-view scroll-x="true" class="tap-top">
|
||||||
<view class="sz" v-for="(item,index) in categoryList" :key="index" @click="transferIndex(index) ">
|
<view class="sz" @click="transferIndex(-1)">
|
||||||
<view class="box" :class="{'xztap': qhindex == index}">{{item.categoryName}}</view>
|
<view class="box" :class="{'xztap': qhindex === -1}">全部</view>
|
||||||
<view class="gang" v-if="qhindex == index"></view>
|
<view class="gang" v-if="qhindex === -1"></view>
|
||||||
|
</view>
|
||||||
|
<view class="sz" v-for="(item, index) in categoryList" :key="index"
|
||||||
|
@click="transferIndex(index,item.id)">
|
||||||
|
<view class="box" :class="{'xztap': qhindex === index}">{{item.categoryName}}</view>
|
||||||
|
<view class="gang" v-if="qhindex === index"></view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="wrap-box">
|
<view class="wrap-box">
|
||||||
<view class="box-goods" v-for="(item,index) in integralGiftList" :key="index" @click="godetails()">
|
<view class="box-goods" v-for="(item,index) in integralGiftList" :key="index"
|
||||||
|
@click="godetails(item)">
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
<image :src="baseUrl+'/static/uploadImages/20231106/75bfd9e936974f7a94c2c04e17df1d1b.png'" mode=""></image>
|
<image :src="baseUrl+'/static/uploadImages/20231106/75bfd9e936974f7a94c2c04e17df1d1b.png'"
|
||||||
|
mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-title">
|
<view class="goods-title">
|
||||||
{{item.goodsName}}
|
{{item.giftName}}
|
||||||
</view>
|
</view>
|
||||||
<view class="good-red">
|
<view class="good-red">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<view class="bi">
|
<view class="bi" v-if="item.exchangeMethod != '金额'">
|
||||||
<image src="../../static/imgs/jb.png" mode=""></image>
|
<image src="../../static/imgs/jb.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view style="color: #FC1708;font-weight: bold;">1992</view>
|
<view style="color: #FC1708;font-weight: bold;">
|
||||||
|
<span
|
||||||
|
v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}</span>
|
||||||
|
<span v-if="item.exchangeMethod == '积分+金额'">+</span>
|
||||||
|
<span
|
||||||
|
v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">¥{{item.exchangeAmount}}</span>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="hui-time">库存:{{item.remainingInventory === -1?"不限":item.remainingInventory}}
|
||||||
</view>
|
</view>
|
||||||
<view class="hui-time">库存190</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="anniux">
|
<view class="anniux">
|
||||||
<text>立即兑换</text>
|
<text>立即兑换</text>
|
||||||
@ -84,13 +99,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
import request from '../../utils/request'
|
import request from '../../utils/request'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
categoryList: {},
|
categoryList: {},
|
||||||
integralGiftList: {},
|
integralGiftList: {},
|
||||||
title: '',
|
title: '',
|
||||||
qhindex: 0,
|
qhindex: -1,
|
||||||
baseUrl: config.baseUrl,
|
baseUrl: config.baseUrl,
|
||||||
query: {
|
query: {
|
||||||
categoryId: '',
|
categoryId: '',
|
||||||
@ -111,33 +127,36 @@
|
|||||||
this.getIntegralGiftList();
|
this.getIntegralGiftList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
transferIndex(index) {
|
transferIndex(index, categoryId) {
|
||||||
this.qhindex = index
|
this.qhindex = index
|
||||||
|
if (categoryId == undefined || categoryId == null) {
|
||||||
|
this.query.categoryId = ''
|
||||||
|
} else {
|
||||||
|
this.query.categoryId = categoryId
|
||||||
|
}
|
||||||
|
this.getIntegralGiftList()
|
||||||
},
|
},
|
||||||
// 获取积分商城分类
|
// 获取积分商城分类
|
||||||
getCategoryList() {
|
getCategoryList() {
|
||||||
request({
|
request({
|
||||||
url: 'business/integral/integralGiftCategory/queryByPage',
|
url: 'business/integral/integralGiftCategory/queryByPage',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
// params:{}
|
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.categoryList = res.data.records
|
this.categoryList = res.data.records
|
||||||
console.log("hello world",res)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取积分商城列表
|
// 获取积分商城列表
|
||||||
getIntegralGiftList() {
|
getIntegralGiftList() {
|
||||||
// let
|
|
||||||
request({
|
request({
|
||||||
url: 'business/integral/integralGift/queryByPage',
|
url: 'business/integral/integralGift/queryByPage',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
// params:data
|
params: this.query
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.integralGiftList = res.data.records
|
this.integralGiftList = res.data.records
|
||||||
console.log("hello world",res)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -165,15 +184,27 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
godetails() {
|
|
||||||
|
godetails(data) {
|
||||||
|
// uni.$emit('goodsInfo', data)
|
||||||
|
// uni.$on('goodsInfo', res => {
|
||||||
|
// // console.log("myArray123", res)
|
||||||
|
// })
|
||||||
|
uni.$on('un', function() {
|
||||||
|
uni.$emit('goodsInfo', data)
|
||||||
|
|
||||||
|
})
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesHome/goodsDetails/goodsDetails'
|
url: '/pagesHome/goodsDetails/goodsDetails',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goback() {
|
goback() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
onUnload() {
|
||||||
|
uni.$off('goodsInfo')
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -8,9 +8,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 顶部区域 -->
|
<!-- 顶部区域 -->
|
||||||
<view class="centen-siez">
|
<view class="centen-siez">
|
||||||
{{setting.signInRules}}
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
<view v-html="setting.pointsRules"></view>
|
||||||
|
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -22,16 +23,16 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
setting:{}
|
setting: {},
|
||||||
|
pointsRules: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
async onLoad() {
|
||||||
this.getSettings();
|
await this.getSettings();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
@ -45,7 +46,6 @@
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.setting = res.data
|
this.setting = res.data
|
||||||
console.log("hello world",res)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -58,9 +58,11 @@
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.content {
|
.content {
|
||||||
|
width: 100%;
|
||||||
background: #f4f5f6;
|
background: #f4f5f6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
@ -1,37 +1,44 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="container">
|
<view class="container">
|
||||||
|
|
||||||
<view class="my-header">
|
<view class="my-header">
|
||||||
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
|
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
|
||||||
<view class="my-text">编辑收货地址</view>
|
<view class="my-text">编辑收货地址</view>
|
||||||
<view class="my-icons"></view>
|
<view class="my-icons"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-gang">
|
<view class="dataform">
|
||||||
|
<u-form :model="dataForm" ref="uForm">
|
||||||
|
<u-form-item label="姓名"><u-input v-model="dataForm.name" /></u-form-item>
|
||||||
|
|
||||||
|
</u-form>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="box-gang">
|
||||||
<view class="g-name">联系人</view>
|
<view class="g-name">联系人</view>
|
||||||
<input type="text" placeholder="请填写收货人" />
|
<input type="text" placeholder="请填写收货人" v-model='name' />
|
||||||
</view>
|
</view>
|
||||||
<view class="box-gang">
|
<view class="box-gang">
|
||||||
<view class="g-name">手机号</view>
|
<view class="g-name">手机号</view>
|
||||||
<input type="text" placeholder="请填写手机号" />
|
<input type="text" placeholder="请填写手机号" v-model='mobile' />
|
||||||
</view>
|
</view>
|
||||||
<view class="box-gang">
|
<view class="box-gang">
|
||||||
<view class="g-name">所在地区</view>
|
<view class="g-name">所在地区</view>
|
||||||
<input type="text" placeholder="请填写所在地区" />
|
<input type="text" placeholder="请填写所在地区" v-model='address' />
|
||||||
</view>
|
</view>
|
||||||
<view class="box-gang">
|
<view class="box-gang">
|
||||||
<view class="g-name">详细地区</view>
|
<view class="g-name">详细地区</view>
|
||||||
<input type="text" placeholder="请填写详细地区" />
|
<input type="text" placeholder="请填写详细地区" v-model='fullAddress' />
|
||||||
</view>
|
</view>
|
||||||
<view class="box-gang-bt">
|
<view class="box-gang-bt">
|
||||||
<view class="g-name">默认地址</view>
|
<view class="g-name">默认地址</view>
|
||||||
<u-switch v-model="value" @change="change"></u-switch>
|
<u-switch v-model="value" @change="change"></u-switch>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<!-- 顶部区域 -->
|
<!-- 顶部区域 -->
|
||||||
|
<!--
|
||||||
<view class="bottom-anniu" @click="goedit()">
|
<view class="bottom-anniu" @click="goedit()">
|
||||||
<view class="">提交</view>
|
<view class="">提交</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -41,7 +48,14 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
value: true
|
value: true,
|
||||||
|
dataForm: {
|
||||||
|
name: '',
|
||||||
|
mobile: '',
|
||||||
|
address: '',
|
||||||
|
ifDfault: '',
|
||||||
|
fullAddress: '',
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -55,6 +69,9 @@
|
|||||||
},
|
},
|
||||||
goback() {
|
goback() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
|
},
|
||||||
|
goedit() {
|
||||||
|
console.log("123123", this.dataForm)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -118,6 +135,11 @@
|
|||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dataform {
|
||||||
|
margin: 20px auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.bottom-anniu {
|
.bottom-anniu {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
@ -8,20 +8,27 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 顶部区域 -->
|
<!-- 顶部区域 -->
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-swiper :list="list1" height="390" @change="change" @click="click"></u-swiper>
|
<u-swiper :list="giftImages" height="390" @change="change" @click="click"></u-swiper>
|
||||||
</view>
|
</view>
|
||||||
<view class="bai-box">
|
<view class="bai-box">
|
||||||
<view class="box-title">保养套餐</view>
|
<view class="box-title">{{goodsInfo.giftName}}</view>
|
||||||
<view class="box-jg">268积分</view>
|
<view class="box-jg">
|
||||||
|
<span
|
||||||
|
v-if="goodsInfo.exchangeMethod == '积分' || goodsInfo.exchangeMethod == '积分+金额' || goodsInfo.exchangeMethod == '积分+加钱购'">{{goodsInfo.exchangePoints}}积分</span>
|
||||||
|
<span v-if="goodsInfo.exchangeMethod == '积分+金额'">+</span>
|
||||||
|
<span
|
||||||
|
v-if="goodsInfo.exchangeMethod == '金额' || goodsInfo.exchangeMethod == '积分+金额'">¥{{goodsInfo.exchangeAmount}}</span>
|
||||||
|
|
||||||
|
</view>
|
||||||
<view class="dt-box">
|
<view class="dt-box">
|
||||||
<view class=""><u-tag text="自提" type="error" shape="circle"></u-tag></view>
|
<view class=""><u-tag :text='deliveryMethod' type="error" shape="circle"></u-tag></view>
|
||||||
<view class="hui-time">市场价:89.00</view>
|
<view class="hui-time">市场价:{{goodsInfo.market}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bai-box">
|
<view class="bai-box">
|
||||||
<view style="margin-bottom: 10px;">商品详情</view>
|
<view style="margin-bottom: 10px;">商品详情</view>
|
||||||
<u-line></u-line>
|
<u-line v-html="goodsInfo.detailedDescription"></u-line>
|
||||||
<!-- <view class="" v-html="html" ></view> -->
|
<!-- <view class="" v-html="html" ></view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -36,24 +43,61 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
|
import request from '../../utils/request'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
list1: [
|
goodsInfo: '',
|
||||||
'https://cdn.uviewui.com/uview/swiper/swiper1.png',
|
baseUrl: config.baseUrl,
|
||||||
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
|
deliveryMethod: '',
|
||||||
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
|
giftImages: [],
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
uni.$on('goodsInfo', (data) => {
|
||||||
|
this.goodsInfo = data
|
||||||
|
if (this.goodsInfo != null) {
|
||||||
|
this.dataProcessing()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
uni.$emit('un')
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
change() {},
|
change() {},
|
||||||
click() {},
|
click() {},
|
||||||
|
dataProcessing() {
|
||||||
|
if (this.goodsInfo.giftImages != null && this.goodsInfo.giftImages != undefined) {
|
||||||
|
const myGiftImages = JSON.parse(this.goodsInfo.giftImages);
|
||||||
|
myGiftImages.forEach(res => {
|
||||||
|
if (res.fileName == undefined || res.fileName == null) {
|
||||||
|
this.giftImages.push(res.url)
|
||||||
|
} else {
|
||||||
|
let url = this.baseUrl + res.fileName
|
||||||
|
this.giftImages.push(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (this.goodsInfo.deliveryMethod != null && this.goodsInfo.deliveryMethod != undefined) {
|
||||||
|
const deliveryData = JSON.parse(this.goodsInfo.deliveryMethod);
|
||||||
|
|
||||||
|
this.deliveryMethod = deliveryData.join('+');
|
||||||
|
} else {
|
||||||
|
this.deliveryMethod = '无配送信息'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
goorder() {
|
goorder() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesHome/order/order'
|
url: '/pagesHome/order/order'
|
||||||
|
@ -51,13 +51,20 @@
|
|||||||
<view class="box-bait">
|
<view class="box-bait">
|
||||||
<view class="dis-box">
|
<view class="dis-box">
|
||||||
<view class="goodsimg">
|
<view class="goodsimg">
|
||||||
<image src="../../static/logo.png" mode=""></image>
|
<image :src='baseUrl+goodsInfo.coverImage' mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="">商品名称</view>
|
<view class="">{{goodsInfo.giftName}}</view>
|
||||||
<view class="huyi">市场价:2900</view>
|
<view class="huyi">市场价:{{goodsInfo.market}}</view>
|
||||||
<view class="btwo">
|
<view class="btwo">
|
||||||
<view class="">70积分</view>
|
<view class="">
|
||||||
|
<span
|
||||||
|
v-if="goodsInfo.exchangeMethod == '积分' || goodsInfo.exchangeMethod == '积分+金额' || goodsInfo.exchangeMethod == '积分+加钱购'">{{goodsInfo.exchangePoints}}积分</span>
|
||||||
|
<span v-if="goodsInfo.exchangeMethod == '积分+金额'">+</span>
|
||||||
|
<span
|
||||||
|
v-if="goodsInfo.exchangeMethod == '金额' || goodsInfo.exchangeMethod == '积分+金额'">¥{{goodsInfo.exchangeAmount}}</span>
|
||||||
|
|
||||||
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-number-box v-model="value" @change="valChange" button-size="18"></u-number-box>
|
<u-number-box v-model="value" @change="valChange" button-size="18"></u-number-box>
|
||||||
</view>
|
</view>
|
||||||
@ -66,7 +73,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="endbox">
|
<view class="endbox">
|
||||||
<view style="color: #666666;font-size: 14px;">共1件商品,合计:</view>
|
<view style="color: #666666;font-size: 14px;">共{{value}}件商品,合计:</view>
|
||||||
<view style="color: red;"> <text style="font-weight: bold;font-size: 20px;">140.00</text> 积分</view>
|
<view style="color: red;"> <text style="font-weight: bold;font-size: 20px;">140.00</text> 积分</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -93,12 +100,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
|
import request from '../../utils/request'
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
goodsInfo: '',
|
||||||
title: '',
|
title: '',
|
||||||
qhindex: 0,
|
qhindex: 0,
|
||||||
value: 0,
|
value: 1,
|
||||||
|
baseUrl: config.baseUrl,
|
||||||
|
|
||||||
tapList: [{
|
tapList: [{
|
||||||
text: '到店自提'
|
text: '到店自提'
|
||||||
},
|
},
|
||||||
@ -113,7 +126,33 @@
|
|||||||
components: {
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
uni.$on('goodsInfo', (data) => {
|
||||||
|
this.goodsInfo = data
|
||||||
|
if (this.goodsInfo != null) {
|
||||||
|
this.dataProcessing()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
uni.$emit('un')
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
dataProcessing() {
|
||||||
|
|
||||||
|
if (this.goodsInfo.deliveryMethod != null && this.goodsInfo.deliveryMethod != undefined) {
|
||||||
|
const deliveryData = JSON.parse(this.goodsInfo.deliveryMethod);
|
||||||
|
|
||||||
|
this.deliveryMethod = deliveryData.join('+');
|
||||||
|
} else {
|
||||||
|
this.deliveryMethod = '无配送信息'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
valChange(e) {
|
valChange(e) {
|
||||||
console.log('当前值为: ' + e.value)
|
console.log('当前值为: ' + e.value)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user