Browse Source

修改积分兑换的样式

master
anhaogxs 4 years ago
parent
commit
b6e8e267be
  1. 7
      config/index.js
  2. 22
      pages.json
  3. 379
      pages/order/OrderSubmission/index.vue
  4. 782
      pages/shop/GoodsCon/index.vue
  5. 193
      pages/shop/GoodsList/index.vue
  6. 867
      pages/shop/IntegralGoodsCon/index.vue
  7. 5
      pages/user/User/index.vue

7
config/index.js

@ -1,9 +1,8 @@
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api';
// export const VUE_APP_API_URL = 'http://192.168.31.223:8008/api';
export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://tapi.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
export const VUE_APP_API_URL = 'https://tapi.xinxintuan.co/api'
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
export const VUE_APP_RESOURCES_URL = 'https://wx.yixiang.co/static';
export const VUE_APP_RESOURCES_URL = 'https://wx.yixiang.co/static'

22
pages.json

@ -141,6 +141,12 @@
"navigationBarTitleText": "商品详情"
}
},
{
"path": "pages/shop/IntegralGoodsCon/index",
"style": {
"navigationBarTitleText": "积分商品详情"
}
},
{
"path": "pages/user/BindingPhone/index",
"style": {
@ -424,7 +430,6 @@
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"navigationStyle": "default"
},
"tabBar": {
"color": "#282828",
@ -435,26 +440,31 @@
"fontSize": "10px",
"iconWidth": "24px",
"spacing": "3px",
"list": [{
"list": [
{
"pagePath": "pages/home/index",
"iconPath": "static/icon-home.png",
"selectedIconPath": "static/icon-home-hot.png",
"text": "首页"
}, {
},
{
"pagePath": "pages/shop/GoodsClass/index",
"iconPath": "static/icon-class.png",
"selectedIconPath": "static/icon-class-hot.png",
"text": "分类"
}, {
},
{
"pagePath": "pages/shop/ShoppingCart/index",
"iconPath": "static/icon-cart.png",
"selectedIconPath": "static/icon-cart-hot.png",
"text": "购物车"
}, {
},
{
"pagePath": "pages/user/User/index",
"iconPath": "static/icon-user.png",
"selectedIconPath": "static/icon-user-hot.png",
"text": "我的"
}]
}
]
}
}

379
pages/order/OrderSubmission/index.vue

@ -2,10 +2,8 @@
<view class="order-submission">
<view class="allAddress" :style="systemStore ? '' : 'padding-top: 0.2*100rpx'">
<view class="nav acea-row">
<view class="item font-color-red" :class="shipping_type === 0 ? 'on' : 'on2'" @click="addressType(0)"
v-if="systemStore"></view>
<view class="item font-color-red" :class="shipping_type === 1 ? 'on' : 'on2'" @click="addressType(1)"
v-if="systemStore"></view>
<view class="item font-color-red" :class="shipping_type === 0 ? 'on' : 'on2'" @click="addressType(0)" v-if="systemStore"></view>
<view class="item font-color-red" :class="shipping_type === 1 ? 'on' : 'on2'" @click="addressType(1)" v-if="systemStore && !isIntegral"></view>
</view>
<view class="address acea-row row-between-wrapper" v-if="shipping_type === 0" @click="addressTap">
<view class="addressCon" v-if="addressInfo.realName">
@ -15,7 +13,7 @@
</view>
<view>
<text class="default font-color-red" v-if="addressInfo.isDefault">[默认]</text>
{{ addressInfo.province }}{{ addressInfo.city}}{{ addressInfo.district }}{{ addressInfo.detail }}
{{ addressInfo.province }}{{ addressInfo.city }}{{ addressInfo.district }}{{ addressInfo.detail }}
</view>
</view>
<view class="addressCon" v-else>
@ -27,14 +25,14 @@
<div class="addressCon" v-if="storeItems">
<div class="name">
{{ storeItems.name }}
<span class="phone">{{storeItems.phone }}</span>
<span class="phone">{{ storeItems.phone }}</span>
</div>
<div>{{ storeItems.address}}</div>
<div>{{ storeItems.address }}</div>
</div>
<div class="addressCon" v-else>
<div class="name">
{{ systemStore.name }}
<span class="phone">{{systemStore.phone}}</span>
<span class="phone">{{ systemStore.phone }}</span>
</div>
<div>{{ systemStore.address }}</div>
</div>
@ -49,7 +47,7 @@
<view class="item acea-row row-between-wrapper" @click="couponTap" v-if="deduction === false && !isIntegral">
<view>优惠券</view>
<view class="discount">
{{ usableCoupon.couponTitle || "请选择" }}
{{ usableCoupon.couponTitle || '请选择' }}
<text class="iconfont icon-jiantou"></text>
</view>
</view>
@ -75,11 +73,7 @@
<view class="item acea-row row-between-wrapper" v-if="shipping_type === 0">
<view>快递费用</view>
<view class="discount">
{{
orderGroupInfo.priceGroup.storePostage > 0
? orderGroupInfo.priceGroup.storePostage
: "免运费"
}}
{{ orderGroupInfo.priceGroup.storePostage > 0 ? orderGroupInfo.priceGroup.storePostage : '免运费' }}
</view>
</view>
<view v-if="shipping_type === 1">
@ -105,30 +99,20 @@
<view class="item">
<view>支付方式</view>
<view class="list">
<view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')"
v-show="isWeixin">
<view class="name acea-row row-center-wrapper">
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付
</view>
<view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')" v-show="isWeixin">
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 </view>
<view class="tip">微信快捷支付</view>
</view>
<view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')"
v-show="!isWeixin">
<view class="name acea-row row-center-wrapper">
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付
</view>
<view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')" v-show="!isWeixin">
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 </view>
<view class="tip">微信快捷支付</view>
</view>
<view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'yue' ? 'on' : ''" @click="payItem('yue')">
<view class="name acea-row row-center-wrapper">
<view class="iconfont icon-icon-test" :class="active === 'yue' ? 'bounceIn' : ''"></view>余额支付
</view>
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-icon-test" :class="active === 'yue' ? 'bounceIn' : ''"></view>余额支付 </view>
<view class="tip">可用余额{{ userInfo.nowMoney || 0 }}</view>
</view>
<view class="payItem acea-row row-middle" :class="active === 'integral' ? 'on' : ''" @click="payItem('integral')">
<view class="name acea-row row-center-wrapper">
<view class="iconfont icon-icon-test" :class="active === 'integral' ? 'bounceIn' : ''"></view>积分支付
</view>
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-icon-test" :class="active === 'integral' ? 'bounceIn' : ''"></view>积分支付 </view>
<view class="tip">可用积分{{ userInfo.integral || 0 }}</view>
</view>
</view>
@ -153,7 +137,7 @@
<view class="money">-{{ orderPrice.deductionPrice }}</view>
</view>
</view>
<view style="height:120rpx"></view>
<view style="height: 120rpx"></view>
<view class="footer acea-row row-between-wrapper">
<view>
合计:
@ -162,53 +146,49 @@
</view>
<view class="settlement" @click="createOrder">立即结算</view>
</view>
<CouponListWindow v-on:couponchange="changecoupon($event)" v-model="showCoupon" :price="orderPrice.totalPrice"
:checked="usableCoupon.id" @checked="changeCoupon" :cartid="cartid"></CouponListWindow>
<AddressWindow @checked="changeAddress" @redirect="addressRedirect" v-model="showAddress" :checked="addressInfo.id"
ref="mychild"></AddressWindow>
<CouponListWindow v-on:couponchange="changecoupon($event)" v-model="showCoupon" :price="orderPrice.totalPrice" :checked="usableCoupon.id" @checked="changeCoupon" :cartid="cartid"></CouponListWindow>
<AddressWindow @checked="changeAddress" @redirect="addressRedirect" v-model="showAddress" :checked="addressInfo.id" ref="mychild"></AddressWindow>
</view>
</template>
<style scoped lang="less">
.order-submission .wrapper .shipping select {
.order-submission .wrapper .shipping select {
color: #999;
padding-right: 0.15 * 100rpx;
}
}
.order-submission .wrapper .shipping .iconfont {
.order-submission .wrapper .shipping .iconfont {
font-size: 0.3 * 100rpx;
color: #515151;
}
}
.order-submission .allAddress {
.order-submission .allAddress {
width: 100%;
background-image: linear-gradient(to bottom, #eb3729 0%, #eb3729 100%);
background-image: -webkit-linear-gradient(to bottom,
#eb3729 0%,
#eb3729 100%);
background-image: -webkit-linear-gradient(to bottom, #eb3729 0%, #eb3729 100%);
background-image: -moz-linear-gradient(to bottom, #eb3729 0%, #eb3729 100%);
padding-top: 1 * 100rpx;
}
}
.order-submission .allAddress .nav {
.order-submission .allAddress .nav {
margin: 0 auto;
padding: 0 30rpx;
width: 100%;
box-sizing: border-box;
}
}
.order-submission .allAddress .nav .item {
.order-submission .allAddress .nav .item {
flex: 1;
position: relative;
}
}
.order-submission .allAddress .nav .item.on {
.order-submission .allAddress .nav .item.on {
position: relative;
}
}
.order-submission .allAddress .nav .item.on:before {
.order-submission .allAddress .nav .item.on:before {
position: absolute;
bottom: 0;
content: "快递配送";
content: '快递配送';
font-size: 0.28 * 100rpx;
display: block;
height: 0;
@ -220,21 +200,21 @@
z-index: 9;
text-align: center;
line-height: 0.14 * 100rpx;
}
}
.order-submission .allAddress .nav .item:nth-of-type(2).on:before {
content: "到店自提";
.order-submission .allAddress .nav .item:nth-of-type(2).on:before {
content: '到店自提';
border-width: 0.4 * 100rpx;
}
}
.order-submission .allAddress .nav .item.on2 {
.order-submission .allAddress .nav .item.on2 {
position: relative;
}
}
.order-submission .allAddress .nav .item.on2:before {
.order-submission .allAddress .nav .item.on2:before {
position: absolute;
bottom: 0;
content: "到店自提";
content: '到店自提';
font-size: 0.28 * 100rpx;
display: block;
height: 0;
@ -245,56 +225,42 @@
border-color: #d5e6e6;
text-align: center;
line-height: 0.14 * 100rpx;
}
}
.order-submission .allAddress .nav .item:nth-of-type(1).on2:before {
content: "快递配送";
.order-submission .allAddress .nav .item:nth-of-type(1).on2:before {
content: '快递配送';
border-width: 0.4 * 100rpx;
}
}
.order-submission .allAddress .address {
.order-submission .allAddress .address {
width: 6.91 * 100rpx;
height: 1.5 * 100rpx;
margin: 0 auto;
box-sizing: border-box;
}
}
.order-submission .allAddress .line {
.order-submission .allAddress .line {
width: 7.1 * 100rpx;
margin: 0 auto;
}
}
.order-submission .wrapper .item .discount input::placeholder {
.order-submission .wrapper .item .discount input::placeholder {
color: #ccc;
}
}
</style>
<script>
import OrderGoods from "@/components/OrderGoods";
import CouponListWindow from "@/components/CouponListWindow";
import AddressWindow from "@/components/AddressWindow";
import {
postOrderConfirm,
postOrderComputed,
createOrder
} from "@/api/order";
import {
mapGetters
} from "vuex";
import {
handleOrderPayResults,
subscribeMessage
} from "@/libs/order";
import {
weappPay
} from "@/libs/wechat";
import {
isWeixin,
handleErrorMessage
} from "@/utils";
import OrderGoods from '@/components/OrderGoods'
import CouponListWindow from '@/components/CouponListWindow'
import AddressWindow from '@/components/AddressWindow'
import { postOrderConfirm, postOrderComputed, createOrder } from '@/api/order'
import { mapGetters } from 'vuex'
import { handleOrderPayResults, subscribeMessage } from '@/libs/order'
import { weappPay } from '@/libs/wechat'
import { isWeixin, handleErrorMessage } from '@/utils'
const NAME = "OrderSubmission",
_isWeixin = isWeixin();
export default {
const NAME = 'OrderSubmission',
_isWeixin = isWeixin()
export default {
name: NAME,
components: {
OrderGoods,
@ -311,7 +277,7 @@
enableIntegralNum: 0,
isWeixin: _isWeixin,
pinkId: 0,
active: _isWeixin ? "weixin" : "yue",
active: _isWeixin ? 'weixin' : 'yue',
showCoupon: false,
showAddress: false,
addressInfo: {},
@ -323,227 +289,224 @@
addressLoaded: false,
useIntegral: false,
orderPrice: {
payPrice: "计算中",
payPrice: '计算中',
},
mark: "",
mark: '',
systemStore: {},
shipping_type: 0,
contacts: "",
contactsTel: "",
contacts: '',
contactsTel: '',
storeSelfMention: 0,
cartid: "",
isIntegral: false
};
cartid: '',
isIntegral: false,
}
},
computed: mapGetters(["userInfo", "storeItems"]),
computed: mapGetters(['userInfo', 'storeItems']),
watch: {
useIntegral() {
this.computedPrice();
this.computedPrice()
},
$yroute(n) {
if (n.name === NAME) this.getCartInfo();
if (n.name === NAME) this.getCartInfo()
},
shipping_type() {
this.computedPrice();
this.computedPrice()
},
},
onShow: function () {
let that = this;
this.$store.dispatch("getUser", true);
that.getCartInfo();
console.log(that.$yroute);
let that = this
this.$store.dispatch('getUser', true)
that.getCartInfo()
console.log(that.$yroute)
if (that.$yroute.query.pinkid !== undefined) {
that.pinkId = that.$yroute.query.pinkid;
that.pinkId = that.$yroute.query.pinkid
}
this.isIntegral = that.$yroute.query.isIntegral == 'true'
this.useIntegral = this.isIntegral
if(this.isIntegral){
this.active='integral'
if (this.isIntegral) {
this.active = 'integral'
}
if (that.$yroute.query.id !== undefined) {
that.cartid = that.$yroute.query.id;
console.log(that.cartid);
that.cartid = that.$yroute.query.id
console.log(that.cartid)
}
},
methods: {
showStoreList() {
this.$store.commit("get_to", "orders");
this.$store.commit('get_to', 'orders')
this.$yrouter.push({
path: "/pages/shop/StoreList/index",
});
path: '/pages/shop/StoreList/index',
})
},
addressType: function (index) {
if (index && !this.systemStore.id) {
uni.showToast({
title: "暂无门店信息,您无法选择到店自提!",
icon: "none",
title: '暂无门店信息,您无法选择到店自提!',
icon: 'none',
duration: 2000,
});
return;
})
return
}
console.log(this);
this.shipping_type = index;
console.log(this)
this.shipping_type = index
},
changeUseIntegral: function (e) {
// this.computedPrice();
if (this.isIntegral) {
return
}
this.useIntegral = e.mp.detail.value[0];
this.useIntegral = e.mp.detail.value[0]
},
computedPrice() {
let shipping_type = this.shipping_type;
let shipping_type = this.shipping_type
postOrderComputed(this.orderGroupInfo.orderKey, {
addressId: this.addressInfo.id,
useIntegral: this.useIntegral ? 1 : 0,
couponId: this.usableCoupon.id || 0,
shipping_type: parseInt(shipping_type) + 1,
}).then((res) => {
const data = res.data;
if (data.status === "EXTEND_ORDER") {
}).then(res => {
const data = res.data
if (data.status === 'EXTEND_ORDER') {
this.$yrouter.replace({
path: "/pages/order/OrderDetails/index",
path: '/pages/order/OrderDetails/index',
query: {
id: data.result.orderId,
},
});
})
} else {
this.orderPrice = data.result;
this.orderPrice = data.result
}
});
})
},
getCartInfo() {
const cartIds = this.$yroute.query.id;
const cartIds = this.$yroute.query.id
if (!cartIds) {
uni.showToast({
title: "参数有误",
icon: "none",
title: '参数有误',
icon: 'none',
duration: 2000,
});
return this.$yrouter.back();
})
return this.$yrouter.back()
}
postOrderConfirm(cartIds)
.then((res) => {
console.log(res, 999999);
console.log(res.data.systemStore || {}, 999999);
this.offlinePayStatus = res.data.offline_pay_status;
this.orderGroupInfo = res.data;
this.deduction = res.data.deduction;
this.usableCoupon = res.data.usableCoupon || {};
this.addressInfo = res.data.addressInfo || {};
.then(res => {
console.log(res, 999999)
console.log(res.data.systemStore || {}, 999999)
this.offlinePayStatus = res.data.offline_pay_status
this.orderGroupInfo = res.data
this.deduction = res.data.deduction
this.usableCoupon = res.data.usableCoupon || {}
this.addressInfo = res.data.addressInfo || {}
//
this.systemStore = res.data.systemStore || {};
this.storeSelfMention = res.data.storeSelfMention;
this.computedPrice();
this.systemStore = res.data.systemStore || {}
this.storeSelfMention = res.data.storeSelfMention
this.computedPrice()
})
.catch(() => {
uni.showToast({
title: "加载订单数据失败",
icon: "none",
title: '加载订单数据失败',
icon: 'none',
duration: 2000,
});
});
})
})
},
addressTap: function () {
this.showAddress = true;
this.showAddress = true
if (!this.addressLoaded) {
this.addressLoaded = true;
this.$refs.mychild.getAddressList();
this.addressLoaded = true
this.$refs.mychild.getAddressList()
}
},
addressRedirect() {
this.addressLoaded = false;
this.showAddress = false;
this.addressLoaded = false
this.showAddress = false
},
couponTap: function () {
this.showCoupon = true;
this.showCoupon = true
},
changeCoupon: function (coupon) {
if (!coupon) {
this.usableCoupon = {
couponTitle: "不使用优惠券",
couponTitle: '不使用优惠券',
id: 0,
};
}
} else {
this.usableCoupon = coupon;
this.usableCoupon = coupon
}
this.computedPrice();
this.computedPrice()
},
payItem: function (index) {
this.active = index;
this.active = index
},
changeAddress(addressInfo) {
this.addressInfo = addressInfo;
this.computedPrice();
this.addressInfo = addressInfo
this.computedPrice()
},
createOrder() {
if (this.isIntegral) {
//
if (this.userInfo.integral < this.orderPrice.payIntegral) {
uni.showToast({
title: "积分不足",
icon: "none",
title: '积分不足',
icon: 'none',
duration: 2000,
});
})
return
}
this.active = 'integral'
}
let shipping_type = this.shipping_type;
let shipping_type = this.shipping_type
if (!this.isIntegral && !this.active) {
uni.showToast({
title: "请选择支付方式",
icon: "none",
title: '请选择支付方式',
icon: 'none',
duration: 2000,
});
return;
})
return
}
if (!this.addressInfo.id && !this.shipping_type) {
uni.showToast({
title: "请选择收货地址",
icon: "none",
title: '请选择收货地址',
icon: 'none',
duration: 2000,
});
return;
})
return
}
if (this.shipping_type) {
if (
(this.contacts === "" || this.contactsTel === "") &&
this.shipping_type
) {
if ((this.contacts === '' || this.contactsTel === '') && this.shipping_type) {
uni.showToast({
title: "请填写联系人或联系人电话",
icon: "none",
title: '请填写联系人或联系人电话',
icon: 'none',
duration: 2000,
});
return;
})
return
}
if (!/^1(3|4|5|7|8|9|6)\d{9}$/.test(this.contactsTel)) {
uni.showToast({
title: "请填写正确的手机号",
icon: "none",
title: '请填写正确的手机号',
icon: 'none',
duration: 2000,
});
return;
})
return
}
if (!/^[\u4e00-\u9fa5\w]{2,16}$/.test(this.contacts)) {
uni.showToast({
title: "请填写您的真实姓名",
icon: "none",
title: '请填写您的真实姓名',
icon: 'none',
duration: 2000,
});
return;
})
return
}
}
uni.showLoading({
title: "生成订单中",
});
let from = {};
if (this.$deviceType == "app") {
from.from = "app";
title: '生成订单中',
})
let from = {}
if (this.$deviceType == 'app') {
from.from = 'app'
}
// #ifdef MP-WEIXIN
subscribeMessage()
@ -560,19 +523,19 @@
combinationId: this.orderGroupInfo.combination_id,
bargainId: this.orderGroupInfo.bargain_id,
from: this.from,
mark: this.mark || "",
mark: this.mark || '',
shippingType: parseInt(shipping_type) + 1,
storeId: this.storeItems ? this.storeItems.id : this.systemStore.id,
...from,
})
.then((res) => {
uni.hideLoading();
handleOrderPayResults.call(this, res.data, "create", this.active);
.then(res => {
uni.hideLoading()
handleOrderPayResults.call(this, res.data, 'create', this.active)
})
.catch(err => {
handleErrorMessage(err, '创建订单失败')
})
.catch((err) => {
handleErrorMessage(err, "创建订单失败");
});
},
},
};
}
</script>

782
pages/shop/GoodsCon/index.vue

File diff suppressed because it is too large Load Diff

193
pages/shop/GoodsList/index.vue

@ -10,7 +10,7 @@
</view>
</form>
<view class="nav acea-row row-middle">
<view class="item" :class="title ? 'font-color-red' : ''" @click="set_where(0)">{{ title ? title : "默认" }}</view>
<view class="item" :class="title ? 'font-color-red' : ''" @click="set_where(0)">{{ title ? title : '默认' }}</view>
<view class="item" @click="set_where(1)">
价格
<image src="@/static/images/horn.png" v-if="price === 0" />
@ -26,10 +26,8 @@
<!-- down -->
<view class="item" :class="nows ? 'font-color-red' : ''" @click="set_where(3)">新品</view>
</view>
<view class="list acea-row row-between-wrapper" :class="Switch === true ? '' : 'on'" ref="container"
v-if="isIntegral=='false'">
<view @click="goGoodsCon(item)" class="item" :class="Switch === true ? '' : 'on'"
v-for="(item, productListIndex) in productList" :key="productListIndex" :title="item.storeName">
<view class="list acea-row row-between-wrapper" :class="Switch === true ? '' : 'on'" ref="container" v-if="isIntegral == 'false'">
<view @click="goGoodsCon(item)" class="item" :class="Switch === true ? '' : 'on'" v-for="(item, productListIndex) in productList" :key="productListIndex" :title="item.storeName">
<view class="pictrue" :class="Switch === true ? '' : 'on'">
<image :src="item.image" :class="Switch === true ? '' : 'on'" />
</view>
@ -46,10 +44,8 @@
</view>
</view>
</view>
<view class="list acea-row row-between-wrapper" :class="Switch === true ? '' : 'on'" ref="container"
v-if="isIntegral=='true'">
<view @click="goGoodsCon(item)" class="item" :class="Switch === true ? '' : 'on'"
v-for="(item, productListIndex) in productList" :key="productListIndex" :title="item.storeName">
<view class="list acea-row row-between-wrapper" :class="Switch === true ? '' : 'on'" ref="container" v-if="isIntegral == 'true'">
<view @click="goGoodsCon(item)" class="item" :class="Switch === true ? '' : 'on'" v-for="(item, productListIndex) in productList" :key="productListIndex" :title="item.storeName">
<view class="pictrue" :class="Switch === true ? '' : 'on'">
<image :src="item.image" :class="Switch === true ? '' : 'on'" />
</view>
@ -71,19 +67,16 @@
<image src="@/static/images/noGood.png" class="image" />
</view>
</view>
<Recommend v-if="productList.length === 0 && where.page > 1" :recommendLoading="recommendLoading"
@changeRecommendLoading="changeRecommendLoading"></Recommend>
<Recommend v-if="productList.length === 0 && where.page > 1" :recommendLoading="recommendLoading" @changeRecommendLoading="changeRecommendLoading"></Recommend>
</view>
</template>
<script>
import Recommend from "@/components/Recommend";
import {
getProducts,getProductsIntegral
} from "@/api/store";
import Loading from "@/components/Loading";
import Recommend from '@/components/Recommend'
import { getProducts, getProductsIntegral } from '@/api/store'
import Loading from '@/components/Loading'
export default {
name: "GoodsList",
export default {
name: 'GoodsList',
components: {
Recommend,
Loading,
@ -91,9 +84,9 @@
props: {},
data: function () {
// const { s = "", id = 0, title = "" } = this.$yroute.query;
const s = "",
const s = '',
id = 0,
title = "";
title = ''
return {
hostProduct: [],
@ -105,11 +98,11 @@
keyword: s,
sid: id, //id
news: 0,
priceOrder: "",
salesOrder: "",
priceOrder: '',
salesOrder: '',
},
title: title && id ? title : "",
loadTitle: "",
title: title && id ? title : '',
loadTitle: '',
loading: false,
loadend: false,
price: 0,
@ -117,12 +110,12 @@
nows: false,
recommendLoading: false,
target: false,
isIntegral: false
};
isIntegral: false,
}
},
watch: {
title() {
this.updateTitle();
this.updateTitle()
},
$yroute(to) {
// if (to.name !== "GoodsList") return;
@ -143,18 +136,16 @@
},
},
mounted: function () {
const {
s = "", id = 0, title = "", isIntegral = false
} = this.$yroute.query;
this.where.keyword = s;
this.where.isIntegral = isIntegral == 'true' ? 1 : 0;
const { s = '', id = 0, title = '', isIntegral = false } = this.$yroute.query
this.where.keyword = s
this.where.isIntegral = isIntegral == 'true' ? 1 : 0
this.isIntegral = isIntegral
this.updateTitle();
this.getProductList();
this.updateTitle()
this.getProductList()
},
onReachBottom() {
this.recommendLoading = true;
!this.loading && this.getProductList();
this.recommendLoading = true
!this.loading && this.getProductList()
},
onHide() {
// this.hostProduct = [];
@ -178,122 +169,120 @@
},
methods: {
changeRecommendLoading(recommendLoading) {
this.recommendLoading = recommendLoading;
this.recommendLoading = recommendLoading
},
goGoodsCon(item) {
this.$yrouter.push({
path: "/pages/shop/GoodsCon/index",
path: '/pages/shop/IntegralGoodsCon/index',
query: {
id: item.id,
isIntegral:this.isIntegral
isIntegral: this.isIntegral,
},
});
})
},
updateTitle() {
// document.title = this.title || this.$yroute.meta.title;
},
getProductList() {
var that = this;
this.setWhere();
var that = this
this.setWhere()
// if (to.name !== "GoodsList") return;
const {
s = "", id = 0, title = ""
} = this.$yroute.query;
const { s = '', id = 0, title = '' } = this.$yroute.query
if (s !== this.where.keyword || id !== this.where.sid) {
this.loadend = false;
this.loading = false;
this.where.page = 1;
this.where.sid = id;
this.title = title && id ? title : "";
this.nows = false;
this.$set(this, "productList", []);
this.price = 0;
this.stock = 0;
this.loadend = false
this.loading = false
this.where.page = 1
this.where.sid = id
this.title = title && id ? title : ''
this.nows = false
this.$set(this, 'productList', [])
this.price = 0
this.stock = 0
// this.getProductList();
}
let q = that.where;
let q = that.where
let getData = this.isIntegral !== 'true' ? getProducts : getProductsIntegral
getData(q).then((res) => {
that.loading = false;
getData(q).then(res => {
that.loading = false
if (that.target) {
that.productList = res.data;
that.productList = res.data
} else {
that.productList.push.apply(that.productList, res.data);
that.productList.push.apply(that.productList, res.data)
}
that.target = false
that.loadend = res.data.length < that.where.limit; //
that.where.page = that.where.page + 1;
});
that.loadend = res.data.length < that.where.limit //
that.where.page = that.where.page + 1
})
},
submitForm: function () {
this.$set(this, "productList", []);
this.where.page = 1;
this.loadend = false;
this.loading = false;
this.getProductList();
this.$set(this, 'productList', [])
this.where.page = 1
this.loadend = false
this.loading = false
this.getProductList()
},
//
set_where: function (index) {
let that = this;
let that = this
switch (index) {
case 0:
return that.$yrouter.push({
path: "/pages/shop/GoodsClass/index",
});
path: '/pages/shop/GoodsClass/index',
})
case 1:
if (that.price === 0) that.price = 1;
else if (that.price === 1) that.price = 2;
else if (that.price === 2) that.price = 0;
that.stock = 0;
break;
if (that.price === 0) that.price = 1
else if (that.price === 1) that.price = 2
else if (that.price === 2) that.price = 0
that.stock = 0
break
case 2:
if (that.stock === 0) that.stock = 1;
else if (that.stock === 1) that.stock = 2;
else if (that.stock === 2) that.stock = 0;
that.price = 0;
break;
if (that.stock === 0) that.stock = 1
else if (that.stock === 1) that.stock = 2
else if (that.stock === 2) that.stock = 0
that.price = 0
break
case 3:
that.nows = !that.nows;
break;
that.nows = !that.nows
break
default:
break;
break
}
this.productList = [];
that.$set(that, "productList", []);
that.where.page = 1;
that.target = true;
that.loadend = false;
that.getProductList();
this.productList = []
that.$set(that, 'productList', [])
that.where.page = 1
that.target = true
that.loadend = false
that.getProductList()
},
//where
setWhere: function () {
let that = this;
let that = this
if (that.price === 0) {
that.where.priceOrder = "";
that.where.priceOrder = ''
} else if (that.price === 1) {
that.where.priceOrder = "asc";
that.where.priceOrder = 'asc'
} else if (that.price === 2) {
that.where.priceOrder = "desc";
that.where.priceOrder = 'desc'
}
if (that.stock === 0) {
that.where.salesOrder = "";
that.where.salesOrder = ''
} else if (that.stock === 1) {
that.where.salesOrder = "asc";
that.where.salesOrder = 'asc'
} else if (that.stock === 2) {
that.where.salesOrder = "desc";
that.where.salesOrder = 'desc'
}
that.where.news = that.nows ? "1" : "0";
that.where.news = that.nows ? '1' : '0'
},
switchTap: function () {
let that = this;
that.Switch = !that.Switch;
let that = this
that.Switch = !that.Switch
},
},
};
}
</script>
<style scoped lang="less">
.noCommodity {
.noCommodity {
border-top: 3px solid #f5f5f5;
padding-bottom: 1px;
}
}
</style>

867
pages/shop/IntegralGoodsCon/index.vue

@ -0,0 +1,867 @@
<template>
<view :class="productConClass">
<view v-if="storeInfo.id">
<!-- 轮播图 -->
<product-con-swiper :img-urls="storeInfo.sliderImageArr"></product-con-swiper>
<!-- 商品信息描述 -->
<view class="wrapper">
<view class="share acea-row row-between row-bottom">
<view class="money font-color-red">
<text class="num">{{ attr.productSelect.integral || storeInfo.integral }}积分</text>
</view>
<view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view>
</view>
<view class="introduce">{{ storeInfo.storeName }}</view>
<view class="label acea-row row-between-wrapper">
<text>库存:{{ storeInfo.stock }}{{ storeInfo.unitName }}</text>
<text>销量:{{ storeInfo.sales }}{{ storeInfo.unitName }}</text>
</view>
</view>
<!-- 规格 -->
<view class="attribute acea-row row-between-wrapper" @click="selecAttrTap">
<view>
<text>{{ attrTxt }}</text>
<text class="atterTxt">{{ attrValue }}</text>
</view>
<view class="iconfont icon-jiantou"></view>
</view>
<!-- 用户评价 -->
<view class="userEvaluation" v-if="replyCount">
<view class="title acea-row row-between-wrapper">
<view>用户评价({{ replyCount }})</view>
<text @click="goEvaluateList(id)" class="praise">
<text class="font-color-red">{{ replyChance }}%</text>好评率
<text class="iconfont icon-jiantou"></text>
</text>
</view>
<user-evaluation :reply="reply"></user-evaluation>
</view>
<!-- 商品详情 -->
<view class="product-intro">
<text class="title">产品介绍</text>
<view class="conter" v-html="storeInfo.description"></view>
</view>
<view style="height: 100rpx"></view>
<!-- 操作栏 -->
<view class="footer acea-row row-between-wrapper">
<view class="item" @click="goHome">
<view class="iconfont icon-shouye-xianxing"></view>
<text>首页</text>
</view>
<view class="bnt in-bnt acea-row">
<view class="buy" @click="tapBuy">
<text>立即购买</text>
</view>
</view>
</view>
<!-- 商品规格弹窗 -->
<ProductWindow :isIntegral="isIntegral" v-on:changeFun="changeFun" :attr="attr" :cartNum="cart_num"></ProductWindow>
<!-- 分享海报 -->
<StorePoster v-on:setPosterImageStatus="setPosterImageStatus" :posterImageStatus="posterImageStatus" :posterData="posterData" :goodId="id"></StorePoster>
</view>
</view>
</template>
<script>
// import { swiper, swiperSlide } from "vue-awesome-swiper";
import ProductConSwiper from '@/components/ProductConSwiper'
import UserEvaluation from '@/components/UserEvaluation'
import CouponPop from '@/components/CouponPop'
import ProductWindow from '@/components/ProductWindow'
import StorePoster from '@/components/StorePoster'
import ShareInfo from '@/components/ShareInfo'
import { getProductDetail, postCartAdd, getCartCount, getProductCode } from '@/api/store'
import { getCoupon, getCollectAdd, getCollectDel, getUserInfo } from '@/api/user'
import cookie from '@/utils/store/cookie'
import { isWeixin, PosterCanvas, handleQrCode, handleUrlParam, getCurrentPageUrlWithArgs } from '@/utils'
import { wechatEvevt } from '@/libs/wechat'
import { imageBase64 } from '@/api/public'
import { mapGetters } from 'vuex'
export default {
name: 'GoodsCon',
components: {
// swiper,
// swiperSlide,
ProductConSwiper,
UserEvaluation,
CouponPop,
ProductWindow,
StorePoster,
ShareInfo,
},
data: function () {
return {
shareInfoStatus: false,
weixinStatus: false,
mapShow: false,
mapKey: '',
posterData: {
image: '',
title: '',
price: '',
code: '',
},
posterImageStatus: false,
animated: false,
coupon: {
coupon: false,
list: [],
},
attr: {
cartAttr: false,
productAttr: [],
productSelect: {},
},
isOpen: false, //
productValue: [],
id: 0,
storeInfo: {},
couponList: [],
attrTxt: '请选择',
attrValue: '',
cart_num: 1, //
replyCount: '',
replyChance: '',
reply: [],
priceName: 0,
CartCount: 0,
posters: false,
banner: [{}, {}],
swiperRecommend: {
pagination: {
el: '.swiper-pagination',
clickable: true,
},
autoplay: false,
loop: false,
speed: 1000,
observer: true,
observeParents: true,
},
goodList: [],
systemStore: {},
qqmapsdk: null,
productConClass: 'product-con',
tempName: '全国包邮',
isIntegral: false,
}
},
computed: mapGetters(['isLogin', 'location']),
mounted: function () {
this.$store.commit('get_to', 'goodcon')
let url = handleQrCode()
if (!url) {
url = handleUrlParam(getCurrentPageUrlWithArgs())
}
this.coupons()
if (url && url.id) {
this.id = url.id
let urlSpread = parseInt(url.spread)
if (urlSpread) {
cookie.set('spread', urlSpread)
}
} else {
this.id = this._route.query.id
}
this.isIntegral = url.isIntegral == 'true'
this.productCon()
this.setOpenShare()
},
watch: {
posterImageStatus(status) {
console.log(status)
if (status) {
this.productConClass = 'noscroll product-con'
} else {
this.productConClass = 'product-con'
}
},
},
methods: {
onShareAppMessage: function () {
return {
title: this.storeInfo.storeName,
imageUrl: this.storeInfo.image,
path: 'pages/shop/GoodsCon/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine',
success(res) {
uni.showToast({
title: '分享成功',
})
},
fail(res) {
uni.showToast({
title: '分享失败',
icon: 'none',
})
},
}
},
goHome() {
this.$yrouter.switchTab('/pages/home/index')
},
goShoppingCart() {
this.$yrouter.switchTab('/pages/shop/ShoppingCart/index')
},
goCustomerList() {
this.$yrouter.push({
path: '/pages/user/CustomerList/index',
})
},
goStoreList() {
this.$yrouter.push({
path: '/pages/shop/StoreList/index',
})
},
goEvaluateList(id) {
this.$yrouter.push({
path: '/pages/shop/EvaluateList/index',
query: {
id,
},
})
},
telPhone(phoneNumber) {
uni.makePhoneCall({
phoneNumber: phoneNumber,
fail() {
console.log('取消拨打')
},
})
},
showChang: function (data) {
this.$yrouter.push({
path: '/pages/map/index',
query: data,
})
},
updateTitle() {
// document.title = this.storeInfo.storeName || this.$yroute.meta.title;
},
setShareInfoStatus: function () {
this.shareInfoStatus = !this.shareInfoStatus
this.posters = false
},
shareCode: function () {
var that = this
getProductCode(that.id).then(res => {
that.posterData.code = res.data.code
that.listenerActionSheet()
})
},
setPosterImageStatus: function () {
this.posterImageStatus = !this.posterImageStatus
this.posters = false
},
//
productCon: function () {
let that = this
let from = this.location
if (this.$deviceType == 'app') {
from.from = 'app'
}
uni.showLoading({
title: '加载中',
mask: true,
})
getProductDetail(that.id, from)
.then(res => {
res.data.storeInfo.description = res.data.storeInfo.description.replace(/\<img/gi, '<img style="max-width:100%;height:auto;"')
that.$set(that, 'storeInfo', res.data.storeInfo)
// attr attr
that.$set(that.attr, 'productAttr', res.data.productAttr)
that.$set(that, 'productValue', res.data.productValue)
that.$set(that, 'replyCount', res.data.replyCount)
that.$set(that, 'replyChance', res.data.replyChance)
that.reply = res.data.reply ? [res.data.reply] : []
that.$set(that, 'reply', that.reply)
that.$set(that, 'priceName', res.data.priceName)
that.$set(that, 'tempName', res.data.tempName)
that.posterData.image = that.storeInfo.image
if (that.storeInfo.storeName.length > 30) {
that.posterData.title = that.storeInfo.storeName.substring(0, 30) + '...'
} else {
that.posterData.title = that.storeInfo.storeName
}
that.posterData.price = that.storeInfo.price
that.posterData.code = that.storeInfo.codeBase
that.systemStore = res.data.systemStore
let good_list = res.data.goodList || []
let goodArray = []
let count = Math.ceil(good_list.length / 6)
for (let i = 0; i < count; i++) {
var list = good_list.slice(i * 6, 6)
if (list.length)
goodArray.push({
list: list,
})
}
that.mapKay = res.data.mapKay
that.$set(that, 'goodList', goodArray)
that.updateTitle()
that.DefaultSelect()
that.getCartCount()
})
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message,
icon: 'none',
duration: 2000,
})
})
.finally(() => {
uni.hideLoading()
})
},
//
DefaultSelect: function () {
let productAttr = this.attr.productAttr
let value = []
for (let i = 0; i < productAttr.length; i++) {
this.$set(productAttr[i], 'index', 0)
value.push(productAttr[i].attrValueArr[0])
}
//sort();:--
let productSelect = this.productValue[value.sort().join(',')]
if (productSelect && productAttr.length) {
this.$set(this.attr.productSelect, 'store_name', this.storeInfo.storeName)
this.$set(this.attr.productSelect, 'image', productSelect.image)
this.$set(this.attr.productSelect, 'price', productSelect.price)
this.$set(this.attr.productSelect, 'stock', productSelect.stock)
this.$set(this.attr.productSelect, 'unique', productSelect.unique)
this.$set(this.attr.productSelect, 'integral', productSelect.integral)
this.$set(this.attr.productSelect, 'cart_num', 1)
this.$set(this, 'attrValue', value.sort().join(','))
this.$set(this, 'attrTxt', '已选择')
} else if (!productSelect && productAttr.length) {
this.$set(this.attr.productSelect, 'store_name', this.storeInfo.storeName)
this.$set(this.attr.productSelect, 'image', this.storeInfo.image)
this.$set(this.attr.productSelect, 'price', this.storeInfo.price)
this.$set(this.attr.productSelect, 'integral', this.storeInfo.integral)
this.$set(this.attr.productSelect, 'stock', 0)
this.$set(this.attr.productSelect, 'unique', '')
this.$set(this.attr.productSelect, 'cart_num', 0)
this.$set(this, 'attrValue', '')
this.$set(this, 'attrTxt', '请选择')
} else if (!productSelect && !productAttr.length) {
this.$set(this.attr.productSelect, 'store_name', this.storeInfo.storeName)
this.$set(this.attr.productSelect, 'image', this.storeInfo.image)
this.$set(this.attr.productSelect, 'price', this.storeInfo.price)
this.$set(this.attr.productSelect, 'stock', this.storeInfo.stock)
this.$set(this.attr.productSelect, 'integral', this.storeInfo.integral)
this.$set(this.attr.productSelect, 'unique', this.storeInfo.unique || '')
this.$set(this.attr.productSelect, 'cart_num', 1)
this.$set(this, 'attrValue', '')
this.$set(this, 'attrTxt', '请选择')
}
},
//
ChangeCartNum: function (changeValue) {
//changeValue: |
//
let productSelect = this.productValue[this.attrValue]
//,
if (productSelect === undefined && !this.attr.productAttr.length) {
productSelect = this.attr.productSelect
}
//0
if (productSelect === undefined) return
let stock = productSelect.stock || 0
let num = this.attr.productSelect
if (changeValue) {
num.cart_num++
if (num.cart_num > stock) {
this.$set(this.attr.productSelect, 'cart_num', stock)
this.$set(this, 'cart_num', stock)
} else {
this.$set(this.attr.productSelect, 'cart_num', num.cart_num)
this.$set(this, 'cart_num', num.cart_num)
}
} else {
num.cart_num--
if (num.cart_num < 1) {
this.$set(this.attr.productSelect, 'cart_num', 1)
this.$set(this, 'cart_num', 1)
} else {
this.$set(this.attr.productSelect, 'cart_num', num.cart_num)
this.$set(this, 'cart_num', num.cart_num)
}
}
},
//
changeFun: function (opt) {
if (typeof opt !== 'object') opt = {}
let action = opt.action || ''
let value = opt.value === undefined ? '' : opt.value
this[action] && this[action](value)
},
//
couponTap: function () {
let that = this
that.coupons()
that.coupon.coupon = true
},
changecoupon: function (msg) {
this.coupon.coupon = msg
this.coupons()
},
currentcoupon: function (res) {
let that = this
that.coupon.coupon = false
that.$set(that.coupon.list[res], 'is_use', true)
},
//
coupons: function () {
let that = this,
q = {
page: 1,
limit: 20,
}
getCoupon(q).then(res => {
that.$set(that, 'couponList', res.data || [])
that.$set(that.coupon, 'list', res.data)
})
},
//
selecAttrTap: function () {
this.attr.cartAttr = true
this.isOpen = true
},
changeattr: function (msg) {
//
console.log(msg)
this.attr.cartAttr = msg
this.isOpen = false
},
//
ChangeAttr: function (res) {
//
let productSelect = this.productValue[res.value]
console.log(productSelect)
if (productSelect) {
this.attr.productAttr[res.indexw].index = res.indexn
this.$set(this.attr.productSelect, 'image', productSelect.image)
this.$set(this.attr.productSelect, 'price', productSelect.price)
this.$set(this.attr.productSelect, 'stock', productSelect.stock)
this.$set(this.attr.productSelect, 'unique', productSelect.unique)
this.$set(this.attr.productSelect, 'integral', productSelect.integral)
this.$set(this.attr.productSelect, 'cart_num', 1)
this.$set(this, 'attrValue', res.value)
this.$set(this, 'attrTxt', '已选择')
} else {
this.$set(this.attr.productSelect, 'image', this.storeInfo.image)
this.$set(this.attr.productSelect, 'price', this.storeInfo.price)
this.$set(this.attr.productSelect, 'integral', this.storeInfo.price)
this.$set(this.attr.productSelect, 'stock', 0)
this.$set(this.attr.productSelect, 'unique', '')
this.$set(this.attr.productSelect, 'cart_num', 0)
this.$set(this, 'attrValue', '')
this.$set(this, 'attrTxt', '请选择')
}
},
//
setCollect: function () {
let that = this,
id = that.storeInfo.id,
category = 'collect'
if (that.storeInfo.userCollect) {
getCollectDel(id, category).then(function () {
that.storeInfo.userCollect = !that.storeInfo.userCollect
})
} else {
getCollectAdd(id, category).then(function () {
that.storeInfo.userCollect = !that.storeInfo.userCollect
})
}
},
//
joinCart: function () {
//0=
this.goCat(0)
},
//
goCat: function (news) {
let that = this,
productSelect = that.productValue[this.attrValue]
//
if (that.attrValue) {
//
that.attr.cartAttr = !that.isOpen ? true : false
} else {
if (that.isOpen) that.attr.cartAttr = true
else that.attr.cartAttr = !that.attr.cartAttr
}
//
if (that.attr.cartAttr === true && that.isOpen === false) return (that.isOpen = true)
//,,
if (that.attr.productAttr.length && productSelect === undefined && that.isOpen === true) {
uni.showToast({
title: '产品库存不足,请选择其它',
icon: 'none',
duration: 2000,
})
return
}
let q = {
productId: that.id,
cartNum: that.attr.productSelect.cart_num,
new: news,
uniqueId: that.attr.productSelect !== undefined ? that.attr.productSelect.unique : '',
}
postCartAdd(q)
.then(function (res) {
console.log(res)
that.isOpen = false
that.attr.cartAttr = false
if (news) {
if (!res.data) {
uni.showToast({
title: res.msg || res.data.msg || res.data.message,
icon: 'none',
duration: 2000,
})
return
}
that.$yrouter.push({
path: '/pages/order/OrderSubmission/index',
query: {
id: res.data.cartId,
isIntegral: that.isIntegral,
},
})
} else {
uni.showToast({
title: '添加购物车成功',
icon: 'success',
duration: 2000,
complete: () => {
that.getCartCount(true)
},
})
}
})
.catch(error => {
console.log(error)
that.isOpen = false
uni.showToast({
title: error.msg || error.response.data.msg || error.response.data.message,
icon: 'none',
duration: 2000,
})
})
},
//
getCartCount: function (isAnima) {
let that = this
const isLogin = that.isLogin
if (isLogin) {
getCartCount({
numType: 0,
}).then(res => {
that.CartCount = res.data.count
//
if (isAnima) {
that.animated = true
setTimeout(function () {
that.animated = false
}, 500)
}
})
}
},
//
tapBuy: function () {
// 1=
this.goCat(1)
},
listenerActionSheet: function () {
if (isWeixin() === true) {
this.weixinStatus = true
}
this.posters = true
},
listenerActionClose: function () {
this.posters = false
},
setOpenShare: function () {
var data = this.storeInfo
var href = this.location.href
if (this.$deviceType == 'weixin') {
if (this.isLogin) {
getUserInfo().then(res => {
href = href.indexOf('?') === -1 ? href + '?spread=' + res.data.uid : href + '&spread=' + res.data.uid
var configAppMessage = {
desc: data.storeInfo,
title: data.storeName,
link: href,
imgUrl: data.image,
}
wechatEvevt(['updateAppMessageShareData', 'updateTimelineShareData'], configAppMessage)
.then(res => {})
.catch(res => {
if (res.is_ready) {
res.wx.updateAppMessageShareData(configAppMessage)
res.wx.updateTimelineShareData(configAppMessage)
}
})
})
} else {
var configAppMessage = {
desc: data.storeInfo,
title: data.storeName,
link: href,
imgUrl: data.image,
}
wechatEvevt(['updateAppMessageShareData', 'updateTimelineShareData'], configAppMessage)
.then(res => {})
.catch(res => {
if (res.is_ready) {
res.wx.updateAppMessageShareData(configAppMessage)
res.wx.updateTimelineShareData(configAppMessage)
}
})
}
}
},
},
}
</script>
<style scoped lang="less">
.geoPage {
position: fixed;
width: 100%;
height: 100%;
top: 0;
z-index: 10000;
}
.product-con .store-info {
margin-top: 0.2 * 100rpx;
background-color: #fff;
}
.product-con .store-info .title {
padding: 0 0.3 * 100rpx;
font-size: 0.28 * 100rpx;
color: #282828;
height: 0.8 * 100rpx;
line-height: 0.8 * 100rpx;
border-bottom: 0.01 * 100rpx solid #f5f5f5;
}
.product-con .store-info .info {
padding: 0 0.3 * 100rpx;
height: 1.26 * 100rpx;
}
.product-con .store-info .info .picTxt {
width: 100%;
display: flex;
align-items: center;
}
.product-con .store-info .info .picTxt .pictrue {
width: 0.76 * 100rpx;
height: 0.76 * 100rpx;
margin-right: 0.2 * 100rpx;
}
.product-con .store-info .info .picTxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 0.06 * 100rpx;
}
.product-con .store-info .info .picTxt .text {
flex: 1;
}
.product-con .store-info .info .picTxt .text .name {
font-size: 0.3 * 100rpx;
color: #282828;
}
.product-con .store-info .info .picTxt .text .address {
font-size: 0.24 * 100rpx;
color: #666;
margin-top: 0.03 * 100rpx;
}
.product-con .store-info .info .picTxt .text .address .iconfont {
color: #707070;
font-size: 0.18 * 100rpx;
margin-left: 0.1 * 100rpx;
}
.product-con .store-info .info .picTxt .addressBox {
display: flex;
flex-direction: column;
align-items: flex-end;
}
.product-con .store-info .info .picTxt .addressBox .iconfont {
font-size: 0.4 * 100rpx;
}
.product-con .store-info .info .picTxt .addressBox .addressTxt {
font-size: 0.24 * 100rpx;
color: #eb3729;
}
.product-con .store-info .praise {
font-size: 0.28 * 100rpx;
color: #808080;
}
.product-con .store-info .praise .iconfont {
font-size: 0.28 * 100rpx;
}
.product-con .superior {
background-color: #fff;
margin-top: 0.2 * 100rpx;
}
.product-con .superior .title {
height: 0.98 * 100rpx;
}
.product-con .superior .title image {
width: 0.3 * 100rpx;
height: 0.3 * 100rpx;
}
.product-con .superior .title .titleTxt {
margin: 0 0.2 * 100rpx;
font-size: 0.3 * 100rpx;
background-image: linear-gradient(to right, #f57a37 0%, #f21b07 100%);
background-image: -webkit-linear-gradient(to right, #f57a37 0%, #f21b07 100%);
background-image: -moz-linear-gradient(to right, #f57a37 0%, #f21b07 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.product-con .superior .slider-banner {
width: 6.9 * 100rpx;
margin: 0 auto;
padding-bottom: 0.2 * 100rpx;
}
.product-con .superior .slider-banner .list {
width: 100%;
padding-bottom: 0.2 * 100rpx;
}
.product-con .superior .slider-banner .list .item {
width: 2.15 * 100rpx;
margin: 0 0.22 * 100rpx 0.3 * 100rpx 0;
font-size: 0.26 * 100rpx;
}
.product-con .superior .slider-banner .list .item:nth-of-type(3n) {
margin-right: 0;
}
.product-con .superior .slider-banner .list .item .pictrue {
width: 100%;
height: 2.15 * 100rpx;
}
.product-con .superior .slider-banner .list .item .pictrue image {
width: 100%;
height: 100%;
border-radius: 0.06 * 100rpx;
}
.product-con .superior .slider-banner .list .item .name {
color: #282828;
margin-top: 0.12 * 100rpx;
}
.product-con .superior .slider-banner .swiper-pagination-bullet {
background-color: #999;
}
.product-con .superior .slider-banner .swiper-pagination-bullet-active {
background-color: #e93323;
}
.mask {
-webkit-filter: blur(2px);
-moz-filter: blur(2px);
-ms-filter: blur(2px);
filter: blur(2px);
}
.product-con .product-intro .conter view {
width: 100% !important;
}
.generate-posters {
width: 100%;
height: 1.7 * 100rpx;
background-color: #fff;
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
transform: translate3d(0, 100%, 0);
-webkit-transform: translate3d(0, 100%, 0);
-ms-transform: translate3d(0, 100%, 0);
-moz-transform: translate3d(0, 100%, 0);
-o-transform: translate3d(0, 100%, 0);
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
-webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
-moz-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
-o-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
}
.generate-posters.on {
transform: translate3d(0, 0, 0);
-webkit-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
}
.generate-posters .item {
flex: 50%;
-webkit-flex: 50%;
-ms-flex: 50%;
text-align: center;
}
.generate-posters .item .iconfont {
font-size: 0.8 * 100rpx;
color: #5eae72;
}
.generate-posters .item .iconfont.icon-haibao {
color: #5391f1;
}
.noscroll {
height: 100%;
overflow: hidden;
}
.product-con .footer {
.in-bnt {
width: auto;
flex: 1;
margin-left: 30rpx;
& > view {
width: 100%;
border-radius: 50rpx;
}
}
}
</style>

5
pages/user/User/index.vue

@ -114,11 +114,6 @@
<text class="iconfont icon-jiantou"></text>
</view>
</template>
<view class="item" @click="goPages2()">
<view class="pictrue"></view>
<view class="cell">积分商城</view>
<text class="iconfont icon-jiantou"></text>
</view>
</view>
</view>
</view>

Loading…
Cancel
Save