This commit is contained in:
qijq 2025-04-24 15:47:08 +08:00
parent 789f8bb290
commit 3e26f6d3b4
101 changed files with 64352 additions and 51083 deletions

28
App.vue
View File

@ -10,7 +10,6 @@ let jyappEvents = uni.requireNativePlugin("JY-FaceBookAppEvents");
if (typeof jyappEvents != "undefined") { if (typeof jyappEvents != "undefined") {
} }
// #endif // #endif
export default { export default {
data() { data() {
return { return {
@ -37,6 +36,7 @@ export default {
} }
let that = this; let that = this;
uni.getSystemInfo({ uni.getSystemInfo({
success: function (e) { success: function (e) {
//console.log(e); //res //console.log(e); //res
@ -2105,8 +2105,8 @@ form button {
position: relative; position: relative;
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
background: url(https://static.lancerdt.com/xcxfile/appicon/pc1.png) center background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/pc1.png)
no-repeat; center no-repeat;
background-size: cover; background-size: cover;
} }
@ -2114,8 +2114,8 @@ form button {
position: relative; position: relative;
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
background: url(https://static.lancerdt.com/xcxfile/appicon/pc2.png) center background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/pc2.png)
no-repeat; center no-repeat;
background-size: cover; background-size: cover;
} }
@ -2129,8 +2129,8 @@ form button {
color: #fff; color: #fff;
font-size: 24rpx; font-size: 24rpx;
line-height: 50rpx; line-height: 50rpx;
background: url(https://static.lancerdt.com/xcxfile/appicon/pc3.png) center background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/pc3.png)
no-repeat; center no-repeat;
background-size: cover; background-size: cover;
} }
@ -2526,7 +2526,7 @@ form button {
.m-coupon-box-top { .m-coupon-box-top {
width: 600rpx; width: 600rpx;
height: 200rpx; height: 200rpx;
background: url(https://static.lancerdt.com/xcxfile/appicon/Coupon_box.png) top no-repeat; background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/Coupon_box.png) top no-repeat;
background-size: cover; background-size: cover;
margin-bottom: -80rpx; margin-bottom: -80rpx;
} }
@ -2534,7 +2534,7 @@ form button {
.m-coupon-box-bottom { .m-coupon-box-bottom {
width: 600rpx; width: 600rpx;
height: 280rpx; height: 280rpx;
background: url(https://static.lancerdt.com/xcxfile/appicon/Coupon_box.png) bottom no-repeat; background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/Coupon_box.png) bottom no-repeat;
background-size: cover; background-size: cover;
margin-top: -70rpx; margin-top: -70rpx;
} }
@ -2612,7 +2612,7 @@ form button {
.m-coupon-box-top { .m-coupon-box-top {
width: 600rpx; width: 600rpx;
height: 220rpx; height: 220rpx;
background: url(https://static.lancerdt.com/xcxfile/appicon/coupon/redbag_double.png) background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/coupon/redbag_double.png)
top no-repeat; top no-repeat;
background-size: cover; background-size: cover;
} }
@ -2620,7 +2620,7 @@ form button {
.m-coupon-box-top2 { .m-coupon-box-top2 {
width: 600rpx; width: 600rpx;
height: 220rpx; height: 220rpx;
background: url(https://static.lancerdt.com/xcxfile/appicon/coupon/redbag_double2.png) background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/coupon/redbag_double2.png)
top no-repeat; top no-repeat;
background-size: cover; background-size: cover;
} }
@ -2628,7 +2628,7 @@ form button {
.m-coupon-box-bottom { .m-coupon-box-bottom {
width: 600rpx; width: 600rpx;
height: 120rpx; height: 120rpx;
background: url(https://static.lancerdt.com/xcxfile/appicon/coupon/redbag_double.png) background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/coupon/redbag_double.png)
bottom no-repeat; bottom no-repeat;
background-size: cover; background-size: cover;
} }
@ -2636,7 +2636,7 @@ form button {
.m-coupon-box-content { .m-coupon-box-content {
width: 600rpx; width: 600rpx;
max-height: 400rpx; max-height: 400rpx;
background: url(https://static.lancerdt.com/xcxfile/appicon/coupon/redbag_double.png) background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/coupon/redbag_double.png)
center no-repeat; center no-repeat;
background-size: cover; background-size: cover;
} }
@ -2650,7 +2650,7 @@ form button {
.m-coupon-box-item { .m-coupon-box-item {
width: 460rpx; width: 460rpx;
height: 170rpx; height: 170rpx;
background: url(https://static.lancerdt.com/xcxfile/appicon/coupon/coupon_muti.png) background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/coupon/coupon_muti.png)
no-repeat; no-repeat;
margin: 10rpx auto; margin: 10rpx auto;
background-size: contain; background-size: contain;

File diff suppressed because it is too large Load Diff

View File

@ -993,7 +993,7 @@ export default {
width: 700rpx; width: 700rpx;
height: 192rpx; height: 192rpx;
margin: 10rpx auto; margin: 10rpx auto;
background: url(https://static.lancerdt.com/xcxfile/appicon/Coupon_V2.png) background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/Coupon_V2.png)
no-repeat; no-repeat;
background-size: contain; background-size: contain;
box-sizing: border-box; box-sizing: border-box;
@ -1001,7 +1001,7 @@ export default {
} }
.m-coupon-item.off { .m-coupon-item.off {
background: url(https://static.lancerdt.com/xcxfile/appicon/Coupon_off.png) background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/Coupon_off.png)
no-repeat; no-repeat;
background-size: contain; background-size: contain;
} }

View File

@ -1,247 +1,301 @@
<template> <template>
<view class="page"> <view class="page">
<scroll-view class="m-scrollBox" scroll-y="true"> <scroll-view class="m-scrollBox" scroll-y="true">
<block v-if="(UserCoupon.length>0)"> <block v-if="UserCoupon.length > 0">
<view class="m-coupon-item" @click="changecoupon" :data-id="(item.user_voucher_id)" :data-item_id="(item.item_id)" v-for="(item, index) in UserCoupon" :key="index"> <view
<image lazy-load :src="((item.voucher_state_id==1501 && item.voucher_subtotal<=amount)?'https://static.lancerdt.com/xcxfile/appicon/images/coupon_red.png':'https://static.lancerdt.com/xcxfile/appicon/images/coupon_gray.png')" class="item-bg"></image> class="m-coupon-item"
@click="changecoupon"
:data-id="item.user_voucher_id"
:data-item_id="item.item_id"
v-for="(item, index) in UserCoupon"
:key="index"
>
<image
lazy-load
:src="
item.voucher_state_id == 1501 && item.voucher_subtotal <= amount
? 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/coupon_red.png'
: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/coupon_gray.png'
"
class="item-bg"
></image>
<view class="coupon-item-left"> <view class="coupon-item-left">
<view class="item-left-top">{{__('¥')}}<label style="font-size:64rpx">{{item.voucher_price}}</label></view> <view class="item-left-top"
<view class="item-left-bottom">{{sprintf(__('满(%s)可用'), item.voucher_subtotal)}}</view> >{{ __("¥")
</view> }}<label style="font-size: 64rpx">{{
<view class="coupon-item-right"> item.voucher_price
<view class="item-title item-title-black">{{item.activity_name}}</view> }}</label></view
<view class="item-middle">{{sprintf(__('满 %s 减 %s'), item.voucher_subtotal, item.voucher_price)}}</view> >
<view class="item-middle"> <view class="item-left-bottom">{{
<label class="item-time">{{item.voucher_start_date}}~{{item.voucher_end_date}}</label> sprintf(__("满(%s)可用"), item.voucher_subtotal)
</view> }}</view>
</view>
<view class="coupon-item-right">
<view class="item-title item-title-black">{{
item.activity_name
}}</view>
<view class="item-middle">{{
sprintf(
__("满 %s 减 %s"),
item.voucher_subtotal,
item.voucher_price
)
}}</view>
<view class="item-middle">
<label class="item-time"
>{{ item.voucher_start_date }}~{{
item.voucher_end_date
}}</label
>
</view>
<view class="item-desc"></view> <view class="item-desc"></view>
</view> </view>
<image lazy-load src="/static/images/checked.png" class="image-checked" v-if="(item.user_voucher_id == id_checked)" /> <image
</view> lazy-load
src="/static/images/checked.png"
class="image-checked"
v-if="item.user_voucher_id == id_checked"
/>
</view>
<button class="u-btn u-btn-default" style="margin-top:30rpx;" @click="uesnothing">{{__('不使用优惠券')}}</button> <button
</block> class="u-btn u-btn-default"
<view class="m-nullcontent" v-else> style="margin-top: 30rpx"
<view class="m-nullpage-middle"> @click="uesnothing"
<label class="iconfont icon-meiyougengduo"></label> >
<view class="m-null-tip"> {{ __("不使用优惠券") }}
<text>{{__('亲~什么都没有')}}</text> </button>
<text>{{__('赶快去领券中心吧')}}</text> </block>
</view> <view class="m-nullcontent" v-else>
</view> <view class="m-nullpage-middle">
</view> <label class="iconfont icon-meiyougengduo"></label>
</scroll-view> <view class="m-null-tip">
</view> <text>{{ __("亲~什么都没有") }}</text>
<text>{{ __("赶快去领券中心吧") }}</text>
</view>
</view>
</view>
</scroll-view>
</view>
</template> </template>
<script> <script>
import $ from "../../helpers/util"; import $ from "../../helpers/util";
import { import { mapState, mapMutations } from "vuex";
mapState,
mapMutations
} from 'vuex'
export default {
data() {
return {
options: {},
CartSelect: [],
amount: 0,
UserCoupon: [],
id_checked: 0,
IsUseCoupon: 1,
};
},
computed: mapState([
"Config",
"StateCode",
"notice",
"plantformInfo",
"shopInfo",
"userInfo",
"hasLogin",
]),
onLoad: function (options) {
uni.setNavigationBarTitle({
title: this.__("使用优惠券"),
});
export default { var voucher_items = $.parseJSON(options.val);
data() { this.setData({
return { UserCoupon: voucher_items,
options: {}, id_checked: options.user_voucher_id,
CartSelect: [], amount: options.amount,
amount: 0, options: options,
UserCoupon: [], });
id_checked: 0,
IsUseCoupon: 1
};
},
computed: mapState(['Config', 'StateCode', 'notice', 'plantformInfo', 'shopInfo', 'userInfo', 'hasLogin']),
onLoad: function(options) {
uni.setNavigationBarTitle({
title: this.__('使用优惠券')
});
var voucher_items = $.parseJSON(options.val); if (options.ifcart) {
this.setData({ this.getselect();
UserCoupon: voucher_items, }
id_checked: options.user_voucher_id, },
amount: options.amount, methods: {
options: options, ...mapMutations([
}) "login",
"logout",
"getPlantformInfo",
"forceUserInfo",
"getUserInfo",
]),
if (options.ifcart) { getselect: function () {
this.getselect() var that = this;
} var params = {};
that.$.request({
url: this.Config.URL.cart.getselect,
data: params,
success: function (data, status, msg, code) {
var isSelect = false;
if (status == 200) {
if (data["items"].length > 0) {
that.setData({
CartSelect: data["items"],
});
}
} else {
//that.$.confirm(msg);
}
},
});
},
changecoupon: function (e) {
var that = this;
var item_id = parseInt(e.currentTarget.dataset.item_id);
}, this.setData({
methods: { IsUseCoupon: 0,
...mapMutations(['login', 'logout', 'getPlantformInfo', 'forceUserInfo', 'getUserInfo']), id_checked: parseInt(e.currentTarget.dataset.id),
});
getselect: function() { that.goback();
var that = this; },
var params = {}; uesnothing: function () {
that.$.request({ var that = this;
url: this.Config.URL.cart.getselect,
data: params,
success: function(data, status, msg, code) {
var isSelect = false;
if (status == 200) {
if (data['items'].length > 0) {
that.setData({
CartSelect: data['items']
})
}
} else {
//that.$.confirm(msg);
}
}
})
},
changecoupon: function(e) {
var that = this;
var item_id = parseInt(e.currentTarget.dataset.item_id);
this.setData({ this.setData({
IsUseCoupon: 0, IsUseCoupon: 0,
id_checked: parseInt(e.currentTarget.dataset.id) id_checked: 0,
}); });
that.goback(); this.goback();
}, },
uesnothing: function() { goback: function () {
var that = this; var that = this;
$.navigateBack(1, function () {
var params = that.options;
this.setData({ params.user_voucher_id = that.id_checked;
IsUseCoupon: 0, that.notice.postNotificationName("RefreshCoupon", params);
id_checked: 0 });
}); },
},
this.goback(); };
},
goback: function() {
var that = this;
$.navigateBack(1, function() {
var params = that.options;
params.user_voucher_id = that.id_checked;
that.notice.postNotificationName("RefreshCoupon", params)
})
}
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
@import "../../styles/_variables"; @import "../../styles/_variables";
.m-scrollBox { .m-scrollBox {
padding: 10rpx 10rpx 0rpx; padding: 10rpx 10rpx 0rpx;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.m-coupon-item { .m-coupon-item {
margin: 10rpx 10rpx 20rpx; margin: 10rpx 10rpx 20rpx;
position: relative; position: relative;
width: 100%; width: 100%;
height: 190rpx; height: 190rpx;
} }
.m-coupon-item .item-bg { .m-coupon-item .item-bg {
width: 710rpx; width: 710rpx;
height: 190rpx; height: 190rpx;
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
} }
.coupon-item-left { .coupon-item-left {
position: absolute; position: absolute;
color: white; color: white;
text-align: center; text-align: center;
width: 250rpx; width: 250rpx;
padding: 25rpx 0rpx; padding: 25rpx 0rpx;
} }
.item-left-top { .item-left-top {
line-height: 100rpx; line-height: 100rpx;
font-weight: bold; font-weight: bold;
} }
.item-left-top label { .item-left-top label {
font-size: 90rpx; font-size: 90rpx;
} }
.item-left-bottom { .item-left-bottom {
font-size: 24rpx; font-size: 24rpx;
} }
.coupon-item-right { .coupon-item-right {
position: absolute; position: absolute;
left: 250rpx; left: 250rpx;
top: 0; top: 0;
width: 420rpx; width: 420rpx;
height: 170rpx; height: 170rpx;
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
font-size: 22rpx; font-size: 22rpx;
color: gray; color: gray;
} }
.item-title { .item-title {
line-height: 40rpx; line-height: 40rpx;
font-size: 28rpx; font-size: 28rpx;
height: 80rpx; height: 80rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
} }
.item-title-black { .item-title-black {
color: #333; color: #333;
} }
.item-middle { .item-middle {
height: 50rpx; height: 50rpx;
line-height: 50rpx; line-height: 50rpx;
font-size: 24rpx; font-size: 24rpx;
} }
.item-usenow { .item-usenow {
font-size: 24rpx; font-size: 24rpx;
border: 1px solid $default-skin-bg; border: 1px solid $default-skin-bg;
float: right; float: right;
color: $default-skin-bg; color: $default-skin-bg;
border-radius: 40rpx; border-radius: 40rpx;
padding: 0 15rpx; padding: 0 15rpx;
position: relative; position: relative;
top: -8rpx; top: -8rpx;
line-height: 40rpx; line-height: 40rpx;
} }
.item-desc { .item-desc {
height: 50rpx; height: 50rpx;
line-height: 50rpx; line-height: 50rpx;
margin-top: 5rpx; margin-top: 5rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
} }
.image-checked { .image-checked {
position: absolute; position: absolute;
right: 20rpx; right: 20rpx;
bottom: 0; bottom: 0;
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,198 +1,240 @@
<template> <template>
<view class="page"> <view class="page">
<view class="search"> <view class="search">
<slot></slot> <slot></slot>
<template> <template>
<input maxlength="20" type="text" value="" confirm-type="search" @confirm="searchStart()" :placeholder="__('请输入兑换码')" v-model="code" /> <input
</template> maxlength="20"
<!-- <image src="https://static.lancerdt.com/xcxfile/appicon/zy-search/search.svg" mode="aspectFit" @click="searchStart()" class="search-icon"></image> --> type="text"
<button mode="aspectFit" @click="searchStart()" style="background-color: crimson;color: aliceblue;margin-top: 40rpx;">立即兑换</button> value=""
</view> confirm-type="search"
@confirm="searchStart()"
:placeholder="__('请输入兑换码')"
v-model="code"
/>
</template>
<!-- <image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/zy-search/search.svg" mode="aspectFit" @click="searchStart()" class="search-icon"></image> -->
<button
mode="aspectFit"
@click="searchStart()"
style="background-color: crimson; color: aliceblue; margin-top: 40rpx"
>
立即兑换
</button>
</view>
<block v-if="(isData)"> <block v-if="isData">
<view class="m-cells m-cells-form"> <view class="m-cells m-cells-form">
<view class="m-cell"> <view class="m-cell">
<view class="m-cell-hd" style="width: 140rpx;"><label class="u-label">{{activityInfo.activity_title}}</label></view> <view class="m-cell-hd" style="width: 140rpx"
</view> ><label class="u-label">{{
</view> activityInfo.activity_title
<view class="m-product-list"> }}</label></view
<view v-for="(item, ii) in activityInfo.items" :key="ii" class="m-product-item"> >
<view class="m-product-img"> </view>
<image :src="item.product_image" mode="aspectFill" /> </view>
</view> <view class="m-product-list">
<view class="m-product-info"> <view
<view class="m-product-name"> v-for="(item, ii) in activityInfo.items"
<label>{{ item.product_name }}</label> :key="ii"
</view> class="m-product-item"
>
<view class="m-product-price"> <view class="m-product-img">
<block v-if="item.item_unit_price"> <image :src="item.product_image" mode="aspectFill" />
<label>{{ __('¥') }}</label> </view>
{{ item.item_unit_price }} <view class="m-product-info">
</block> <view class="m-product-name">
<text style="float: right;margin-right: 60rpx;">x{{ item.item_quantity }}</text> <label>{{ item.product_name }}</label>
</view> </view>
</view>
</view>
</view>
<button class="u-btn u-btn-default" @click="submitInfo" style="margin-top:40rpx;">{{ __('领取礼包') }}</button>
</block>
<view class="u-loadmore u-loadmore-line" v-else>
<text class="u-loadmore-tips">{{__('没有更多数据啦!')}}</text>
</view>
</view>
<view class="m-product-price">
<block v-if="item.item_unit_price">
<label>{{ __("¥") }}</label>
{{ item.item_unit_price }}
</block>
<text style="float: right; margin-right: 60rpx"
>x{{ item.item_quantity }}</text
>
</view>
</view>
</view>
</view>
<button
class="u-btn u-btn-default"
@click="submitInfo"
style="margin-top: 40rpx"
>
{{ __("领取礼包") }}
</button>
</block>
<view class="u-loadmore u-loadmore-line" v-else>
<text class="u-loadmore-tips">{{ __("没有更多数据啦!") }}</text>
</view>
</view>
</template> </template>
<script> <script>
import { import { mapState, mapMutations } from "vuex";
mapState,
mapMutations
} from 'vuex';
export default { export default {
data: function() { data: function () {
return { return {
code: '', code: "",
activityInfo: {}, activityInfo: {},
isData: false, isData: false,
}; };
}, },
computed: mapState(['Config', 'StateCode', 'notice', 'plantformInfo', 'shopInfo', 'userInfo', 'hasLogin']), computed: mapState([
onLoad: function(options) { "Config",
uni.setNavigationBarTitle({ "StateCode",
title: this.__('礼包兑换') "notice",
}); "plantformInfo",
"shopInfo",
"userInfo",
"hasLogin",
]),
onLoad: function (options) {
uni.setNavigationBarTitle({
title: this.__("礼包兑换"),
});
var that = this; var that = this;
this.forceUserInfo(function(user) { this.forceUserInfo(function (user) {
console.log(user); console.log(user);
that.setData({ that.setData({
serial_code: user.serial_code serial_code: user.serial_code,
}); });
}); });
}, },
methods: { methods: {
...mapMutations(['login', 'logout', 'getPlantformInfo', 'forceUserInfo', 'getUserInfo']), ...mapMutations([
searchStart(e) { "login",
var that = this; "logout",
if (!this.code) { "getPlantformInfo",
that.$.alert("请输入兑换码!"); "forceUserInfo",
return; "getUserInfo",
} ]),
var params = { searchStart(e) {
code: this.code var that = this;
}; if (!this.code) {
that.$.request({ that.$.alert("请输入兑换码!");
url: this.Config.URL.store.getActivityCodeList, return;
method: 'post', }
data: params, var params = {
success: function(data, status, msg, code) { code: this.code,
if (status == 200) { };
that.setData({ that.$.request({
activityInfo: data, url: this.Config.URL.store.getActivityCodeList,
isData: true, method: "post",
}) data: params,
} else { success: function (data, status, msg, code) {
that.$.alert(msg); if (status == 200) {
that.setData({ that.setData({
activityInfo: {}, activityInfo: data,
isData: false, isData: true,
}) });
} } else {
} that.$.alert(msg);
}); that.setData({
}, activityInfo: {},
isData: false,
});
}
},
});
},
submitInfo: function() { submitInfo: function () {
var that = this; var that = this;
var pat = [] var pat = [];
var items = this.activityInfo.activity_rule.quantity var items = this.activityInfo.activity_rule.quantity;
for (var i in items) { for (var i in items) {
if (items[i].quantity > 0) { if (items[i].quantity > 0) {
var t = items[i].item_id + '|' + items[i].quantity var t = items[i].item_id + "|" + items[i].quantity;
pat.push(t) pat.push(t);
} }
} }
if (pat.length <= 0) {
that.$.alert("亲~请选择商品!");
return;
}
var str = pat.join(",");
if (pat.length <= 0) { that.$.navigateTo({
that.$.alert("亲~请选择商品!"); url:
return "/pages/checkout/checkout?ifcart=0&cart_id=" +
} str +
"&activity_id=" +
var str = pat.join(','); that.activityInfo.activity_id +
that.$.navigateTo({ "&code=" +
url: "/pages/checkout/checkout?ifcart=0&cart_id=" + str + "&activity_id=" + that.activityInfo.activity_id + "&code=" + that.code that.code,
}) });
}, },
} },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.search { .search {
width: 640rpx; width: 640rpx;
margin: 30rpx auto 20rpx; margin: 30rpx auto 20rpx;
position: relative; position: relative;
input { input {
background-color: #ffffff; background-color: #ffffff;
padding: 10rpx 74rpx; padding: 10rpx 74rpx;
font-size: 28rpx; font-size: 28rpx;
border-radius: 50rpx; border-radius: 50rpx;
} }
.voice-icon { .voice-icon {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
padding: 16rpx 20rpx 16rpx 0; padding: 16rpx 20rpx 16rpx 0;
position: absolute; position: absolute;
left: 16rpx; left: 16rpx;
top: 4rpx; top: 4rpx;
z-index: 10; z-index: 10;
} }
.search-icon { .search-icon {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
padding: 16rpx 20rpx 16rpx 0; padding: 16rpx 20rpx 16rpx 0;
position: absolute; position: absolute;
right: 0; right: 0;
top: -2rpx; top: -2rpx;
z-index: 10; z-index: 10;
} }
} }
.m-product-img { .m-product-img {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.m-product-info { .m-product-info {
height: 120rpx; height: 120rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
.m-product-item { .m-product-item {
height: 120rpx; height: 120rpx;
} }
.m-product-name { .m-product-name {
height: 120rpx; height: 120rpx;
}
} .m-product-name uni-label {
-webkit-line-clamp: 1;
.m-product-name uni-label { }
-webkit-line-clamp: 1;
}
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -148,6 +148,7 @@
<text class="iconfontAili icon-zengjiatianjiajiahao"></text> <text class="iconfontAili icon-zengjiatianjiajiahao"></text>
<text>新增收货地址</text> <text>新增收货地址</text>
</view> </view>
<loginPopup :show="showLoginPopup" @close="closeLoginPopup"></loginPopup>
</view> </view>
</template> </template>
@ -157,11 +158,12 @@
import uMask from "./umask.vue"; import uMask from "./umask.vue";
import BMapLib from "../helpers/GeoUtils.js"; import BMapLib from "../helpers/GeoUtils.js";
import { mapState, mapMutations } from "vuex"; import { mapState, mapMutations } from "vuex";
import loginPopup from "@/components/loginPopup.vue";
var bmap = require("../libs/bmap-wx.js"); var bmap = require("../libs/bmap-wx.js");
export default { export default {
components: { components: {
uMask, uMask,
loginPopup,
}, },
data() { data() {
return { return {
@ -183,6 +185,8 @@ export default {
time: 0, time: 0,
searchAddress: [], searchAddress: [],
labelList: ["", "家", "公司", "学校"], labelList: ["", "家", "公司", "学校"],
options: {},
showLoginPopup: false,
}; };
}, },
computed: mapState([ computed: mapState([
@ -196,6 +200,9 @@ export default {
]), ]),
onLoad(options) { onLoad(options) {
console.log("options", options); console.log("options", options);
if (options && options.isShopList) {
this.options = options;
}
}, },
onShow() { onShow() {
if (this.userInfo.token) { if (this.userInfo.token) {
@ -215,6 +222,17 @@ export default {
uni.removeStorageSync("city"); uni.removeStorageSync("city");
}, },
methods: { methods: {
...mapMutations([
"login",
"logout",
"getPlantformInfo",
"forceUserInfo",
"getUserInfo",
"setCartNum",
]),
closeLoginPopup() {
this.showLoginPopup = false;
},
lableCalss(number) { lableCalss(number) {
if (number == 1) { if (number == 1) {
return "item-lable-1"; return "item-lable-1";
@ -229,8 +247,6 @@ export default {
} }
}, },
getAddressList() { getAddressList() {
console.log();
let that = this; let that = this;
that.$.request({ that.$.request({
url: that.Config.URL.user.address_lists, url: that.Config.URL.user.address_lists,
@ -253,6 +269,11 @@ export default {
}); });
}, },
AddAddress() { AddAddress() {
if (!this.hasLogin) {
this.showLoginPopup = true;
return;
}
uni.navigateTo({ uni.navigateTo({
url: "/member/address/manage", url: "/member/address/manage",
}); });
@ -265,15 +286,22 @@ export default {
lat: item.ud_latitude, lat: item.ud_latitude,
lng: item.ud_longitude, lng: item.ud_longitude,
}, },
...item,
}; };
uni.setStorageSync("currentAddress", group); uni.setStorageSync("currentAddress", group);
} else { } else {
uni.setStorageSync("currentAddress", item); uni.setStorageSync("currentAddress", item);
} }
uni.switchTab({ if (this.options && this.options.isShopList) {
url: "/pages/index/index", uni.navigateTo({
}); url: `/member/member/supermarketlList`,
});
} else {
uni.switchTab({
url: "/pages/index/index",
});
}
}, },
anewLoction() { anewLoction() {
uni.removeStorageSync("currentAddress"); uni.removeStorageSync("currentAddress");
@ -587,8 +615,8 @@ export default {
region: this.originalData.result.addressComponent.city, region: this.originalData.result.addressComponent.city,
output: "json", output: "json",
city_limit: true, city_limit: true,
ak: "vMqiMPVK8i30Q5VOCDI3LWxgZqR2tfKa",
ret_coordtype: "gcj02ll", ret_coordtype: "gcj02ll",
ak: "qWKt2xbrqXsp2yK35YYXVBNZgrbiCG5v",
}; };
let city = that.originalData.result.addressComponent.city; let city = that.originalData.result.addressComponent.city;

File diff suppressed because it is too large Load Diff

View File

@ -1,367 +1,454 @@
<template> <template>
<view class="page"> <view class="page">
<movable-area class="move-area"> <movable-area class="move-area">
<movable-view v-if="info.IsRedPacketIcon" inertia class="move-img" direction="all" @tap='IsShowRPK'> <movable-view
<image src="https://static.lancerdt.com/xcxfile/appicon/rpk_min.png"></image> v-if="info.IsRedPacketIcon"
</movable-view> inertia
<view style="background:#f8f8f8"> class="move-img"
<view class="paysuccess"><label> direction="all"
<image src="https://static.lancerdt.com/xcxfile/appicon/images/true.png" style="width:40rpx;height:40rpx;margin-top:8rpx"></image> @tap="IsShowRPK"
</label><text style="margin-left:10rpx">{{info.trade_is_paid==StateCode.ORDER_PAID_STATE_YES ? __('已支付') : __('待付款')}}</text></view> >
<view class="content"> <image
<view class="store">{{info.store_name}} src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/rpk_min.png"
</view> ></image>
<view class="details"> </movable-view>
<view class="details-left"> <view style="background: #f8f8f8">
<view class="charge"><text>{{__('消费金额')}}<text style="color:red">{{Currency}}{{info.order_payment_amount}}</text></text></view> <view class="paysuccess"
<view class="pay"><text>{{__('实际支付')}}<text style="color:red">{{Currency}}{{info.trade_amount}}</text></text></view> ><label>
<view class="monetary"><text>{{__('优惠金额')}}<text style="color:red">{{Currency}}{{info.trade_discount}}</text></text></view> <image
</view> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/true.png"
<view class="details-right"> style="width: 40rpx; height: 40rpx; margin-top: 8rpx"
<view class="num"><text>{{__('订单编号')}}{{info.order_id}}</text></view> ></image> </label
<view class="time"><text>{{__('消费时间')}}{{info.trade_create_time}}</text></view> ><text style="margin-left: 10rpx">{{
<view class="monetary"><text>{{__('余额抵扣')}}<text style="color:red">{{Currency}}{{info.trade_payment_money}}</text></text></view> info.trade_is_paid == StateCode.ORDER_PAID_STATE_YES
</view> ? __("已支付")
</view> : __("待付款")
</view> }}</text></view
</view> >
</movable-area> <view class="content">
<view class="shareRPK " v-if="showRPK && info.IsRedPacketIcon && type==1" @tap='IsShowRPK'> <view class="store">{{ info.store_name }} </view>
<view :class="'shareRPKBox ' + showRPK ? 'animated bounceIn':'animated bounceOut'" catchtap style='background:url(https://static.lancerdt.com/xcxfile/appicon/rpk_box.png) no-repeat;background-size: cover;'> <view class="details">
<view class="sendRPK" catchtap='shareBox'></view> <view class="details-left">
<view class="closeRPK" catchtap='IsShowRPK'></view> <view class="charge"
</view> ><text
</view> >{{ __("消费金额") }}<text style="color: red"
<view class="u-top-default"> >{{ Currency }}{{ info.order_payment_amount }}</text
<navigator url='/pages/index/index' open-type="switchTab" class="u-back2"> ></text
<image src='https://static.lancerdt.com/xcxfile/appicon/img/gohome.png'></image> ></view
</navigator> >
</view> <view class="pay"
><text
</view> >{{ __("实际支付") }}<text style="color: red"
>{{ Currency }}{{ info.trade_amount }}</text
></text
></view
>
<view class="monetary"
><text
>{{ __("优惠金额") }}<text style="color: red"
>{{ Currency }}{{ info.trade_discount }}</text
></text
></view
>
</view>
<view class="details-right">
<view class="num"
><text>{{ __("订单编号") }}{{ info.order_id }}</text></view
>
<view class="time"
><text
>{{ __("消费时间") }}{{ info.trade_create_time }}</text
></view
>
<view class="monetary"
><text
>{{ __("余额抵扣") }}<text style="color: red"
>{{ Currency }}{{ info.trade_payment_money }}</text
></text
></view
>
</view>
</view>
</view>
</view>
</movable-area>
<view
class="shareRPK"
v-if="showRPK && info.IsRedPacketIcon && type == 1"
@tap="IsShowRPK"
>
<view
:class="
'shareRPKBox ' + showRPK ? 'animated bounceIn' : 'animated bounceOut'
"
catchtap
style="
background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/rpk_box.png)
no-repeat;
background-size: cover;
"
>
<view class="sendRPK" catchtap="shareBox"></view>
<view class="closeRPK" catchtap="IsShowRPK"></view>
</view>
</view>
<view class="u-top-default">
<navigator url="/pages/index/index" open-type="switchTab" class="u-back2">
<image
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/img/gohome.png"
></image>
</navigator>
</view>
</view>
</template> </template>
<script> <script>
import { import { mapState, mapMutations } from "vuex";
mapState,
mapMutations
} from 'vuex'
export default { export default {
data: function() { data: function () {
return { return {
info: {}, info: {},
deduction: 0, deduction: 0,
showRPK: false, showRPK: false,
ActivityGroupId: 0, ActivityGroupId: 0,
maxRPK: 0, maxRPK: 0,
order_id: "", order_id: "",
isshow1: false, isshow1: false,
Currency: "¥" Currency: "¥",
} };
}, },
components: {}, components: {},
computed: mapState(['Config', 'StateCode', 'notice', 'plantformInfo', 'shopInfo', 'userInfo', 'hasLogin']), computed: mapState([
onLoad(options) { "Config",
uni.setNavigationBarTitle({ "StateCode",
title: this.__('优惠买单') "notice",
}); "plantformInfo",
"shopInfo",
"userInfo",
"hasLogin",
]),
onLoad(options) {
uni.setNavigationBarTitle({
title: this.__("优惠买单"),
});
var that = this; var that = this;
that.setData({ that.setData({
order_id: options.order_id || '' order_id: options.order_id || "",
}); });
that.load(); that.load();
}, },
onUnload() { onUnload() {
// //
var that = this var that = this;
}, },
/* /*
onShareAppMessage: function() { onShareAppMessage: function() {
return { return {
title: "拼手气红包,第" + this.data.maxRPK + "个领取的红包最大!", title: "拼手气红包,第" + this.data.maxRPK + "个领取的红包最大!",
imageUrl: "https://static.lancerdt.com/xcxfile/appicon/shareImg.png", imageUrl: "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/shareImg.png",
path: "pages/redpacket/redpacket?g=" + this.data.ActivityGroupId + "&n=" + this.data.maxRPK + "&uid=" + app.globalData path: "pages/redpacket/redpacket?g=" + this.data.ActivityGroupId + "&n=" + this.data.maxRPK + "&uid=" + app.globalData
.UserInfo.Id, .UserInfo.Id,
success: function() { success: function() {
} }
} }
},*/ },*/
methods: { methods: {
...mapMutations(['login', 'logout', 'getPlantformInfo', 'forceUserInfo', 'getUserInfo']), ...mapMutations([
"login",
"logout",
"getPlantformInfo",
"forceUserInfo",
"getUserInfo",
]),
load: function() { load: function () {
let that = this; let that = this;
// //
that.$.request({ that.$.request({
type: 'post', type: "post",
url: this.Config.URL.pay.consume_trade_detail, url: this.Config.URL.pay.consume_trade_detail,
data: { data: {
order_id: that.order_id order_id: that.order_id,
}, },
dataType: 'json', dataType: "json",
success: function(data, status, msg, code) { success: function (data, status, msg, code) {
//console.log("", data); //console.log("", data);
that.setData({ that.setData({
info: data, info: data,
Currency: data.currency_symbol_left Currency: data.currency_symbol_left,
}); });
false ? that.setData({ false
isshow1: false ? that.setData({
}) : that.setData({ isshow1: false,
isshow1: true })
}); : that.setData({
isshow1: true,
});
that.inputVal() that.inputVal();
} },
}); });
}, },
shareQRCode: function(a) { shareQRCode: function (a) {
var e = this, var e = this,
t = { t = {
store_id: app.globalData.VendorInfo.Id, store_id: app.globalData.VendorInfo.Id,
sponsorId: app.globalData.UserInfo.Id, sponsorId: app.globalData.UserInfo.Id,
imageUrl: "https://static.lancerdt.com/xcxfile/appicon/shareImg.png", imageUrl:
path: "pages/redpacket/redpacket?g=" + this.data.ActivityGroupId + "&n=" + this.data.maxRPK + "&uid=" + app.globalData "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/shareImg.png",
.UserInfo.Id, path:
luckyOrder: this.data.maxRPK "pages/redpacket/redpacket?g=" +
}; this.data.ActivityGroupId +
$.xsr($.makeUrl(orderapi.ShareLuckyRedPacket, t), function(a) { "&n=" +
e.setData({ this.data.maxRPK +
PageQRCodeInfo: { "&uid=" +
Path: a.Info, app.globalData.UserInfo.Id,
IsShare: true, luckyOrder: this.data.maxRPK,
IsShareBox: false, };
IsJT: true $.xsr($.makeUrl(orderapi.ShareLuckyRedPacket, t), function (a) {
} e.setData({
}) PageQRCodeInfo: {
}) Path: a.Info,
}, IsShare: true,
shareBox: function() { IsShareBox: false,
this.setData({ IsJT: true,
PageQRCodeInfo: { },
Path: "", });
IsShare: true, });
IsShareBox: true, },
IsJT: false shareBox: function () {
} this.setData({
}) PageQRCodeInfo: {
}, Path: "",
cancelShare: function() { IsShare: true,
this.setData({ IsShareBox: true,
PageQRCodeInfo: { IsJT: false,
Path: "", },
IsShare: false, });
IsShareBox: false, },
IsJT: false cancelShare: function () {
} this.setData({
}) PageQRCodeInfo: {
}, Path: "",
saveImg: function() { IsShare: false,
var e = this; IsShareBox: false,
$.loading(), wx.downloadFile({ IsJT: false,
url: this.data.PageQRCodeInfo.Path, },
success: function(a) { });
$.hideloading(), wx.saveImageToPhotosAlbum({ },
filePath: a.tempFilePath, saveImg: function () {
success: function() { var e = this;
e.setData({ $.loading(),
PageQRCodeInfo: { wx.downloadFile({
Path: "", url: this.data.PageQRCodeInfo.Path,
IsShare: false, success: function (a) {
IsShareBox: false, $.hideloading(),
IsJT: false wx.saveImageToPhotosAlbum({
} filePath: a.tempFilePath,
}), $.alert("保存图片成功!"), $.xsr1($.makeUrl(orderapi.ShareCount, { success: function () {
sponsorId: app.globalData.UserInfo.Id, e.setData({
audienceType: 3, PageQRCodeInfo: {
audienceId: 0, Path: "",
ContentType: 22, IsShare: false,
contentId: e.data.ActivityGroupId IsShareBox: false,
})) IsJT: false,
}, },
fail: function(a) { }),
$.hideloading(), console.log("保存图片失败:", a) $.alert("保存图片成功!"),
} $.xsr1(
}) $.makeUrl(orderapi.ShareCount, {
}, sponsorId: app.globalData.UserInfo.Id,
fail: function(a) { audienceType: 3,
$.hideloading() audienceId: 0,
} ContentType: 22,
}) contentId: e.data.ActivityGroupId,
}, })
showCodeImg: function() { );
wx.previewImage({ },
current: this.data.PageQRCodeInfo.Path, fail: function (a) {
urls: [this.data.PageQRCodeInfo.Path] $.hideloading(), console.log("保存图片失败:", a);
}) },
}, });
IsShowRPK: function() { },
var a = this; fail: function (a) {
a.data.showRPK ? setTimeout(function() { $.hideloading();
a.setData({ },
showRPK: false, });
type: 1 },
}) showCodeImg: function () {
}, 250) : a.setData({ wx.previewImage({
showRPK: true, current: this.data.PageQRCodeInfo.Path,
type: 1 urls: [this.data.PageQRCodeInfo.Path],
}) });
} },
} IsShowRPK: function () {
var a = this;
} a.data.showRPK
? setTimeout(function () {
a.setData({
showRPK: false,
type: 1,
});
}, 250)
: a.setData({
showRPK: true,
type: 1,
});
},
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
@import "../../styles/_variables"; @import "../../styles/_variables";
.paysuccess { .paysuccess {
height: 160rpx; height: 160rpx;
margin-left: 30rpx; margin-left: 30rpx;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 36rpx; font-size: 36rpx;
color: #000; color: #000;
} }
.content { .content {
height: 400rpx; height: 400rpx;
background: #fff; background: #fff;
padding: 0 30rpx padding: 0 30rpx;
} }
.store { .store {
font-size: 28rpx; font-size: 28rpx;
color: #000; color: #000;
height: 80rpx; height: 80rpx;
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;
line-height: 90rpx; line-height: 90rpx;
} }
.details { .details {
display: flex; display: flex;
font-size: 24rpx; font-size: 24rpx;
color: #000; color: #000;
} }
.details-left { .details-left {
width: 35%; width: 35%;
} }
.details-left view { .details-left view {
margin-top: 40rpx; margin-top: 40rpx;
} }
.details-right { .details-right {
width: 65%; width: 65%;
} }
.details-right view { .details-right view {
margin-top: 40rpx; margin-top: 40rpx;
} }
.m-footer-btn { .m-footer-btn {
width: 100%; width: 100%;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
background-color: #fff; background-color: #fff;
text-align: right; text-align: right;
border-top: 1rpx solid #d5d5d5; border-top: 1rpx solid #d5d5d5;
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx; padding: 20rpx;
} }
.u-link-btn { .u-link-btn {
margin: 0 10rpx; margin: 0 10rpx;
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
line-height: 40rpx; line-height: 40rpx;
} }
.move-area { .move-area {
position: absolute; position: absolute;
min-height: 100%; min-height: 100%;
width: 100%; width: 100%;
} }
.move-img { .move-img {
height: 126rpx; height: 126rpx;
width: 100rpx; width: 100rpx;
z-index: 5; z-index: 5;
margin-top: 70%; margin-top: 70%;
margin-left: 650rpx; margin-left: 650rpx;
} }
.move-img image { .move-img image {
height: 126rpx; height: 126rpx;
width: 100rpx; width: 100rpx;
} }
.shareRPK { .shareRPK {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: rgba(0, 0, 0, .5); background-color: rgba(0, 0, 0, 0.5);
top: 0; top: 0;
left: 0; left: 0;
z-index: 5; z-index: 5;
} }
.shareRPKBox { .shareRPKBox {
width: 640rpx; width: 640rpx;
height: 698rpx; height: 698rpx;
background-color: red; background-color: red;
position: absolute; position: absolute;
top: 40%; top: 40%;
left: 50%; left: 50%;
margin-left: -320rpx; margin-left: -320rpx;
margin-top: -349rpx; margin-top: -349rpx;
} }
.sendRPK { .sendRPK {
width: 222rpx; width: 222rpx;
height: 70rpx; height: 70rpx;
position: absolute; position: absolute;
left: 50%; left: 50%;
margin-left: -100rpx; margin-left: -100rpx;
top: 50%; top: 50%;
margin-top: 140rpx; margin-top: 140rpx;
} }
.closeRPK { .closeRPK {
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
position: absolute; position: absolute;
left: 50%; left: 50%;
margin-left: -22rpx; margin-left: -22rpx;
bottom: 25rpx; bottom: 25rpx;
} }
.shareCodeImg { .shareCodeImg {
height: 800rpx; height: 800rpx;
} }
.u-back2 image { .u-back2 image {
border-radius: 100%; border-radius: 100%;
width: 77rpx; width: 77rpx;
height: 77rpx; height: 77rpx;
border: 1px solid #eee; border: 1px solid #eee;
font-size: 20rpx; font-size: 20rpx;
text-align: center; text-align: center;
background-color: #fff; background-color: #fff;
box-shadow: 0px 4rpx 8rpx rgba(0, 0, 0, 0.35); box-shadow: 0px 4rpx 8rpx rgba(0, 0, 0, 0.35);
z-index: 999; z-index: 999;
opacity: 0.8; opacity: 0.8;
line-height: 77rpx; line-height: 77rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -63,9 +63,9 @@
<cover-view class="right-text"></cover-view> <cover-view class="right-text"></cover-view>
<!-- #endif --> <!-- #endif -->
<cover-image v-if="item.IsFabulous" src="https://static.lancerdt.com/xcxfile/appicon/video/aixinRed.png" class="img" @click.stop="onUnLike" :data-story_id="item.story_id"></cover-image> <cover-image v-if="item.IsFabulous" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/aixinRed.png" class="img" @click.stop="onUnLike" :data-story_id="item.story_id"></cover-image>
<cover-image v-if="!(item.IsFabulous)" src="https://static.lancerdt.com/xcxfile/appicon/video/aixin.png" class="img" @click.stop="onLike" :data-story_id="item.story_id"></cover-image> <cover-image v-if="!(item.IsFabulous)" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/aixin.png" class="img" @click.stop="onLike" :data-story_id="item.story_id"></cover-image>
<!-- #ifdef APP-PLUS-NVUE --> <!-- #ifdef APP-PLUS-NVUE -->
<text class="right-text">{{item.story_like_count}}</text> <text class="right-text">{{item.story_like_count}}</text>
@ -75,7 +75,7 @@
<!-- #endif --> <!-- #endif -->
<block v-if="true"> <block v-if="true">
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/xiaoxi.png" class="img" :data-story_id="item.story_id" :data-user_id="item.user_id" @click.stop="tapMsg"></cover-image> <cover-image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/xiaoxi.png" class="img" :data-story_id="item.story_id" :data-user_id="item.user_id" @click.stop="tapMsg"></cover-image>
<!-- #ifdef APP-PLUS-NVUE --> <!-- #ifdef APP-PLUS-NVUE -->
<text class="right-text">{{item.story_comment_count}}</text> <text class="right-text">{{item.story_comment_count}}</text>
@ -84,7 +84,7 @@
<cover-view class="right-text">{{item.story_comment_count}}</cover-view> <cover-view class="right-text">{{item.story_comment_count}}</cover-view>
<!-- #endif --> <!-- #endif -->
<block v-if="false"> <block v-if="false">
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/share-fill.png" class="img" @click.stop="tapShare"></cover-image> <cover-image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/share-fill.png" class="img" @click.stop="tapShare"></cover-image>
<!-- #ifdef APP-PLUS-NVUE --> <!-- #ifdef APP-PLUS-NVUE -->
<text class="right-text">{{__('分享')}}</text> <text class="right-text">{{__('分享')}}</text>
@ -95,7 +95,7 @@
</block> </block>
</block> </block>
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/changpian.png" class="musicIcon img" v-if="false"></cover-image> <cover-image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/changpian.png" class="musicIcon img" v-if="false"></cover-image>
</cover-view> </cover-view>
</div> </div>

View File

@ -57,9 +57,9 @@
<cover-view class="right-text"></cover-view> <cover-view class="right-text"></cover-view>
<!-- #endif --> <!-- #endif -->
<cover-image v-if="item.IsFabulous" src="https://static.lancerdt.com/xcxfile/appicon/video/aixinRed.png" class="img" @click.stop="onUnLike" :data-story_id="item.story_id"></cover-image> <cover-image v-if="item.IsFabulous" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/aixinRed.png" class="img" @click.stop="onUnLike" :data-story_id="item.story_id"></cover-image>
<cover-image v-if="!(item.IsFabulous)" src="https://static.lancerdt.com/xcxfile/appicon/video/aixin.png" class="img" @click.stop="onLike" :data-story_id="item.story_id"></cover-image> <cover-image v-if="!(item.IsFabulous)" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/aixin.png" class="img" @click.stop="onLike" :data-story_id="item.story_id"></cover-image>
<!-- #ifdef APP-PLUS-NVUE --> <!-- #ifdef APP-PLUS-NVUE -->
<text class="right-text">{{item.story_like_count}}</text> <text class="right-text">{{item.story_like_count}}</text>
@ -69,7 +69,7 @@
<!-- #endif --> <!-- #endif -->
<block v-if="true"> <block v-if="true">
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/xiaoxi.png" class="img" :data-story_id="item.story_id" :data-user_id="item.user_id" @click.stop="tapMsg"></cover-image> <cover-image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/xiaoxi.png" class="img" :data-story_id="item.story_id" :data-user_id="item.user_id" @click.stop="tapMsg"></cover-image>
<!-- #ifdef APP-PLUS-NVUE --> <!-- #ifdef APP-PLUS-NVUE -->
<text class="right-text">{{item.story_comment_count}}</text> <text class="right-text">{{item.story_comment_count}}</text>
@ -78,7 +78,7 @@
<cover-view class="right-text">{{item.story_comment_count}}</cover-view> <cover-view class="right-text">{{item.story_comment_count}}</cover-view>
<!-- #endif --> <!-- #endif -->
<block v-if="false"> <block v-if="false">
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/share-fill.png" class="img" @click.stop="tapShare"></cover-image> <cover-image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/share-fill.png" class="img" @click.stop="tapShare"></cover-image>
<!-- #ifdef APP-PLUS-NVUE --> <!-- #ifdef APP-PLUS-NVUE -->
<text class="right-text">{{__('分享')}}</text> <text class="right-text">{{__('分享')}}</text>
@ -89,7 +89,7 @@
</block> </block>
</block> </block>
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/changpian.png" class="musicIcon img" v-if="false"></cover-image> <cover-image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/changpian.png" class="musicIcon img" v-if="false"></cover-image>
</cover-view> </cover-view>
</div> </div>

View File

@ -1,171 +1,202 @@
<template> <template>
<view> <view>
<!-- 新手大礼包 --> <!-- 新手大礼包 -->
<view :class="['msk', (!user_is_new || isClosed)?'hide':'']" @tap="cancel"> <view
<view class="msk_box" url="../receivecontent/receivecontent" @tap="innertouch"> :class="['msk', !user_is_new || isClosed ? 'hide' : '']"
<image src="https://static.lancerdt.com/xcxfile/appicon/Package.png" style='width:100%'></image> @tap="cancel"
<view class="msk_box_info" style='right:16%;top:40%;'><text>{{__('¥')}}</text><label>{{CouponAmount}}</label> >
<view
</view> class="msk_box"
<view class="btn_receivenow" @tap="receivenow"></view> url="../receivecontent/receivecontent"
<view class="btn_cancel" @tap="cancel"></view> @tap="innertouch"
</view> >
<image
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/Package.png"
style="width: 100%"
></image>
<view class="msk_box_info" style="right: 16%; top: 40%"
><text>{{ __("¥") }}</text
><label>{{ CouponAmount }}</label>
</view> </view>
<view class="btn_receivenow" @tap="receivenow"></view>
<view class="btn_cancel" @tap="cancel"></view>
</view>
</view>
<view class="msk1" @tap="cancelsuccess" v-if="isShowSuccessBox">
<view class="msk1" @tap="cancelsuccess" v-if="isShowSuccessBox"> <view class="m-coupon-box" @tap="innertouch">
<view class="m-coupon-box" @tap="innertouch"> <view
<view :class="mskType==1?'m-coupon-box-top':'m-coupon-box-top2'"></view> :class="mskType == 1 ? 'm-coupon-box-top' : 'm-coupon-box-top2'"
<view class="m-coupon-box-content"> ></view>
<scroll-view scroll-y="true" class="m-coupon-box-list"> <view class="m-coupon-box-content">
<view class="m-coupon-box-item" v-for="(item, index) in coupon_rows" :key="index"> <scroll-view scroll-y="true" class="m-coupon-box-list">
<view class='m-coupon-box-item-left'><label style='font-size:24rpx;margin-top:14rpx'>{{__("¥")}}</label>{{item.voucher_price || item.activity_rule.voucher_price}} <view
</view> class="m-coupon-box-item"
<view class='m-coupon-box-item-right'><label>{{sprintf(__('有效日期至:%s'), item.voucher_end_date || item.activity_endtime)}}</label> v-for="(item, index) in coupon_rows"
<text>{{item.activity_name}}</text> :key="index"
</view> >
</view> <view class="m-coupon-box-item-left"
</scroll-view> ><label style="font-size: 24rpx; margin-top: 14rpx">{{
</view> __("¥")
<view class="m-coupon-box-bottom"></view> }}</label
<view class="close_msk" @tap="cancelsuccess"> >{{ item.voucher_price || item.activity_rule.voucher_price }}
<image style="width:50rpx;height:50rpx" </view>
src="https://static.lancerdt.com/xcxfile/appicon/img/delete.png"></image> <view class="m-coupon-box-item-right"
</view> ><label>{{
sprintf(
__("有效日期至:%s"),
item.voucher_end_date || item.activity_endtime
)
}}</label>
<text>{{ item.activity_name }}</text>
</view>
</view> </view>
</scroll-view>
</view> </view>
<view class="m-coupon-box-bottom"></view>
</view> <view class="close_msk" @tap="cancelsuccess">
<image
style="width: 50rpx; height: 50rpx"
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/img/delete.png"
></image>
</view>
</view>
</view>
</view>
</template> </template>
<script> <script>
import { import { mapState, mapMutations } from "vuex";
mapState,
mapMutations
} from 'vuex'
import $ from "../../helpers/util"; import $ from "../../helpers/util";
export default{ export default {
props:{ props: {
Coupons:{ Coupons: {
type:Object, type: Object,
default:{} default: {},
}, },
user_is_new:{ user_is_new: {
type:Number, type: Number,
default:0 default: 0,
}, },
CouponAmount:{ CouponAmount: {
type:Number, type: Number,
default:0.00 default: 0.0,
}, },
mskType:{ mskType: {
type:Number, type: Number,
default:1 default: 1,
} },
}, },
computed: mapState(['Config', 'StateCode', 'notice', 'plantformInfo', 'shopInfo', 'userInfo', 'hasLogin', '__']), computed: mapState([
data(){ "Config",
return{ "StateCode",
isShowSuccessBox:false, "notice",
isClosed:false, "plantformInfo",
coupon_rows:[] "shopInfo",
} "userInfo",
}, "hasLogin",
mounted() { "__",
}, ]),
methods:{ data() {
...mapMutations(['login', 'logout', 'getPlantformInfo', 'forceUserInfo', 'getUserInfo', 'showCartNum']), return {
receivenow: function () { isShowSuccessBox: false,
this.userReceiveCoupon() isClosed: false,
}, coupon_rows: [],
cancel: function () { };
this.setData({isClosed: true}) },
}, mounted() {},
cancelsuccess: function () { methods: {
this.setData({isShowSuccessBox: false}) ...mapMutations([
}, "login",
innertouch: function () { "logout",
}, "getPlantformInfo",
userReceiveCoupon: function () { "forceUserInfo",
let that = this; "getUserInfo",
var params = { "showCartNum",
CouponIds: "", ]),
user_is_new: this.userInfo.user_is_new receivenow: function () {
}; this.userReceiveCoupon();
},
cancel: function () {
this.setData({ isClosed: true });
},
cancelsuccess: function () {
this.setData({ isShowSuccessBox: false });
},
innertouch: function () {},
userReceiveCoupon: function () {
let that = this;
var params = {
CouponIds: "",
user_is_new: this.userInfo.user_is_new,
};
this.forceUserInfo((user) => {
if (user) {
$.request({
url: this.Config.URL.user.receive_new_gift,
data: params,
success: function (data, status, msg, code) {
if (200 == status) {
$.alert(that.__("领取成功!"));
this.forceUserInfo((user) => { that.login({ user_is_new: 0 });
if (user) {
$.request({
url: this.Config.URL.user.receive_new_gift,
data: params,
success: function(data, status, msg, code) {
if (200 == status) {
$.alert(that.__("领取成功!"));
that.login({user_is_new:0}); that.setData({
isShowSuccessBox: true,
that.setData({isShowSuccessBox: true, coupon_rows: data.items}) coupon_rows: data.items,
} else {
$.alert(msg);
}
},
});
}
}); });
} else {
} $.alert(msg);
}
},
});
} }
} });
},
},
};
</script> </script>
<style scoped> <style scoped>
.video{ .video {
width: 750rpx; width: 750rpx;
} }
.top{ .top {
position: absolute; position: absolute;
top:0; top: 0;
background-image: linear-gradient(to top , rgba(0,0,0,0) , rgba(0,0,0,0.7)); background-image: linear-gradient(
width: 750rpx; to top,
height: 300rpx; rgba(0, 0, 0, 0),
} rgba(0, 0, 0, 0.7)
.bottom{ );
position: absolute; width: 750rpx;
bottom: 0; height: 300rpx;
background-image: linear-gradient(to top , rgba(0,0,0,0.7) , rgba(0,0,0,0)); }
width: 750rpx; .bottom {
height: 300rpx; position: absolute;
} bottom: 0;
.progressBar{ background-image: linear-gradient(
border-radius: 2rpx; to top,
height: 4rpx; rgba(0, 0, 0, 0.7),
background-color: #FFFFFF; rgba(0, 0, 0, 0)
z-index: 999999; );
position: absolute; width: 750rpx;
bottom: 40rpx; height: 300rpx;
//#ifndef APP-PLUS-NVUE }
animation: flicker 4s linear infinite; .progressBar {
animation-direction:alternate; border-radius: 2rpx;
//#endif height: 4rpx;
} background-color: #ffffff;
//#ifndef APP-PLUS-NVUE z-index: 999999;
@keyframes flicker { position: absolute;
0% { box-shadow:0 0 0 #FFFFFF; } bottom: 40rpx;
/** 暂停效果 */ }
10% { box-shadow:0 0 2rpx #FFFFFF; }
50% { box-shadow:0 0 10rpx #FFFFFF; }
60% { box-shadow:0 0 12rpx #FFFFFF; }
90% { box-shadow:0 0 18rpx #FFFFFF; }
100% { box-shadow:0 0 20rpx #FFFFFF; }
}
//#endif
</style> </style>

File diff suppressed because it is too large Load Diff

203
components/loginPopup.vue Normal file
View File

@ -0,0 +1,203 @@
<template>
<view class="loginPopup-container">
<uni-popup
ref="popup"
type="bottom"
:mask-click="false"
:safe-area="true"
:borderRadius="'10px 10x 10px 10px'"
>
<view class="popup-box">
<view class="head-img"></view>
<view
class="uni-icon uni-icon-closeempty"
color="#888"
@click="close"
></view>
<view class="popup-content">
<view class="title"> 微信账号登录小发同城小程序 </view>
<button
class="btn-login"
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"
>
<view class="iconfontAili icon-weixin"></view>
<view>微信一键登录</view>
</button>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import { mapState, mapMutations, mapGetters } from "vuex";
export default {
name: "loginPopup",
props: {
show: {
type: Boolean,
default: false,
},
},
data() {
return {};
},
computed: {
...mapState(["showLoginPopup", "Config"]),
},
watch: {
show: {
handler(newValue, oldValue) {
if (newValue) {
this.open();
// this.getWXLoginCode();
}
},
// deep: true,
// immediate: true,
},
},
onUnload() {},
onHide() {
this.close();
},
methods: {
...mapMutations([
"login",
"logout",
"getPlantformInfo",
"forceUserInfo",
"getUserInfo",
]),
open() {
this.$refs["popup"].open("bottom");
},
close() {
this.$refs["popup"].close();
this.$emit("close");
},
getWXLoginCode() {
let that = this;
wx.login({
success: (res) => {
//
if (res.code) {
// res.code openId, sessionKey, unionId
let params = { code: res.code };
that.$.request({
url: that.cf.URL.get_miniapp_open_id,
data: params,
success: (data, status, msg, code) => {},
fail: (err, status) => {},
});
} else {
that.$.showModal({
content: that.__("授权失败"),
showCancel: false,
});
}
},
});
},
getPhoneNumber(e) {
var that = this;
console.log(e);
console.log(e.detail.code); //
console.log(e.detail.errMsg); //
console.log(e.detail.errno); //
//
if (typeof e.detail.code !== "undefined") {
console.log(e.detail.code);
// e.detail.encryptedData, e.detail.iv
that.$.request({
url: this.Config.URL.wx.get_user_phone_number,
data: {
code: e.detail.code,
},
dataType: "json",
success: function (userInfo, status, msg, code) {
if (status == 200) {
debugger;
// that.$.request({
// url: that.Config.URL.user.overview,
// success: function (data, status, msg, code) {
// userInfo = Object.assign(userInfo, data.member_info);
// that.login(userInfo);
// that.close();
// },
// });
} else {
that.$.confirm(msg);
}
},
});
} else {
that.$.confirm(that.__("请允许手机授权!"));
}
},
},
};
</script>
<style lang="scss">
.loginPopup-container {
background: #fff;
.popup-box {
// padding: 40rpx;
position: relative;
width: 100%;
border-top-left-radius: 32rpx;
border-top-right-radius: 32rpx;
.head-img {
width: 100%;
height: 190px;
background-image: url("../static/images/login-bg.png");
background-size: 100% 100%;
}
.uni-icon-closeempty {
position: absolute;
right: 10px;
top: 10px;
}
.popup-content {
padding: 40rpx;
width: 90%;
height: 400rpx;
background: #fff;
}
.title {
font-size: 18px;
text-align: center;
font-weight: 700;
color: #000;
}
.btn-login {
display: flex;
align-items: center;
justify-content: center;
margin: 0 40rpx;
margin-top: 80rpx;
height: 100rpx;
font-size: 32rpx;
background: #0787f4;
border-radius: 40px;
color: #fff;
.icon-weixin {
font-size: 48rpx;
margin-right: 16rpx;
}
}
}
}
</style>

View File

@ -1,131 +1,167 @@
<template> <template>
<div class="mpvue-picker"> <div class="mpvue-picker">
<div :class="{'pickerMask':showPicker}" @click="maskClick" catchtouchmove="true"></div> <div
<div class="mpvue-picker-content " :class="{'mpvue-picker-view-show':showPicker}"> :class="{ pickerMask: showPicker }"
<div class="mpvue-picker__hd" catchtouchmove="true"> @click="maskClick"
<div class="mpvue-picker__action" @click="pickerCancel">{{__('取消')}}</div> catchtouchmove="true"
<div class="mpvue-picker__action" :style="{color:themeColor}" @click="pickerConfirm">{{__('确定')}}</div> ></div>
</div> <div
<picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChange"> class="mpvue-picker-content"
<block> :class="{ 'mpvue-picker-view-show': showPicker }"
<picker-view-column> >
<div class="picker-item" v-for="(item,index) in provinceDataList" :key="index">{{item.label}}</div> <div class="mpvue-picker__hd" catchtouchmove="true">
</picker-view-column> <div class="mpvue-picker__action" @click="pickerCancel">
<picker-view-column> {{ __("取消") }}
<div class="picker-item" v-for="(item,index) in cityDataList" :key="index">{{item.label}}</div> </div>
</picker-view-column> <div
<picker-view-column> class="mpvue-picker__action"
<div class="picker-item" v-for="(item,index) in areaDataList" :key="index">{{item.label}}</div> :style="{ color: themeColor }"
</picker-view-column> @click="pickerConfirm"
</block> >
</picker-view> {{ __("确定") }}
</div> </div>
</div> </div>
<picker-view
indicator-style="height: 40px;"
class="mpvue-picker-view"
:value="pickerValue"
@change="pickerChange"
>
<block>
<picker-view-column>
<div
class="picker-item"
v-for="(item, index) in provinceDataList"
:key="index"
>
{{ item.label }}
</div>
</picker-view-column>
<picker-view-column>
<div
class="picker-item"
v-for="(item, index) in cityDataList"
:key="index"
>
{{ item.label }}
</div>
</picker-view-column>
<picker-view-column>
<div
class="picker-item"
v-for="(item, index) in areaDataList"
:key="index"
>
{{ item.label }}
</div>
</picker-view-column>
</block>
</picker-view>
</div>
</div>
</template> </template>
<script> <script>
export default {
data() {
return {
pickerValue: [0, 0, 0],
provinceDataList: [],
cityDataList: [],
areaDataList: [],
/* 是否显示控件 */
showPicker: false,
provinceData: [],
cityData: [],
areaData: [],
};
},
created() {
this.init();
},
props: {
/* 默认值 */
pickerValueDefault: {
type: Array,
default() {
return [0, 0, 0];
},
},
/* 主题色 */
themeColor: String,
},
watch: {
pickerValueDefault() {
this.init();
},
},
methods: {
init() {
let that = this;
// 使
let district_data = uni.getStorageSync("district_data");
if (!district_data) {
that.$.request({
url: that.cf.URL.getAppDistrict,
data: {},
loading: false,
ajaxCache: {
timeout: this.cf.CACHE_EXPIRE,
},
success: function (data, status, msg, code) {
if (status == 200) {
uni.setStorageSync("district_data", data);
that.setDistrictData(data);
}
},
});
} else {
that.setDistrictData(district_data);
}
},
export default { setDistrictData(district_data) {
data() { this.provinceData = district_data.provinceData;
return { this.cityData = district_data.cityData;
pickerValue: [0, 0, 0], this.areaData = district_data.areaData;
provinceDataList: [],
cityDataList: [],
areaDataList: [],
/* 是否显示控件 */
showPicker: false,
this.handPickValueDefault(); // pickerValueDefault
provinceData : [], this.provinceDataList = district_data.provinceData;
cityData : [], this.cityDataList = district_data.cityData[this.pickerValueDefault[0]];
areaData : [],
};
},
created() {
this.init()
},
props: {
/* 默认值 */
pickerValueDefault: {
type: Array,
default () {
return [0, 0, 0]
}
},
/* 主题色 */
themeColor: String
},
watch: {
pickerValueDefault() {
this.init();
}
},
methods: {
init() {
let that = this;
// 使
let district_data = uni.getStorageSync('district_data');
if (!district_data) {
that.$.request({
url: that.cf.URL.getAppDistrict,
data: {},
loading: false,
ajaxCache: {
timeout: this.cf.CACHE_EXPIRE
},
success: function(data, status, msg, code) {
if (status == 200) {
uni.setStorageSync('district_data', data);
that.setDistrictData(data);
}
}
});
} else {
that.setDistrictData(district_data);
}
},
setDistrictData(district_data) { this.areaDataList =
this.provinceData = district_data.provinceData; district_data.areaData[this.pickerValueDefault[0]][
this.cityData = district_data.cityData; this.pickerValueDefault[1]
this.areaData = district_data.areaData; ];
this.pickerValue = this.pickerValueDefault;
},
this.handPickValueDefault(); // pickerValueDefault show() {
setTimeout(() => {
this.showPicker = true;
}, 0);
},
maskClick() {
this.pickerCancel();
},
pickerCancel() {
this.showPicker = false;
this._$emit("onCancel");
},
pickerConfirm(e) {
this.showPicker = false;
this._$emit("onConfirm");
},
showPickerView() {
this.showPicker = true;
},
handPickValueDefault() {
let that = this;
this.provinceDataList = district_data.provinceData; /*
this.cityDataList = district_data.cityData[this.pickerValueDefault[0]];
this.areaDataList = district_data.areaData[this.pickerValueDefault[0]][this.pickerValueDefault[1]];
this.pickerValue = this.pickerValueDefault;
},
show() {
setTimeout(() => {
this.showPicker = true;
}, 0);
},
maskClick() {
this.pickerCancel();
},
pickerCancel() {
this.showPicker = false;
this._$emit('onCancel');
},
pickerConfirm(e) {
this.showPicker = false;
this._$emit('onConfirm');
},
showPickerView() {
this.showPicker = true;
},
handPickValueDefault() {
let that = this;
/*
// //
for (let i = 0; i < provinceData; i++) { for (let i = 0; i < provinceData; i++) {
@ -151,141 +187,157 @@
} }
*/ */
if (this.pickerValueDefault !== [0, 0, 0]) { if (this.pickerValueDefault !== [0, 0, 0]) {
if (this.pickerValueDefault[0] > that.provinceData.length - 1) { if (this.pickerValueDefault[0] > that.provinceData.length - 1) {
this.pickerValueDefault[0] = that.provinceData.length - 1; this.pickerValueDefault[0] = that.provinceData.length - 1;
} }
if (this.pickerValueDefault[1] > that.cityData[this.pickerValueDefault[0]].length - 1) { if (
this.pickerValueDefault[1] = that.cityData[this.pickerValueDefault[0]].length - 1; this.pickerValueDefault[1] >
} that.cityData[this.pickerValueDefault[0]].length - 1
if (this.pickerValueDefault[2] > that.areaData[this.pickerValueDefault[0]][this.pickerValueDefault[1]].length - 1) { ) {
this.pickerValueDefault[2] = that.areaData[this.pickerValueDefault[0]][this.pickerValueDefault[1]].length - 1; this.pickerValueDefault[1] =
} that.cityData[this.pickerValueDefault[0]].length - 1;
} }
}, if (
pickerChange(e) { this.pickerValueDefault[2] >
let that = this; that.areaData[this.pickerValueDefault[0]][this.pickerValueDefault[1]]
let changePickerValue = e.mp.detail.value; .length -
if (this.pickerValue[0] !== changePickerValue[0]) { 1
// ) {
this.cityDataList = that.cityData[changePickerValue[0]]; this.pickerValueDefault[2] =
this.areaDataList = that.areaData[changePickerValue[0]][0]; that.areaData[this.pickerValueDefault[0]][
changePickerValue[1] = 0; this.pickerValueDefault[1]
changePickerValue[2] = 0; ].length - 1;
} else if (this.pickerValue[1] !== changePickerValue[1]) { }
// }
this.areaDataList = },
that.areaData[changePickerValue[0]][changePickerValue[1]]; pickerChange(e) {
changePickerValue[2] = 0; let that = this;
} let changePickerValue = e.mp.detail.value;
this.pickerValue = changePickerValue; if (this.pickerValue[0] !== changePickerValue[0]) {
this._$emit('onChange'); //
}, this.cityDataList = that.cityData[changePickerValue[0]];
_$emit(emitName) { this.areaDataList = that.areaData[changePickerValue[0]][0];
let pickObj = { changePickerValue[1] = 0;
label: this._getLabel(), changePickerValue[2] = 0;
value: this._getVale(), } else if (this.pickerValue[1] !== changePickerValue[1]) {
cityCode: this._getCityCode() //
}; this.areaDataList =
this.$emit(emitName, pickObj); that.areaData[changePickerValue[0]][changePickerValue[1]];
}, changePickerValue[2] = 0;
_getLabel() { }
let pcikerLabel = [this.provinceDataList[this.pickerValue[0]].label, this.cityDataList[this.pickerValue[1]].label, this.pickerValue = changePickerValue;
this.areaDataList[this.pickerValue[2]].label this._$emit("onChange");
]; },
_$emit(emitName) {
let pickObj = {
label: this._getLabel(),
value: this._getVale(),
cityCode: this._getCityCode(),
};
this.$emit(emitName, pickObj);
},
_getLabel() {
let pcikerLabel = [
this.provinceDataList[this.pickerValue[0]].label,
this.cityDataList[this.pickerValue[1]].label,
this.areaDataList[this.pickerValue[2]].label,
];
return pcikerLabel; return pcikerLabel;
}, },
_getVale() { _getVale() {
let pcikerValue = [this.provinceDataList[this.pickerValue[0]].value, this.cityDataList[this.pickerValue[1]].value, let pcikerValue = [
this.areaDataList[this.pickerValue[2]].value this.provinceDataList[this.pickerValue[0]].value,
]; this.cityDataList[this.pickerValue[1]].value,
this.areaDataList[this.pickerValue[2]].value,
];
return pcikerValue; return pcikerValue;
}, },
_getCityCode() { _getCityCode() {
return this.areaDataList[this.pickerValue[2]].value; return this.areaDataList[this.pickerValue[2]].value;
} },
} },
}; };
</script> </script>
<style> <style>
.pickerMask { .pickerMask {
position: fixed; position: fixed;
z-index: 1000; z-index: 1000;
top: 0; top: 0;
right: 0; right: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
} }
.mpvue-picker-content { .mpvue-picker-content {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
transition: all 0.3s ease; transition: all 0.3s ease;
transform: translateY(100%); transform: translateY(100%);
z-index: 3000; z-index: 3000;
} }
.mpvue-picker-view-show { .mpvue-picker-view-show {
transform: translateY(0); transform: translateY(0);
} }
.mpvue-picker__hd { .mpvue-picker__hd {
display: flex; display: flex;
padding: 9px 15px; padding: 9px 15px;
background-color: #fff; background-color: #fff;
position: relative; position: relative;
text-align: center; text-align: center;
font-size: 17px; font-size: 17px;
} }
.mpvue-picker__hd:after { .mpvue-picker__hd:after {
content: ' '; content: " ";
position: absolute; position: absolute;
left: 0; left: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
height: 1px; height: 1px;
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
color: #e5e5e5; color: #e5e5e5;
transform-origin: 0 100%; transform-origin: 0 100%;
transform: scaleY(0.5); transform: scaleY(0.5);
} }
.mpvue-picker__action { .mpvue-picker__action {
display: block; display: block;
flex: 1; flex: 1;
color: #1aad19; color: #1aad19;
} }
.mpvue-picker__action:first-child { .mpvue-picker__action:first-child {
text-align: left; text-align: left;
color: #888; color: #888;
} }
.mpvue-picker__action:last-child { .mpvue-picker__action:last-child {
text-align: right; text-align: right;
} }
.picker-item { .picker-item {
text-align: center; text-align: center;
line-height: 40px; line-height: 40px;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
font-size: 16px; font-size: 16px;
} }
.mpvue-picker-view { .mpvue-picker-view {
position: relative; position: relative;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 238px; height: 238px;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
} }
</style> </style>

View File

@ -17,7 +17,7 @@
</view> </view>
<view class="uni-list"> <view class="uni-list">
<label <!-- <label
class="uni-list-cell uni-list-cell-pd" class="uni-list-cell uni-list-cell-pd"
v-if=" v-if="
defaultUserMoney && defaultUserMoney &&
@ -33,8 +33,8 @@
<view> <view>
<switch @change="switchMoney" /> <switch @change="switchMoney" />
</view> </view>
</label> </label> -->
<label <!-- <label
class="uni-list-cell uni-list-cell-pd" class="uni-list-cell uni-list-cell-pd"
v-if=" v-if="
defaultUserMoney && defaultUserMoney &&
@ -50,7 +50,7 @@
<view> <view>
<switch @change="switchPoints" /> <switch @change="switchPoints" />
</view> </view>
</label> </label> -->
<label <label
class="uni-list-cell uni-list-cell-pd" class="uni-list-cell uni-list-cell-pd"
@ -330,7 +330,7 @@ export default {
userRechargeCard: false, userRechargeCard: false,
userSp: false, userSp: false,
password: "", // password: "", //
paymentIndex: 0, paymentIndex: 1,
isWeixin: false, isWeixin: false,
}; };
}, },

File diff suppressed because it is too large Load Diff

View File

@ -1,323 +1,376 @@
<template name="quick-nav"> <template name="quick-nav">
<view :class="[animation ? '' : 'zhezhaoceng']" > <view :class="[animation ? '' : 'zhezhaoceng']">
<movable-area class="movableArea"> <movable-area class="movableArea">
<movable-view class="movableView" @touchmove.stop.prevent="doNothing" direction="all" :x="initX" :y="initY"> <movable-view
<view class="u-top1" v-if="isnav"> class="movableView"
<image v-if="false" src='https://static.lancerdt.com/xcxfile/appicon/nav/black/nav_icon_nav.png' class="quicknav" @click='nav'></image> @touchmove.stop.prevent="doNothing"
<image src='https://static.lancerdt.com/xcxfile/appicon/nav/black/nav_gotop.png' :class="[!isquicknav ?'hide':'quicknav']" @click="returnTop"></image> direction="all"
</view> :x="initX"
<view v-else @click='outnav'> :y="initY"
<view class="u-top1"> >
<navigator :class="[animation ? 'navtext1' : 'navtext']" url='/pages/index/member' open-type='switchTab'><text>{{__('个人中心')}}</text> <view class="u-top1" v-if="isnav">
<image src='https://static.lancerdt.com/xcxfile/appicon/nav/gray/nav_usercenter.png' class='quicknav'></image> <image
</navigator> v-if="false"
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/nav/black/nav_icon_nav.png"
class="quicknav"
@click="nav"
></image>
<image
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/nav/black/nav_gotop.png"
:class="[!isquicknav ? 'hide' : 'quicknav']"
@click="returnTop"
></image>
</view>
<view v-else @click="outnav">
<view class="u-top1">
<navigator
:class="[animation ? 'navtext1' : 'navtext']"
url="/pages/index/member"
open-type="switchTab"
><text>{{ __("个人中心") }}</text>
<image
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/nav/gray/nav_usercenter.png"
class="quicknav"
></image>
</navigator>
<navigator :class="[animation ? 'navtext1' : 'navtext']" url='/member/member/favorites'><text>{{__('我的收藏')}}</text> <navigator
<image src='https://static.lancerdt.com/xcxfile/appicon/nav/gray/nav_my_favor.png' class='quicknav'></image> :class="[animation ? 'navtext1' : 'navtext']"
</navigator> url="/member/member/favorites"
<!-- #ifndef H5 --> ><text>{{ __("我的收藏") }}</text>
<view :class="[animation ? 'navtext1' : 'navtext']" @click='shareBox'><text>{{__('分享')}}</text> <image
<image src='https://static.lancerdt.com/xcxfile/appicon/nav/gray/nav_share.png' class='quicknav'></image> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/nav/gray/nav_my_favor.png"
</view> class="quicknav"
<!-- #endif --> ></image>
<!-- #ifdef H5 --> </navigator>
<view :class="[animation ? 'navtext1' : 'navtext']" @click='shareBoxPoster'><text>{{__('生成海报')}}</text> <!-- #ifndef H5 -->
<image src='https://static.lancerdt.com/xcxfile/appicon/nav/gray/nav_share.png' class='quicknav'></image> <view
</view> :class="[animation ? 'navtext1' : 'navtext']"
<!-- #endif --> @click="shareBox"
<navigator :class="[animation ? 'navtext1' : 'navtext']" url='/pages/index/index' open-type='switchTab'> ><text>{{ __("分享") }}</text>
<text>{{__('首页')}}</text> <image
<image src='https://static.lancerdt.com/xcxfile/appicon/nav/gray/nav_home.png' class='quicknav'></image> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/nav/gray/nav_share.png"
</navigator> class="quicknav"
<view class='open-nav'><text></text> ></image>
<image src='https://static.lancerdt.com/xcxfile/appicon/nav/black/nav_icon_close.png' class='quicknav'></image> </view>
</view> <!-- #endif -->
</view> <!-- #ifdef H5 -->
</view> <view
</movable-view> :class="[animation ? 'navtext1' : 'navtext']"
</movable-area> @click="shareBoxPoster"
</view> ><text>{{ __("生成海报") }}</text>
<image
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/nav/gray/nav_share.png"
class="quicknav"
></image>
</view>
<!-- #endif -->
<navigator
:class="[animation ? 'navtext1' : 'navtext']"
url="/pages/index/index"
open-type="switchTab"
>
<text>{{ __("首页") }}</text>
<image
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/nav/gray/nav_home.png"
class="quicknav"
></image>
</navigator>
<view class="open-nav"
><text></text>
<image
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/nav/black/nav_icon_close.png"
class="quicknav"
></image>
</view>
</view>
</view>
</movable-view>
</movable-area>
</view>
</template> </template>
<script> <script>
export default { export default {
name: "quick-nav", name: "quick-nav",
props: { props: {
isquicknav: { isquicknav: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
},
data() {
return {
isnav: true,
animation: true,
initX: "690",
initY: "1336",
};
},
}, mounted() {
data() { let view = uni.createSelectorQuery().in(this).select(".movableArea");
return { let that = this;
isnav: true,
animation: true,
initX: '690',
initY: '1336',
}
},
mounted() { view
let view = uni.createSelectorQuery().in(this).select(".movableArea"); .fields(
let that = this; {
size: true,
scrollOffset: true,
},
(data) => {
if (data) {
that.setData({
initX: data.width,
initY: data.height - 100,
});
}
}
)
.exec();
},
view.fields({ methods: {
size: true, shareBox: function () {
scrollOffset: true this.$emit("onShareBox", 3);
}, data => { },
if (data) {
that.setData({
initX: data.width,
initY: data.height - 100,
});
}
}).exec();
},
methods: { shareBoxPoster: function () {
shareBox: function() { this.$emit("onShareBox", 3);
this.$emit('onShareBox', 3); },
},
shareBoxPoster: function() { returnTop: function () {
this.$emit('onShareBox', 3); this.$emit("onReturnTop");
}, },
doNothing: function () {},
nav: function () {
this.setData({
isnav: false,
animation: false,
});
},
outnav: function () {
var that = this;
this.setData({
animation: true,
});
returnTop: function() { setTimeout(function () {
this.$emit('onReturnTop'); that.setData({
}, isnav: true,
doNothing: function() { });
}, }, 250);
nav: function() { },
this.setData({ },
isnav: false, };
animation: false
})
},
outnav: function() {
var that = this;
this.setData({
animation: true
});
setTimeout(function() {
that.setData({
isnav: true
})
}, 250)
}
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
@import "../styles/_variables.scss"; @import "../styles/_variables.scss";
/* 快捷导航 */ /* 快捷导航 */
.u-tap-btn { .u-tap-btn {
position: fixed; position: fixed;
right: 20rpx; right: 20rpx;
bottom: 100rpx; bottom: 100rpx;
z-index: 999 z-index: 999;
} }
.u-go-home { .u-go-home {
border-radius: 100%; border-radius: 100%;
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
border: 1px solid #eee; border: 1px solid #eee;
font-size: 20rpx; font-size: 20rpx;
text-align: center; text-align: center;
background-color: #fff; background-color: #fff;
box-shadow: 0px 4rpx 8rpx rgba(0, 0, 0, 0.35); box-shadow: 0px 4rpx 8rpx rgba(0, 0, 0, 0.35);
z-index: 2; z-index: 2;
opacity: 0.8; opacity: 0.8;
line-height: 80rpx; line-height: 80rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.u-go-home .iconfont { .u-go-home .iconfont {
font-size: 36rpx; font-size: 36rpx;
} }
.zhezhaoceng { .zhezhaoceng {
position: fixed; position: fixed;
top: 0; top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 99; z-index: 99;
animation: opacity 500ms; animation: opacity 500ms;
animation-fill-mode: forwards animation-fill-mode: forwards;
} }
@keyframes opacity { @keyframes opacity {
from { from {
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0);
} }
to { to {
background: rgba(0, 0, 0, 0.4); background: rgba(0, 0, 0, 0.4);
} }
} }
@keyframes opacity1 { @keyframes opacity1 {
from { from {
background: rgba(0, 0, 0, 0.4); background: rgba(0, 0, 0, 0.4);
} }
to { to {
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0);
} }
} }
.quicknav { .quicknav {
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
border-radius: 50%; border-radius: 50%;
} }
@keyframes mymove1 {
from {
bottom: 0rpx;
opacity: 0;
}
@keyframes mymove1 { to {
from { bottom: 420rpx;
bottom: 0rpx; opacity: 1;
opacity: 0 }
} }
to { @keyframes mymove2 {
bottom: 420rpx; from {
opacity: 1 bottom: 0rpx;
} opacity: 0;
} }
@keyframes mymove2 { to {
from { bottom: 320rpx;
bottom: 0rpx; opacity: 1;
opacity: 0 }
} }
to { @keyframes mymove3 {
bottom: 320rpx; from {
opacity: 1 bottom: 0rpx;
} opacity: 0;
} }
@keyframes mymove3 { to {
from { bottom: 220rpx;
bottom: 0rpx; opacity: 1;
opacity: 0 }
} }
to { @keyframes mymove4 {
bottom: 220rpx; from {
opacity: 1 bottom: 0rpx;
} opacity: 0;
} }
@keyframes mymove4 { to {
from { bottom: 120rpx;
bottom: 0rpx; opacity: 1;
opacity: 0 }
} }
to { @keyframes mymove5 {
bottom: 120rpx; from {
opacity: 1 bottom: 420rpx;
} opacity: 1;
} }
@keyframes mymove5 { to {
from { bottom: 10rpx;
bottom: 420rpx; }
opacity: 1 }
}
to { @keyframes mymove6 {
bottom: 10rpx; from {
} bottom: 320rpx;
} opacity: 1;
}
@keyframes mymove6 { to {
from { bottom: 10rpx;
bottom: 320rpx; opacity: 0;
opacity: 1 }
} }
to { @keyframes mymove7 {
bottom: 10rpx; from {
opacity: 0 bottom: 220rpx;
} opacity: 1;
} }
@keyframes mymove7 { to {
from { bottom: 10rpx;
bottom: 220rpx; opacity: 0;
opacity: 1 }
} }
to { @keyframes mymove8 {
bottom: 10rpx; from {
opacity: 0 bottom: 120rpx;
} opacity: 1;
} }
@keyframes mymove8 { to {
from { bottom: 10rpx;
bottom: 120rpx; opacity: 0;
opacity: 1 }
} }
to { .navtext text {
bottom: 10rpx; font-size: 24rpx;
opacity: 0 color: #fff;
} text-align: right;
} min-width: 120rpx;
margin-right: 20rpx;
}
.navtext text { .navtext1 text {
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
text-align: right; text-align: right;
min-width: 120rpx; min-width: 120rpx;
margin-right: 20rpx margin-right: 20rpx;
} }
.navtext1 text { .u-tuan-label {
font-size: 24rpx; padding: 5rpx 8rpx;
color: #fff; background-color: #db384c;
text-align: right; border-radius: 4rpx;
min-width: 120rpx; font-size: 24rpx;
margin-right: 20rpx color: #fff;
} margin-right: 8rpx;
}
.u-tuan-label { .m-product-name2 {
padding: 5rpx 8rpx; font-size: 28rpx;
background-color: #DB384C; box-sizing: border-box;
border-radius: 4rpx; padding-right: 20rpx;
font-size: 24rpx; position: relative;
color: #fff; overflow: hidden;
margin-right: 8rpx; text-overflow: ellipsis;
} display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.m-product-name2 { .m-listv .m-product-name2 {
font-size: 28rpx; width: 345rpx;
box-sizing: border-box; box-sizing: border-box;
padding-right: 20rpx; padding: 0 20rpx;
position: relative; overflow: hidden;
overflow: hidden; text-overflow: ellipsis;
text-overflow: ellipsis; display: -webkit-box;
display: -webkit-box; -webkit-box-orient: vertical;
-webkit-box-orient: vertical; }
-webkit-line-clamp: 2;
}
.m-listv .m-product-name2 {
width: 345rpx;
box-sizing: border-box;
padding: 0 20rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
</style> </style>

View File

@ -1,239 +1,258 @@
<template name="share-box-mp"> <template name="share-box-mp">
<view :class="['shareMsk', isShare?'':'hide']"> <view :class="['shareMsk', isShare ? '' : 'hide']">
<view :class="['sharebox', isShareBox?'bounceInUp animated':'bounceOutDown animated']"> <view
<view class='shareList g-flex '> :class="[
<!-- #ifdef MP-WEIXIN --> 'sharebox',
<view class='shareItem g-flex-item'> isShareBox ? 'bounceInUp animated' : 'bounceOutDown animated',
<view class='shareBtn'> ]"
<button open-type="share" style='line-height:0' hover-class="none"> >
<image src='https://static.lancerdt.com/xcxfile/appicon/images/friend.png' style='width:100rpx;height:100rpx;margin-bottom:6rpx'></image> <view class="shareList g-flex">
</button> <!-- #ifdef MP-WEIXIN -->
<label>{{__('分享给朋友')}}</label> <view class="shareItem g-flex-item">
</view> <view class="shareBtn">
</view> <button open-type="share" style="line-height: 0" hover-class="none">
<!-- #endif --> <image
<view class='shareItem g-flex-item'> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/friend.png"
<view class='shareBtn' @click='shareQRCode'> style="width: 100rpx; height: 100rpx; margin-bottom: 6rpx"
<image src='https://static.lancerdt.com/xcxfile/appicon/images/allfriend.png' style='width:100rpx;height:100rpx'></image> ></image>
<label>{{__('生成海报')}}</label> </button>
</view> <label>{{ __("分享给朋友") }}</label>
</view> </view>
</view> </view>
<view class='cancelShare' @click='cancelShare'>{{__('取消')}}</view> <!-- #endif -->
</view> <view class="shareItem g-flex-item">
<view :class="['shareCodeImg', IsJT?'':'hide']"> <view class="shareBtn" @click="shareQRCode">
<uni-icons class="uni-icon uni-icon-clear mp-clean-icon hide" type="clear" size="20" @click='cancelShare' v-if="false"/> <image
<view class="uni-icon uni-icon-clear mp-clean-icon" @click='cancelShare'></view> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/allfriend.png"
<view @click='showCodeImg'> style="width: 100rpx; height: 100rpx"
<image mode="widthFix" :src='Path'></image> ></image>
</view> <label>{{ __("生成海报") }}</label>
<label>{{__('保存至相册 生成海报')}}</label> </view>
<button type="primary" size="mini" @click="saveImg">{{__('保存图片')}}</button> </view>
</view> </view>
</view> <view class="cancelShare" @click="cancelShare">{{ __("取消") }}</view>
</view>
<view :class="['shareCodeImg', IsJT ? '' : 'hide']">
<uni-icons
class="uni-icon uni-icon-clear mp-clean-icon hide"
type="clear"
size="20"
@click="cancelShare"
v-if="false"
/>
<view
class="uni-icon uni-icon-clear mp-clean-icon"
@click="cancelShare"
></view>
<view @click="showCodeImg">
<image mode="widthFix" :src="Path"></image>
</view>
<label>{{ __("保存至相册 生成海报") }}</label>
<button type="primary" size="mini" @click="saveImg">
{{ __("保存图片") }}
</button>
</view>
</view>
</template> </template>
<script> <script>
export default {
name: "share-box-mp",
props: {
shareDataDefault: {
type: Object,
default() {
return {
shareTitle: "",
shareText: "",
href: "",
image: "",
price: 0,
};
},
},
},
data() {
return {
IsJT: false,
Path: "",
isShare: false,
isShareBox: false,
};
},
methods: {
cancel() {
this.isShareBox = false;
this.isShare = false;
this.$emit("onCancel");
},
show() {
this.isShareBox = true;
this.isShare = true;
},
export default { cancelShare: function () {
name: "share-box-mp", this.isShareBox = false;
props: { this.isShare = false;
shareDataDefault: { this.IsJT = false;
type: Object,
default() {
return {
shareTitle: '',
shareText: '',
href: '',
image: '',
price: 0
}
},
},
},
data(){
return {
IsJT:false,
Path:"",
isShare:false,
isShareBox:false
}
},
methods: {
cancel() {
this.isShareBox = false;
this.isShare = false;
this.$emit('onCancel');
},
show() {
this.isShareBox = true;
this.isShare = true;
},
cancelShare: function() { this.$emit("cancelShare");
this.isShareBox = false; },
this.isShare = false; shareQRCode: function (e) {
this.IsJT = false; var that = this;
var params = {
MainPrice: this.shareDataDefault.price,
this.$emit('cancelShare') summary: this.shareDataDefault.shareText,
}, MainImg: this.shareDataDefault.image,
shareQRCode: function(e) { MainTitle: this.shareDataDefault.shareTitle,
var that = this; Path: this.shareDataDefault.href,
var params = { source_from: "wxminiapp",
MainPrice: this.shareDataDefault.price,
summary : this.shareDataDefault.shareText, poster_name: this.shareDataDefault.shareText,
MainImg : this.shareDataDefault.image, path: this.shareDataDefault.href,
MainTitle : this.shareDataDefault.shareTitle, };
Path : this.shareDataDefault.href,
source_from: 'wxminiapp',
poster_name:this.shareDataDefault.shareText, let url = that.cf.URL.wx.getMiniAppQRCodeUnlimitPoster;
path : this.shareDataDefault.href,
};
let url = that.cf.URL.wx.getMiniAppQRCodeUnlimitPoster; if (this.shareDataDefault.price > 0) {
// #ifdef H5
url = that.cf.URL.fx.poster;
params["poster_type"] = 1;
// #endif
// #ifdef MP-WEIXIN
params["poster_type"] = 2;
// #endif
// #ifdef APP-PLUS
params["poster_type"] = 1;
// #endif
} else {
url = that.cf.URL.fx.poster;
if (this.shareDataDefault.price > 0) // #ifdef H5
{ params["poster_type"] = 1;
// #ifdef H5 // #endif
url = that.cf.URL.fx.poster; // #ifdef MP-WEIXIN
params['poster_type'] = 1; params["poster_type"] = 2;
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef APP-PLUS
params['poster_type'] = 2 params["poster_type"] = 1;
// #endif // #endif
// #ifdef APP-PLUS }
params['poster_type'] = 1
// #endif
}
else
{
url = that.cf.URL.fx.poster;
// #ifdef H5 // -
params['poster_type'] = 1; that.$.request({
// #endif url: url,
// #ifdef MP-WEIXIN data: params,
params['poster_type'] = 2 method: "POST",
// #endif success: function (data, status, msg, code) {
// #ifdef APP-PLUS that.setData({
params['poster_type'] = 1 Path: data.url || data.poster_url,
// #endif isShare: true,
} isShareBox: false,
IsJT: true,
});
},
});
// - this.$emit("shareQRCode");
that.$.request({ },
url: url, saveImg: function (e) {
data: params, var that = this;
method:"POST", // #ifdef MP-WEIXIN
success: function(data, status, msg, code) { //
that.setData({ uni.authorize({
Path: data.url || data.poster_url, scope: "scope.writePhotosAlbum",
isShare: true, success() {
isShareBox: false, //
IsJT: true that.saveImgFun();
}) },
} fail() {
}); //
uni.showModal({
title: "授权提示",
content: "您拒绝了授权,如需下载图片,请点击下方按钮重新授权。",
confirmText: "重新授权",
success(res) {
if (res.confirm) {
//
uni.openSetting({
success(res) {
if (res.authSetting["scope.writePhotosAlbum"]) {
//
that.saveImgFun();
} else {
//
uni.showToast({
title: "授权失败",
icon: "none",
});
}
},
});
}
},
});
},
});
// #endif
// #ifndef MP-WEIXIN
this.saveImgFun();
// #endif
},
saveImgFun: function (e) {
var that = this;
that.$.showLoading();
that.$.downloadFile({
url: that.Path,
success: function (t) {
that.$.hideLoading();
that.$.saveImageToPhotosAlbum({
filePath: t.tempFilePath,
success: function () {
that.setData({
Path: "",
isShare: false,
isShareBox: false,
IsJT: false,
}),
that.$.alert("保存图片成功!");
},
fail: function (e) {
that.$.hideLoading();
},
});
},
fail: function (e) {
that.$.hideLoading();
},
});
this.$emit('shareQRCode') that.$.hideLoading();
},
saveImg: function(e) {
var that = this;
// #ifdef MP-WEIXIN
//
uni.authorize({
scope: 'scope.writePhotosAlbum',
success() {
//
that.saveImgFun();
},
fail() {
//
uni.showModal({
title: '授权提示',
content: '您拒绝了授权,如需下载图片,请点击下方按钮重新授权。',
confirmText: '重新授权',
success(res) {
if (res.confirm) {
//
uni.openSetting({
success(res) {
if (res.authSetting['scope.writePhotosAlbum']) {
//
that.saveImgFun();
} else {
//
uni.showToast({
title: '授权失败',
icon: 'none'
})
}
}
})
}
}
})
}
})
// #endif
// #ifndef MP-WEIXIN
this.saveImgFun();
// #endif
},
saveImgFun: function(e) {
var that = this;
that.$.showLoading();
that.$.downloadFile({
url: that.Path,
success: function(t) {
that.$.hideLoading();
that.$.saveImageToPhotosAlbum({
filePath: t.tempFilePath,
success: function() {
that.setData({
Path: "",
isShare: false,
isShareBox: false,
IsJT: false
}), that.$.alert("保存图片成功!")
},
fail: function(e) {
that.$.hideLoading()
}
})
},
fail: function(e) {
that.$.hideLoading()
}
})
that.$.hideLoading() this.$emit("saveImg");
},
showCodeImg: function () {
let that = this;
that.$.previewImage({
current: that.Path,
urls: [that.Path],
});
this.$emit('saveImg') this.$emit("showCodeImg");
}, },
showCodeImg: function() { },
let that = this; };
that.$.previewImage({
current: that.Path,
urls: [that.Path]
})
this.$emit('showCodeImg')
}
}
}
</script> </script>
<style> <style>
.mp-clean-icon{ .mp-clean-icon {
position: absolute; position: absolute;
right: 8rpx; right: 8rpx;
top: 8rpx; top: 8rpx;
color: #999999; color: #999999;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,396 +1,436 @@
<template> <template>
<view style="position: relative;" <view
style="position: relative"
@touchmove="ListTouchMove"
@touchend.stop="ListTouchEnd"
@touchstart="ListTouchStart"
>
<video
:src="video_url"
preload
:show-play-btn="true"
:controls="false"
:style="{ height: height, width: width }"
:loop="true"
:id="`video_${video_id}`"
objectFit="fill"
:enable-progress-gesture="false"
ref="video_url"
play-btn-position="center"
class="video"
:poster="cover_url"
@timeupdate="timeupdate"
@click.stop="clickVideo"
></video>
<cover-image
class="play"
v-if="show_play"
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/play_1.png"
@click.stop="clickVideo"
></cover-image>
<cover-view class="cover-view-left">
<text class="view-left-text">@{{ nickname }}</text>
<view class="view-left-text-content">
<text class="text-content-text">{{ video_describe }}</text>
</view>
</cover-view>
<cover-view class="cover-view-right">
<cover-image
:src="cover_url"
class="avater cimg"
@click.stop="tapAvater"
></cover-image>
<text class="right-follow">+</text>
<cover-image
v-if="is_like"
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/axc.png"
class="img-left"
@click.stop="onUnLike"
:data-story_id="video_id"
></cover-image>
@touchmove="ListTouchMove" <cover-image
@touchend.stop="ListTouchEnd" v-if="!is_like"
@touchstart="ListTouchStart"> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/bed.png"
<video class="img-left"
:src="video_url" @click.stop="onLike"
preload :data-story_id="video_id"
:show-play-btn="true" ></cover-image>
:controls="false"
:style="{ height: height, width: width }"
:loop="true"
:id="`video_${video_id}`"
objectFit="fill"
:enable-progress-gesture="false"
ref="video_url"
play-btn-position="center"
class="video"
:poster="cover_url"
@timeupdate="timeupdate"
@click.stop="clickVideo" <text class="right-text">{{ story_like_count }}</text>
> <cover-image
</video> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/ay2.png"
<cover-image class="play" v-if="show_play" src="https://static.lancerdt.com/xcxfile/appicon/video/play_1.png" style="height: 80rpx"
@click.stop="clickVideo"></cover-image> class="img-left"
<cover-view class="cover-view-left"> @click.stop="tapMsg"
<text class="view-left-text">@{{ nickname }}</text> ></cover-image>
<view class="view-left-text-content"> <text class="right-text">{{ pinglun }}</text>
<text class="text-content-text">{{ video_describe }}</text> <cover-image
</view> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/b6p.png"
</cover-view> style="height: 76rpx"
<cover-view class="cover-view-right"> class="img-left"
<cover-image :src="cover_url" class="avater cimg" @click.stop="tapAvater"></cover-image> @click.stop="tapShare"
<text class="right-follow">+</text> ></cover-image>
<cover-image v-if="is_like" src="https://static.lancerdt.com/xcxfile/appicon/video/img/axc.png" class="img-left" @click.stop="onUnLike" :data-story_id="video_id"></cover-image> <text class="right-text">{{ zhuanfa }}</text>
<cover-image
<cover-image v-if="!is_like" src="https://static.lancerdt.com/xcxfile/appicon/video/img/bed.png" class="img-left" @click.stop="onLike" :data-story_id="video_id"></cover-image> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/changpian.png"
class="musicIcon cimg"
></cover-image>
<text class="right-text">{{ story_like_count }}</text> </cover-view>
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/img/ay2.png" style="height: 80rpx;" class="img-left" @click.stop="tapMsg"></cover-image> <!-- <cover-view class="progressBar" :animation="animationData" :style="`width:${barWidth}px`"></cover-view> -->
<text class="right-text">{{ pinglun }}</text> </view>
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/img/b6p.png" style="height: 76rpx;" class="img-left" @click.stop="tapShare"></cover-image>
<text class="right-text">{{ zhuanfa }}</text>
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/changpian.png" class="musicIcon cimg"></cover-image>
</cover-view>
<!-- <cover-view class="progressBar" :animation="animationData" :style="`width:${barWidth}px`"></cover-view> -->
</view>
</template> </template>
<script> <script>
import { import { mapState, mapMutations } from "vuex";
mapState,
mapMutations
} from 'vuex'
export default { export default {
props: { props: {
video_id: { video_id: {
type: Number, type: Number,
default: 0 default: 0,
}, },
user_id: { user_id: {
type: Number, type: Number,
default: 0 default: 0,
}, },
nickname: { nickname: {
type: String, type: String,
default: '' default: "",
}, },
video_describe: { video_describe: {
type: String, type: String,
default: '' default: "",
}, },
cover_url: { cover_url: {
type: String, type: String,
default: '' default: "",
}, },
video_url: { video_url: {
type: String, type: String,
default: '' default: "",
}, },
dianzan: { dianzan: {
type: Number, type: Number,
default: 0 default: 0,
}, },
is_dianzan: { is_dianzan: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
pinglun: { pinglun: {
type: Number, type: Number,
default: 0 default: 0,
}, },
zhuanfa: { zhuanfa: {
type: Number, type: Number,
default: 0 default: 0,
}, },
play: { play: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
index: { index: {
type: Number, type: Number,
default: 0 default: 0,
}, },
cur_index: { cur_index: {
type: Number, type: Number,
default: 0 default: 0,
}, },
height: { height: {
type: String, type: String,
default: '' default: "",
}, },
width: { width: {
type: String, type: String,
default: '' default: "",
} },
}, },
data() { data() {
return { return {
time: 0, time: 0,
duration: 10, duration: 10,
barWidth:0, barWidth: 0,
animationData: {}, animationData: {},
times:null, times: null,
show_play:false, show_play: false,
is_like: false,
story_like_count: 0,
};
},
created() {
this.is_like = this.is_dianzan;
this.story_like_count = this.dianzan;
},
computed: mapState([
"Config",
"StateCode",
"notice",
"plantformInfo",
"shopInfo",
"userInfo",
"hasLogin",
]),
methods: {
...mapMutations([
"logout",
"getPlantformInfo",
"forceUserInfo",
"getStoreInfo",
]),
ListTouchStart(e) {
//console.log(1, e);
this.$emit("ListTouchStart", e);
},
ListTouchMove(e) {
//console.log(2, e);
this.$emit("ListTouchMove", e);
},
ListTouchEnd(e) {
//console.log(3, e);
this.$emit("ListTouchEnd", e);
},
is_like: false, timeupdate(event) {
story_like_count: 0, let t_w = parseInt(this.width);
}; this.duration = event.detail.duration;
}, this.time = event.detail.currentTime;
created() { let width = (this.time / this.duration) * t_w;
this.is_like = this.is_dianzan; let w = 0;
this.story_like_count = this.dianzan; // //console.log(t_w);
}, // //console.log(width);
computed: mapState(['Config', 'StateCode', 'notice', 'plantformInfo', 'shopInfo', 'userInfo', 'hasLogin']), // //console.log(this.barWidth);
methods: { // if(width > this.barWidth){
...mapMutations(['logout', 'getPlantformInfo', 'forceUserInfo', 'getStoreInfo']), // w = (width - this.barWidth) /20;
ListTouchStart(e) { // //#ifndef APP-PLUS-NVUE
//console.log(1, e); // w = (width - this.barWidth) /5;
this.$emit('ListTouchStart', e); // //#endif
}, // }
ListTouchMove(e) { // if(this.barWidth >= t_w || width >= t_w || (this.barWidth >= 300 && width <= 150)){
//console.log(2, e); // this.barWidth = 0;
this.$emit('ListTouchMove', e); // clearInterval(this.times);
}, // //console.log('');
ListTouchEnd(e) { // }else{
//console.log(3, e); // clearInterval(this.times);
this.$emit('ListTouchEnd', e); // this.times = setInterval(()=>{
}, // this.barWidth += w;
// },50)
// }
},
tapAvater() {
this.$.gopage("/community/community/userspace?uid=" + this.user_id);
//uni.showToast({icon: "success", title: "", duration: 2e3})
},
tapLove() {
uni.showToast({ icon: "success", title: "仅供演示", duration: 2e3 });
},
tapMsg() {
uni.showToast({ icon: "success", title: "仅供演示", duration: 2e3 });
},
tapShare() {
uni.showToast({ icon: "success", title: "仅供演示", duration: 2e3 });
},
clickVideo(e) {
//console.log('');
this.$emit("clickVideo", e);
},
videoPlay() {
if (this.play) {
//console.log('',`video_${this.video_id}`);
this.videoCtx = uni.createVideoContext(`video_${this.video_id}`, this);
this.videoCtx.play();
this.show_play = false;
} else {
//console.log('',`video_${this.video_id}`);
this.videoCtx = uni.createVideoContext(`video_${this.video_id}`, this);
this.videoCtx.pause();
this.show_play = true;
}
},
timeupdate(event) { onLike: function (a) {
let t_w = parseInt(this.width); let that = this;
this.duration = event.detail.duration; that.forceUserInfo(function (user) {
this.time = event.detail.currentTime; that.doLike(a.currentTarget.dataset.story_id);
let width = (this.time / this.duration) * t_w; });
let w = 0; },
// //console.log(t_w); doLike: function (story_id) {
// //console.log(width); var that = this,
// //console.log(this.barWidth); params = {
// if(width > this.barWidth){ story_id: story_id,
// w = (width - this.barWidth) /20; };
// //#ifndef APP-PLUS-NVUE
// w = (width - this.barWidth) /5;
// //#endif
// }
// if(this.barWidth >= t_w || width >= t_w || (this.barWidth >= 300 && width <= 150)){
// this.barWidth = 0;
// clearInterval(this.times);
// //console.log('');
// }else{
// clearInterval(this.times);
// this.times = setInterval(()=>{
// this.barWidth += w;
// },50)
// }
},
tapAvater(){
this.$.gopage('/community/community/userspace?uid=' + this.user_id);
//uni.showToast({icon: "success", title: "", duration: 2e3})
},
tapLove(){
uni.showToast({icon: "success", title: "仅供演示", duration: 2e3})
},
tapMsg(){
uni.showToast({icon: "success", title: "仅供演示", duration: 2e3})
},
tapShare(){
uni.showToast({icon: "success", title: "仅供演示", duration: 2e3})
},
clickVideo(e) {
//console.log('');
this.$emit('clickVideo', e);
},
videoPlay() {
if (this.play) {
//console.log('',`video_${this.video_id}`);
this.videoCtx = uni.createVideoContext(`video_${this.video_id}`, this);
this.videoCtx.play();
this.show_play = false;
} else {
//console.log('',`video_${this.video_id}`);
this.videoCtx = uni.createVideoContext(`video_${this.video_id}`, this);
this.videoCtx.pause();
this.show_play = true;
}
},
that.$.request({
url: this.Config.URL.sns.story_like_add,
data: params,
success: function (data, status, msg, code) {
if (200 == status) {
that.is_like = true;
that.story_like_count++;
} else {
}
},
});
},
onUnLike: function (a) {
let that = this;
that.forceUserInfo(function (user) {
that.canceldianzan(a.currentTarget.dataset.story_id);
});
},
canceldianzan: function (story_id) {
var that = this,
params = {
story_id: story_id,
};
onLike: function (a) { that.$.request({
let that = this; url: this.Config.URL.sns.story_like_remove,
that.forceUserInfo(function(user) { data: params,
that.doLike(a.currentTarget.dataset.story_id) success: function (data, status, msg, code) {
}); if (200 == status) {
}, //
doLike: function (story_id) { that.is_like = false;
var that = this, params = { that.story_like_count--;
story_id: story_id } else {
}; }
},
that.$.request({ });
url: this.Config.URL.sns.story_like_add, },
data: params, },
success: function (data, status, msg, code) { watch: {
if (200 == status) { play(newVal, oldVal) {
that.is_like = true; //console.info('watch play:');
that.story_like_count ++ //console.info(newVal, oldVal);
} else { this.videoPlay();
} },
} },
});
},
onUnLike: function (a) {
let that = this;
that.forceUserInfo(function(user) {
that.canceldianzan(a.currentTarget.dataset.story_id)
});
},
canceldianzan: function (story_id) {
var that = this, params = {
story_id: story_id
};
that.$.request({
url: this.Config.URL.sns.story_like_remove,
data: params,
success: function (data, status, msg, code) {
if (200 == status) {
//
that.is_like = false;
that.story_like_count --
} else {
}
}
});
},
},
watch: {
play(newVal, oldVal) {
//console.info('watch play:');
//console.info(newVal, oldVal);
this.videoPlay();
}
}
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.video { .video {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; position: relative;
} }
.play{ .play {
position: absolute; position: absolute;
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
left: 300rpx; left: 300rpx;
top: 510rpx; top: 510rpx;
opacity: 0.5; opacity: 0.5;
} }
.progressBar { .progressBar {
border-radius: 2rpx; border-radius: 2rpx;
height: 4rpx; height: 4rpx;
background-color: #FF4500; background-color: #ff4500;
z-index: 999999; z-index: 999999;
position: absolute; position: absolute;
bottom: 68rpx; bottom: 68rpx;
/* #ifndef APP-PLUS-NVUE */ /* #ifndef APP-PLUS-NVUE */
bottom: 0rpx; bottom: 0rpx;
/* #endif */ /* #endif */
} }
.cover-view-left { .cover-view-left {
position: absolute; position: absolute;
margin-left: 20rpx; margin-left: 20rpx;
width: 580rpx; width: 580rpx;
bottom: 100rpx; bottom: 100rpx;
z-index: 9999; z-index: 9999;
font-size: 14px; font-size: 14px;
color: #ffffff; color: #ffffff;
/* #ifndef APP-PLUS-NVUE */ /* #ifndef APP-PLUS-NVUE */
bottom: 30rpx; bottom: 30rpx;
/* #endif */ /* #endif */
} }
.left-text { .left-text {
font-size: 14px; font-size: 14px;
color: #ffffff; color: #ffffff;
} }
.cover-view-right { .cover-view-right {
position: absolute; position: absolute;
bottom: 40px; bottom: 40px;
right: 30rpx; right: 30rpx;
z-index: 9999; z-index: 9999;
text-align: center; text-align: center;
/* #ifndef APP-PLUS-NVUE */ /* #ifndef APP-PLUS-NVUE */
bottom: 0rpx; bottom: 0rpx;
/* #endif */ /* #endif */
} }
.avater { .avater {
border-radius: 50%; border-radius: 50%;
border-width: 2px; border-width: 2px;
border-style: solid; border-style: solid;
border-color: #ffffff; border-color: #ffffff;
} }
.cimg { .cimg {
height: 90rpx; height: 90rpx;
width: 90rpx; width: 90rpx;
margin-bottom: 50rpx; margin-bottom: 50rpx;
} }
.img-left { .img-left {
width: 80rpx; width: 80rpx;
height: 66rpx; height: 66rpx;
padding-left: 4px; padding-left: 4px;
} }
.right-follow { .right-follow {
position: absolute; position: absolute;
z-index: 100; z-index: 100;
top: 75rpx; top: 75rpx;
left: 28rpx; left: 28rpx;
color: #ffffff; color: #ffffff;
font-size: 16px; font-size: 16px;
width: 34rpx; width: 34rpx;
height: 34rpx; height: 34rpx;
background-color: #f12f5b; background-color: #f12f5b;
text-align: center; text-align: center;
line-height: 34rpx; line-height: 34rpx;
border-radius: 17rpx; border-radius: 17rpx;
} }
.right-text { .right-text {
color: #ffffff; color: #ffffff;
font-size: 11px; font-size: 11px;
text-align: center; text-align: center;
margin-bottom: 40rpx; margin-bottom: 40rpx;
} }
.musicIcon { .musicIcon {
margin-top: 40rpx; margin-top: 40rpx;
/* #ifndef APP-PLUS-NVUE */ /* #ifndef APP-PLUS-NVUE */
animation: rotating 3s linear infinite; animation: rotating 3s linear infinite;
/* #endif */ /* #endif */
} }
@keyframes rotating { @keyframes rotating {
from { from {
transform: rotate(0); transform: rotate(0);
} }
to { to {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
.view-left-text-content { .view-left-text-content {
flex: 1; flex: 1;
} }
.view-left-text { .view-left-text {
color: #ffffff; color: #ffffff;
font-size: 18px; font-size: 18px;
margin-bottom: 10rpx; margin-bottom: 10rpx;
font-weight: bold; font-weight: bold;
} }
.text-content-text { .text-content-text {
color: #ffffff; color: #ffffff;
font-size: 16px; font-size: 16px;
line-height: 50rpx; line-height: 50rpx;
height: 100rpx; height: 100rpx;
overflow: hidden; overflow: hidden;
} }
</style> </style>

View File

@ -1,323 +1,368 @@
<template name="zy-search"> <template name="zy-search">
<view> <view>
<view class="search"> <view class="search">
<slot></slot> <slot></slot>
<!-- 使用$emit触发实例上(父组件)的自定义方法并传入参数 --> <!-- 使用$emit触发实例上(父组件)的自定义方法并传入参数 -->
<!-- <button type="primary" @click="$emit('test','block')">方形</button> --> <!-- <button type="primary" @click="$emit('test','block')">方形</button> -->
<!-- sync双向数据绑定语法糖 --> <!-- sync双向数据绑定语法糖 -->
<!-- <button type="primary" @click="changeStyle">双向数据绑定改变style</button> --> <!-- <button type="primary" @click="changeStyle">双向数据绑定改变style</button> -->
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<image src="https://static.lancerdt.com/xcxfile/appicon/zy-search/voice.svg" mode="aspectFit" @click="startRecognize()" class="voice-icon"></image> <image
<!-- #endif --> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/zy-search/voice.svg"
<template v-if="isFocus"> mode="aspectFit"
<input maxlength="20" focus type="text" value="" confirm-type="search" @confirm="searchStart()" :placeholder="__('请输入关键词搜索')" v-model.trim="searchText"/> @click="startRecognize()"
</template> class="voice-icon"
<template v-else> ></image>
<input maxlength="20" type="text" value="" confirm-type="search" @confirm="searchStart()" :placeholder="__('请输入关键词搜索')" v-model.trim="searchText"/> <!-- #endif -->
</template> <template v-if="isFocus">
<image src="https://static.lancerdt.com/xcxfile/appicon/zy-search/search.svg" mode="aspectFit" @click="searchStart()" class="search-icon"></image> <input
</view> maxlength="20"
<view :class="'s-' + theme" v-if="hList.length > 0"> focus
<view class="header"> type="text"
{{__('历史记录')}} value=""
<image src="https://static.lancerdt.com/xcxfile/appicon/zy-search/delete.svg" mode="aspectFit" @click="delhistory"></image> confirm-type="search"
</view> @confirm="searchStart()"
<view class="list"> :placeholder="__('请输入关键词搜索')"
<view v-for="(item,index) in hList" :key="index" @click="keywordsClick(item)">{{item}}</view> v-model.trim="searchText"
</view> />
</view> </template>
<view :class="'wanted-' + theme" v-if="showWant"> <template v-else>
<view class="header">{{__('猜你想搜的')}}</view> <input
<view class="list"> maxlength="20"
<view v-for="(item,index) in hotList" :key="index" @click="keywordsClick(item)">{{item}}</view> type="text"
</view> value=""
</view> confirm-type="search"
</view> @confirm="searchStart()"
:placeholder="__('请输入关键词搜索')"
v-model.trim="searchText"
/>
</template>
<image
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/zy-search/search.svg"
mode="aspectFit"
@click="searchStart()"
class="search-icon"
></image>
</view>
<view :class="'s-' + theme" v-if="hList.length > 0">
<view class="header">
{{ __("历史记录") }}
<image
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/zy-search/delete.svg"
mode="aspectFit"
@click="delhistory"
></image>
</view>
<view class="list">
<view
v-for="(item, index) in hList"
:key="index"
@click="keywordsClick(item)"
>{{ item }}</view
>
</view>
</view>
<view :class="'wanted-' + theme" v-if="showWant">
<view class="header">{{ __("猜你想搜的") }}</view>
<view class="list">
<view
v-for="(item, index) in hotList"
:key="index"
@click="keywordsClick(item)"
>{{ item }}</view
>
</view>
</view>
</view>
</template> </template>
<script> <script>
export default{ export default {
name:"zy-search", name: "zy-search",
props:{ props: {
isFocus:{ // isFocus: {
type: Boolean, //
default: false type: Boolean,
}, default: false,
theme:{ // },
type: String, theme: {
default: 'block' //
}, type: String,
showWant:{ // default: "block",
type: Boolean, },
default: false showWant: {
}, //
hotList: { // type: Boolean,
type: Array, default: false,
default () { },
return [] hotList: {
} //
}, type: Array,
searchHisList: { default() {
type: Array, return [];
default () { },
return [] },
} searchHisList: {
}, type: Array,
suggestText: { default() {
type: String, return [];
default: '' },
}, },
suggestText: {
type: String,
default: "",
},
speechEngine: { //=>:iFly,:'baidu' speechEngine: {
type: String, //=>:iFly,:'baidu'
default: 'baidu' type: String,
} default: "baidu",
}, },
data() { },
return { data() {
searchText:'', // return {
hList:[] // searchText: "", //
}; hList: [], //
}, };
created() { },
var that = this; created() {
setTimeout(()=>{ var that = this;
this.setData({ setTimeout(() => {
searchText: this.suggestText
});
if (this.searchHisList.length > 0) // this.setData({
{ // searchText: this.suggestText,
//this.hList = this.searchHisList; // });
this.hList = uni.getStorageSync('search_cache');
}
else
{
this.hList = uni.getStorageSync('search_cache');
}
}, 200)
},
methods: {
searchStart: function() { //
let _this = this;
if (_this.searchText == '') {
uni.showToast({
title: _this.__('请输入关键字'),
icon: 'none',
duration: 1000
});
}else{
uni.getStorage({ if (this.searchHisList.length > 0) {
key:'search_cache', //this.hList = this.searchHisList;
success(res){ this.hList = uni.getStorageSync("search_cache");
let list = res.data; } else {
let t = true; this.hList = uni.getStorageSync("search_cache");
if(list.length > 5){ }
for(let item of list){ }, 200);
if(item == _this.searchText){ },
return; methods: {
} searchStart: function () {
} //
list.pop(); let _this = this;
list.unshift(_this.searchText); if (_this.searchText == "") {
}else{ uni.showToast({
for(let item of list){ title: _this.__("请输入关键字"),
if(item == _this.searchText){ icon: "none",
t = false; duration: 1000,
} });
} } else {
if(t) uni.getStorage({
{ key: "search_cache",
list.unshift(_this.searchText); success(res) {
} let list = res.data;
let t = true;
} if (list.length > 5) {
_this.hList = list; for (let item of list) {
uni.setStorage({ if (item == _this.searchText) {
key: 'search_cache', return;
data: _this.hList }
}); }
_this.$emit('getSearchText', _this.searchText); list.pop();
}, list.unshift(_this.searchText);
fail() { } else {
_this.hList = []; for (let item of list) {
_this.hList.push(_this.searchText); if (item == _this.searchText) {
uni.setStorage({ t = false;
key: 'search_cache', }
data: _this.hList }
}); if (t) {
_this.$emit('getSearchText', _this.searchText); list.unshift(_this.searchText);
} }
}) }
} _this.hList = list;
}, uni.setStorage({
keywordsClick (item) { // key: "search_cache",
this.searchText = item; data: _this.hList,
this.$emit('getSearchText', item); });
}, _this.$emit("getSearchText", _this.searchText);
delhistory () { // },
this.hList = []; fail() {
uni.setStorage({ _this.hList = [];
key: 'search_cache', _this.hList.push(_this.searchText);
data: [] uni.setStorage({
}); key: "search_cache",
}, data: _this.hList,
startRecognize: function() { // });
let _this = this; _this.$emit("getSearchText", _this.searchText);
let options = {}; },
options.engine = _this.speechEngine; });
options.punctuation = false; // }
options.timeout = 10 * 1000; },
plus.speech.startRecognize(options, function(s) { keywordsClick(item) {
_this.searchText = _this.searchText + s; //
}); this.searchText = item;
} this.$emit("getSearchText", item);
} },
} delhistory() {
//
this.hList = [];
uni.setStorage({
key: "search_cache",
data: [],
});
},
startRecognize: function () {
//
let _this = this;
let options = {};
options.engine = _this.speechEngine;
options.punctuation = false; //
options.timeout = 10 * 1000;
plus.speech.startRecognize(options, function (s) {
_this.searchText = _this.searchText + s;
});
},
},
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.search{ .search {
width: 640rpx; width: 640rpx;
margin: 30rpx auto 0; margin: 30rpx auto 0;
position: relative; position: relative;
input{ input {
background-color: #F7F7F7; background-color: #f7f7f7;
padding: 10rpx 74rpx; padding: 10rpx 74rpx;
font-size: 28rpx; font-size: 28rpx;
border-radius: 50rpx; border-radius: 50rpx;
} }
.voice-icon{ .voice-icon {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
padding: 16rpx 20rpx 16rpx 0; padding: 16rpx 20rpx 16rpx 0;
position: absolute; position: absolute;
left: 16rpx; left: 16rpx;
top: 4rpx; top: 4rpx;
z-index: 10; z-index: 10;
} }
.search-icon{ .search-icon {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
padding: 16rpx 20rpx 16rpx 0; padding: 16rpx 20rpx 16rpx 0;
position: absolute; position: absolute;
right: 0; right: 0;
top: -2rpx; top: -2rpx;
z-index: 10; z-index: 10;
} }
} }
.s-block{ .s-block {
margin-top: 30rpx; margin-top: 30rpx;
.header{ .header {
font-size: 32rpx; font-size: 32rpx;
padding: 30rpx; padding: 30rpx;
position: relative; position: relative;
image{ image {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
padding: 10rpx; padding: 10rpx;
position: absolute; position: absolute;
right: 40rpx; right: 40rpx;
top: 24rpx; top: 24rpx;
} }
} }
.list{ .list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
view{ view {
width: 50%; width: 50%;
color: #8A8A8A; color: #8a8a8a;
font-size: 28rpx; font-size: 28rpx;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
padding: 20rpx 0; padding: 20rpx 0;
border-top: 2rpx solid #FFF; border-top: 2rpx solid #fff;
border-left: 2rpx solid #FFF; border-left: 2rpx solid #fff;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
background-color: #F7F7F7; background-color: #f7f7f7;
} }
} }
} }
.s-circle{ .s-circle {
margin-top: 30rpx; margin-top: 30rpx;
.header{ .header {
font-size: 32rpx; font-size: 32rpx;
padding: 30rpx; padding: 30rpx;
border-bottom: 2rpx solid #F9F9F9; border-bottom: 2rpx solid #f9f9f9;
position: relative; position: relative;
image{ image {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
padding: 10rpx; padding: 10rpx;
position: absolute; position: absolute;
right: 40rpx; right: 40rpx;
top: 24rpx; top: 24rpx;
} }
} }
.list{ .list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 30rpx 20rpx; padding: 0 30rpx 20rpx;
view{ view {
padding: 8rpx 30rpx; padding: 8rpx 30rpx;
margin: 20rpx 30rpx 0 0; margin: 20rpx 30rpx 0 0;
font-size: 28rpx; font-size: 28rpx;
color: #8A8A8A; color: #8a8a8a;
background-color: #F7F7F7; background-color: #f7f7f7;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
border-radius: 20rpx; border-radius: 20rpx;
} }
} }
} }
.wanted-block{ .wanted-block {
margin-top: 30rpx; margin-top: 30rpx;
.header{ .header {
font-size: 32rpx; font-size: 32rpx;
padding: 30rpx; padding: 30rpx;
} }
.list{ .list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
view{ view {
width: 50%; width: 50%;
color: #8A8A8A; color: #8a8a8a;
font-size: 28rpx; font-size: 28rpx;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
padding: 20rpx 0; padding: 20rpx 0;
border-top: 2rpx solid #FFF; border-top: 2rpx solid #fff;
border-left: 2rpx solid #FFF; border-left: 2rpx solid #fff;
background-color: #F7F7F7; background-color: #f7f7f7;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
} }
.wanted-circle{ .wanted-circle {
margin-top: 30rpx; margin-top: 30rpx;
.header{ .header {
font-size: 32rpx; font-size: 32rpx;
padding: 30rpx; padding: 30rpx;
} }
.list{ .list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 30rpx 20rpx; padding: 0 30rpx 20rpx;
view{ view {
padding: 8rpx 30rpx; padding: 8rpx 30rpx;
margin: 20rpx 30rpx 0 0; margin: 20rpx 30rpx 0 0;
font-size: 28rpx; font-size: 28rpx;
color: #8A8A8A; color: #8a8a8a;
background-color: #F7F7F7; background-color: #f7f7f7;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
border-radius: 20rpx; border-radius: 20rpx;
} }
} }
} }
</style> </style>

View File

@ -284,7 +284,8 @@ export default {
"menu": iu + "?ctl=Store&met=menu&typ=json", "menu": iu + "?ctl=Store&met=menu&typ=json",
// "lists":iu + "?ctl=Store&met=lists&typ=json", // "lists":iu + "?ctl=Store&met=lists&typ=json",
"lists": ip + "shop/store/lists", "lists": ip + "shop/store/lists",
// 附近门店列表
"nearList": ip + 'shop/store/near/list',
"listsChain": iu + "?ctl=Chain&met=lists&typ=json", "listsChain": iu + "?ctl=Chain&met=lists&typ=json",
// "getChain":iu + "?ctl=Chain&met=getChainInfo&typ=json", // "getChain":iu + "?ctl=Chain&met=getChainInfo&typ=json",
"getChain": ip + "shop/shop-chain-base/getChainInfo", "getChain": ip + "shop/shop-chain-base/getChainInfo",
@ -1086,7 +1087,17 @@ export default {
"card": { "card": {
"card_list": mu + "/card/pay/pay-card-info/getListByUserid", "card_list": mu + "/card/pay/pay-card-info/getListByUserid",
"card_info_get": mu + "/card/pay/pay-card-info/getInfoByCardTypeId" "card_info_get": mu + "/card/pay/pay-card-info/getInfoByCardTypeId"
} },
// 顺丰同城
"SF":{
"createOrder": ip + 'shop/sf-express/create-order',
"addOrderGratuityFee" : ip + 'shop/sf-express/add-order-gratuity-fee',
"reminderOrder" : ip + 'shop/sf-express/reminder-order',
"cancelOrder" : ip + 'shop/sf-express/cancel-order',
"listOrderFeed" : ip + 'shop/sf-express/list-order-feed',
"riderLatestPosition" : ip + 'shop/sf-express/rider-latest-position',
"mapH5" : ip + 'shop/sf-express/rider-view/v2'
}
}, },
"tabBar": { "tabBar": {
"color": "#7A7E83", "color": "#7A7E83",

View File

@ -7,7 +7,7 @@ var data = {
symbol_right:'CNY', symbol_right:'CNY',
label:'中文', label:'中文',
standard:true, standard:true,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbc4d56.png', img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbc4d56.png',
items:[ items:[
{ {
lang:'zh-CN', lang:'zh-CN',
@ -16,7 +16,7 @@ var data = {
symbol_right:'CNY', symbol_right:'CNY',
label:'中文', label:'中文',
standard:true, standard:true,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbc4d56.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbc4d56.png'
}/*, }/*,
{ {
lang:'zh-HK', lang:'zh-HK',
@ -25,7 +25,7 @@ var data = {
symbol_right:'CNY', symbol_right:'CNY',
label:'中国香港', label:'中国香港',
standard:true, standard:true,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbc4d56.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbc4d56.png'
}, },
{ {
lang:'zh-TW', lang:'zh-TW',
@ -34,7 +34,7 @@ var data = {
symbol_right:'TWD', symbol_right:'TWD',
label:'中国台湾', label:'中国台湾',
standard:true, standard:true,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbc4d56.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbc4d56.png'
}, },
{ {
lang:'en-GB', lang:'en-GB',
@ -43,7 +43,7 @@ var data = {
symbol_right:'USD', symbol_right:'USD',
label:'English', label:'English',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbd2fde.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbd2fde.png'
}, },
{ {
lang:'ja-JP', lang:'ja-JP',
@ -52,7 +52,7 @@ var data = {
standard:false, standard:false,
symbol:'J.¥', symbol:'J.¥',
symbol_right:'JPY', symbol_right:'JPY',
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affba1acd.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affba1acd.png'
}, },
{ {
lang:'th-TH', lang:'th-TH',
@ -61,7 +61,7 @@ var data = {
symbol_right:'THB', symbol_right:'THB',
label:'ภาษาไทย', label:'ภาษาไทย',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affba41e4.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affba41e4.png'
}, },
{ {
lang:'es-MX', lang:'es-MX',
@ -70,7 +70,7 @@ var data = {
symbol_right:'MXP', symbol_right:'MXP',
label:'México', label:'México',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affb9d481.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affb9d481.png'
}, },
{ {
lang:'ar-SA', lang:'ar-SA',
@ -79,7 +79,7 @@ var data = {
symbol_right:'SAR', symbol_right:'SAR',
standard:true, standard:true,
label:'عربي ،', label:'عربي ،',
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbcc280.png', img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbcc280.png',
}, },
{ {
lang:'vi-VN', lang:'vi-VN',
@ -88,7 +88,7 @@ var data = {
symbol_right:'THB', symbol_right:'THB',
label:'ViệtName', label:'ViệtName',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbaedc0.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbaedc0.png'
}, },
{ {
lang:'tr-TR', lang:'tr-TR',
@ -97,7 +97,7 @@ var data = {
symbol_right:'TRL', symbol_right:'TRL',
label:'Türkçe', label:'Türkçe',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbba93b.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbba93b.png'
}, },
{ {
lang:'id-ID', lang:'id-ID',
@ -106,7 +106,7 @@ var data = {
symbol_right:'IDR', symbol_right:'IDR',
label:'IndonesiaName', label:'IndonesiaName',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbefcd4.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbefcd4.png'
}, },
{ {
lang:'en-GB', lang:'en-GB',
@ -115,7 +115,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'Britain', label:'Britain',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbc9b6c.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbc9b6c.png'
}, },
{ {
lang:'es-ES', lang:'es-ES',
@ -124,7 +124,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'España', label:'España',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affb9d481.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affb9d481.png'
}, },
{ {
lang:'de-DE', lang:'de-DE',
@ -133,7 +133,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'Deutsch', label:'Deutsch',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbc0ecf.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbc0ecf.png'
}, },
{ {
lang:'fr-FR', lang:'fr-FR',
@ -142,7 +142,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'Français', label:'Français',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affb9fb8a.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affb9fb8a.png'
}, },
{ {
lang:'pt-PT', lang:'pt-PT',
@ -151,7 +151,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'Português', label:'Português',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbf0c70.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbf0c70.png'
}, },
{ {
lang:'it-IT', lang:'it-IT',
@ -160,7 +160,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'Italiano', label:'Italiano',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbba16a.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbba16a.png'
}, },
{ {
lang:'ru-RU', lang:'ru-RU',
@ -169,7 +169,7 @@ var data = {
symbol_right:'RUB', symbol_right:'RUB',
label:'Русский язык', label:'Русский язык',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affba229e.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affba229e.png'
}, },
{ {
lang:'ro-RO', lang:'ro-RO',
@ -178,7 +178,7 @@ var data = {
symbol_right:'RON', symbol_right:'RON',
label:'România', label:'România',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affb9ccab.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affb9ccab.png'
}, },
{ {
lang:'az-AZ', lang:'az-AZ',
@ -187,7 +187,7 @@ var data = {
symbol_right:'AZN', symbol_right:'AZN',
label:'AzerbayjanlıName', label:'AzerbayjanlıName',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbd2044.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbd2044.png'
}, },
{ {
lang:'el-GR', lang:'el-GR',
@ -196,7 +196,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'Ελληνικά', label:'Ελληνικά',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbec621.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbec621.png'
}, },
{ {
lang:'fi-FI', lang:'fi-FI',
@ -205,7 +205,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'Suomi', label:'Suomi',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbdd3f1.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbdd3f1.png'
}, },
{ {
lang:'lv-LV', lang:'lv-LV',
@ -214,7 +214,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'Latvijas', label:'Latvijas',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbe29e1.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbe29e1.png'
}, },
{ {
lang:'nl-NL', lang:'nl-NL',
@ -223,7 +223,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'Nederlands', label:'Nederlands',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbd7633.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbd7633.png'
}, },
{ {
lang:'da-DK', lang:'da-DK',
@ -232,7 +232,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'Denmark', label:'Denmark',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbe9741.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbe9741.png'
}, },
{ {
lang:'sr-RS', lang:'sr-RS',
@ -241,7 +241,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'Република Србија', label:'Република Србија',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affb99601.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affb99601.png'
}, },
{ {
lang:'pl-PL', lang:'pl-PL',
@ -250,7 +250,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'Polski', label:'Polski',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbb5356.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbb5356.png'
}, },
{ {
lang:'uk-UA', lang:'uk-UA',
@ -259,7 +259,7 @@ var data = {
symbol_right:'EUR', symbol_right:'EUR',
label:'УкраїнськаName', label:'УкраїнськаName',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbd5ec1.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbd5ec1.png'
}, },
{ {
lang:'kk-KZ', lang:'kk-KZ',
@ -268,7 +268,7 @@ var data = {
symbol_right:'KZT', symbol_right:'KZT',
label:азақстанName', label:азақстанName',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbc2e0f.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbc2e0f.png'
}, },
{ {
lang:'my-MM', lang:'my-MM',
@ -277,7 +277,7 @@ var data = {
symbol_right:'BUK', symbol_right:'BUK',
label:'မြန်မာ', label:'မြန်မာ',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affba323e.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affba323e.png'
}, },
{ {
lang:'ko-KR', lang:'ko-KR',
@ -286,7 +286,7 @@ var data = {
symbol_right:'KRW', symbol_right:'KRW',
label:'한국.', label:'한국.',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/ko_KR.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/ko_KR.png'
}, },
{ {
lang:'ms-MY', lang:'ms-MY',
@ -295,7 +295,7 @@ var data = {
symbol_right:'MYR', symbol_right:'MYR',
label:'Malay', label:'Malay',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/5322affbc939c.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbc939c.png'
}, },
{ {
lang:'lo-LA', lang:'lo-LA',
@ -304,7 +304,7 @@ var data = {
symbol_right:'LAK', symbol_right:'LAK',
label:'ເມືອງລາວ', label:'ເມືອງລາວ',
standard:false, standard:false,
img:'https://static.lancerdt.com/lancerdt/flags/square/lo_LA.png' img:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/lo_LA.png'
}*/ }*/
] ]
} }

File diff suppressed because it is too large Load Diff

View File

@ -226,7 +226,7 @@
<view class="alert" v-if="show"> <view class="alert" v-if="show">
<image <image
style="width: 50rpx; height: 50rpx" style="width: 50rpx; height: 50rpx"
src="https://static.lancerdt.com/xcxfile/appicon/images/true.png" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/true.png"
></image> ></image>
<text style="margin-left: 20rpx">{{ Info }}</text> <text style="margin-left: 20rpx">{{ Info }}</text>
</view> </view>

View File

@ -40,7 +40,7 @@ class apiconfig {
let arr = {}; let arr = {};
alt.forEach(function(item, index){ alt.forEach(function(item, index){
arr[item] = 'https://static.lancerdt.com/xcxfile/appicon/im/face/'+ index + '.gif'; arr[item] = 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/face/'+ index + '.gif';
}); });

15
helpers/loginPopup.js Normal file
View File

@ -0,0 +1,15 @@
import Vue from 'vue'
import loginPopup from '@/components/loginPopup.vue'
const loginPopup_ = Vue.extend(loginPopup)
export const $loginPopup = (data) =>{
const node = new loginPopup_({
show:data
})
node.$mount()
document.body.appendChild(node.$el)
}

View File

@ -33,9 +33,9 @@
</style> </style>
<script type="text/javascript" src="https://static.lancerdt.com/js/jquery.min.js"></script> <script type="text/javascript" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/js/jquery.min.js"></script>
<script type="text/javascript" src="https://static.lancerdt.com/js/qrcode.lib.min.js"></script> <script type="text/javascript" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/js/qrcode.lib.min.js"></script>
<script type="text/javascript" src="https://static.lancerdt.com/js/qrcode.js"></script> <script type="text/javascript" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/js/qrcode.js"></script>
</head> </head>
<body> <body>
<div class="sstouch-main-layout" style="margin-bottom: 14rem!important"> <div class="sstouch-main-layout" style="margin-bottom: 14rem!important">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -94,7 +94,7 @@
</view> </view>
<block v-if="false"> <block v-if="false">
<image src="https://static.lancerdt.com/xcxfile/appicon/im/img/tab/add2.png" @tap="addEmojiPackage" style="float:left;margin-top: -64px; margin-left: 12px; width: 32px;height: 32px;" /> <image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/add2.png" @tap="addEmojiPackage" style="float:left;margin-top: -64px; margin-left: 12px; width: 32px;height: 32px;" />
<scroll-view class="scroll-view_H" scroll-x="true" @scroll="scroll" scroll-left="120"> <scroll-view class="scroll-view_H" scroll-x="true" @scroll="scroll" scroll-left="120">
<view class="scroll-view-item_H" v-for="(emoji,index) in items" :key="index" v-if="index!==0 && index!==items.length-1"> <view class="scroll-view-item_H" v-for="(emoji,index) in items" :key="index" v-if="index!==0 && index!==items.length-1">
@ -103,7 +103,7 @@
</scroll-view> </scroll-view>
<image src="https://static.lancerdt.com/xcxfile/appicon/im/img/tab/setting.png" @tap="settingEmoji" style="float:left;margin-top: -64px; margin-left: 320px; width: 32px;height: 32px;"> <image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/setting.png" @tap="settingEmoji" style="float:left;margin-top: -64px; margin-left: 320px; width: 32px;height: 32px;">
</block> </block>
<view class="toast" v-show="toastShow"> <view class="toast" v-show="toastShow">
@ -114,301 +114,312 @@
</template> </template>
<script> <script>
import emojiData from "@/im/static/emoji/emojiData.js" import emojiData from "@/im/static/emoji/emojiData.js";
var windowWidth = 0 var windowWidth = 0;
uni.getSystemInfo({ uni.getSystemInfo({
success: function(res) { success: function (res) {
windowWidth = res.windowWidth windowWidth = res.windowWidth;
} },
}); });
export default { export default {
// //
props: { props: {},
data() {
return {
scrollTop: 0,
old: {
scrollTop: 0,
},
emojiWidth: windowWidth * 8,
emojiMarginLeft: -windowWidth,
transition: "transform 0 ease-in 0",
}, toastShow: false,
data() { toastText: "",
return { beginX: 0,
scrollTop: 0, beforeList: [{}],
old: { nextList: [{}],
scrollTop: 0 nowX: 0,
}, endX: 0,
emojiWidth: windowWidth * 8, activeEmojiTab: 1,
emojiMarginLeft: -windowWidth, activeIndex: 1,
transition: 'transform 0 ease-in 0', groupSize: emojiData.imgArr.length, //
groupIndex: 1, //
items: emojiData.imgArr,
pointItemList: 0,
// list: [
// ['', '', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['饿', '', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['西', '', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['', '', '便便', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['NO', 'OK', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', '']
// ],
// reg: /\S{1,3}/gi,
// item: []
};
},
created() {
this.emojiWidth =
windowWidth * (this.items[this.groupIndex].emojiList.length + 2);
this.emojiMarginLeft = -windowWidth * this.activeIndex;
// this.transition='none'
toastShow: false, // //
toastText: '', this.pointItemList = this.items[this.groupIndex].emojiList.length;
beginX: 0, // console.log(this.pointItemList)
beforeList: [{}], this.beforeList =
nextList: [{}], this.items[this.groupIndex - 1].emojiList[
nowX: 0, this.items[this.groupIndex - 1].emojiList.length - 1
endX: 0, ];
activeEmojiTab: 1, this.nextList = this.items[this.groupIndex + 1].emojiList[0];
activeIndex: 1, },
groupSize: emojiData.imgArr.length, //
groupIndex: 1, //
items: emojiData.imgArr,
pointItemList: 0,
// list: [
// ['', '', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['饿', '', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['西', '', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['', '', '便便', '', '', '', '', ''],
// ['', '', '', '', '', '', '', ''],
// ['NO', 'OK', '', '', '', '', '', ''],
// ['', '', '', '', '', '', '', '']
// ],
// reg: /\S{1,3}/gi,
// item: []
}
},
created() {
this.emojiWidth = windowWidth * (this.items[this.groupIndex].emojiList.length + 2)
this.emojiMarginLeft = -windowWidth * this.activeIndex
// this.transition='none'
// // onLoad: function () {
this.pointItemList = this.items[this.groupIndex].emojiList.length const res = uni.getSystemInfoSync();
// console.log(this.pointItemList) this.style.pageHeight = res.windowHeight;
this.beforeList = this.items[this.groupIndex - 1].emojiList[this.items[this.groupIndex - 1].emojiList.length - 1] // console.log(uni.getSystemInfoSync().screenWidth)
this.nextList = this.items[this.groupIndex + 1].emojiList[0] this.style.contentViewHeight =
}, res.windowHeight - (uni.getSystemInfoSync().screenWidth / 750) * 100; //
},
methods: {
selectTab: function (activeIndex, index) {
// this.toast(":" + index + ":"+activeIndex)
onLoad: function() { this.activeIndex = activeIndex;
const res = uni.getSystemInfoSync(); this.groupIndex = index;
this.style.pageHeight = res.windowHeight; this.activeEmojiTab = index;
// console.log(uni.getSystemInfoSync().screenWidth)
this.style.contentViewHeight = res.windowHeight - uni.getSystemInfoSync().screenWidth / 750 * (100); //
},
methods: {
selectTab: function(activeIndex, index) {
// this.toast(":" + index + ":"+activeIndex)
this.activeIndex = activeIndex this.emojiWidth =
this.groupIndex = index windowWidth * (this.items[this.groupIndex].emojiList.length + 2);
this.activeEmojiTab = index this.emojiMarginLeft = -windowWidth * this.activeIndex;
// this.transition="none"
this.beforeList =
this.items[this.groupIndex - 1].emojiList[
this.items[this.groupIndex - 1].emojiList.length - 1
];
this.nextList = this.items[this.groupIndex + 1].emojiList[0];
this.pointItemList = this.items[this.groupIndex].emojiList.length;
},
addEmojiPackage: function () {
this.toast("添加表情包");
},
settingEmoji: function () {
this.toast("设置表情");
},
scroll: function (e) {
// console.log(e)
this.old.scrollTop = e.detail.scrollTop;
},
goTop: function (e) {
this.scrollTop = this.old.scrollTop;
this.$nextTick(function () {
this.scrollTop = 0;
});
uni.showToast({
icon: "none",
title: "纵向滚动 scrollTop 值已被修改为 0",
});
},
//
gtouchstart: function (e) {
this.beginX = e.touches[0].clientX;
// this.toast(': ' + this.beginX + '')
},
//
gtouchmove: function (e) {
this.nowX = e.changedTouches[0].clientX;
// console.log(e)
// this.toast(': ' + this.nowX + '')
this.slice();
},
//
gtouchend: function (e) {
this.endX = e.changedTouches[0].clientX;
// this.toast(': ' + this.endX + '')
this.judgeMove();
},
this.emojiWidth = windowWidth * (this.items[this.groupIndex].emojiList.length + 2) /**
this.emojiMarginLeft = -windowWidth * this.activeIndex * 计算偏移量
// this.transition="none" */
this.beforeList = this.items[this.groupIndex - 1].emojiList[this.items[this.groupIndex - 1].emojiList.length - 1] judgeMove: function () {
this.nextList = this.items[this.groupIndex + 1].emojiList[0] var deltaX = this.endX - this.beginX;
this.pointItemList = this.items[this.groupIndex].emojiList.length if (deltaX >= (windowWidth * 3) / 5) {
//
// this.toast('')
// [1] 1
this.activeIndex--;
// [2], 0, 1
if (this.activeIndex <= 0) {
// [3] activeIndex 0 , 1
this.groupIndex--;
var transition = "";
// [4]groupIndex 0, 1, activeIndex 1
if (this.groupIndex <= 0) {
this.groupIndex = 1;
this.pointItemList = this.items[1].emojiList.length;
this.activeIndex = 1;
// transition='margin-left .2s ease-out'
} else {
this.pointItemList = this.items[this.groupIndex].emojiList.length;
this.activeIndex = this.items[this.groupIndex].emojiList.length;
// transition='none'
this.selectTab(this.activeIndex, this.groupIndex);
}
}, this.beforeList =
addEmojiPackage: function() { this.items[this.groupIndex - 1].emojiList[
this.toast("添加表情包") this.items[this.groupIndex - 1].emojiList.length - 1
}, ];
settingEmoji: function() { this.nextList = this.items[this.groupIndex + 1].emojiList[0];
this.toast("设置表情")
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.detail.scrollTop
},
goTop: function(e) {
this.scrollTop = this.old.scrollTop
this.$nextTick(function() {
this.scrollTop = 0
});
uni.showToast({
icon: "none",
title: "纵向滚动 scrollTop 值已被修改为 0"
})
},
//
gtouchstart: function(e) {
this.beginX = e.touches[0].clientX
// this.toast(': ' + this.beginX + '')
},
//
gtouchmove: function(e) {
this.nowX = e.changedTouches[0].clientX
// console.log(e)
// this.toast(': ' + this.nowX + '')
this.slice()
},
//
gtouchend: function(e) {
this.endX = e.changedTouches[0].clientX
// this.toast(': ' + this.endX + '')
this.judgeMove()
},
/** this.emojiWidth =
* 计算偏移量 windowWidth * (this.items[this.groupIndex].emojiList.length + 2);
*/ this.emojiMarginLeft = -windowWidth * this.activeIndex;
judgeMove: function() { // this.transition=transition
var deltaX = this.endX - this.beginX } else {
if (deltaX >= windowWidth * 3 / 5) { // this.emojiWidth =
// this.toast('') windowWidth * (this.items[this.groupIndex].emojiList.length + 2);
// [1] 1 this.emojiMarginLeft = -windowWidth * this.activeIndex;
this.activeIndex-- // this.transition='none'
// [2], 0, 1 }
if (this.activeIndex <= 0) { } else if (deltaX <= (-windowWidth * 3) / 5) {
// [3] activeIndex 0 , 1 //
this.groupIndex-- // this.toast('')
var transition = '' // [1] 1
// [4]groupIndex 0, 1, activeIndex 1 ++this.activeIndex;
if (this.groupIndex <= 0) { // [2], items.length -2, items.length -2
this.groupIndex = 1 if (this.activeIndex > this.items[this.groupIndex].emojiList.length) {
this.pointItemList = this.items[1].emojiList.length //
this.activeIndex = 1 ++this.groupIndex;
// transition='margin-left .2s ease-out' var transition = "";
} else { // this.toast(":"+vm.groupIndex +",:" + vm.groupSize)
this.pointItemList = this.items[this.groupIndex].emojiList.length //
this.activeIndex = this.items[this.groupIndex].emojiList.length if (this.groupIndex > this.groupSize - 2) {
// transition='none' // 1 , vm.groupSize ,
this.selectTab(this.activeIndex, this.groupIndex) this.groupIndex = this.groupSize - 2;
} this.pointItemList = this.items[this.groupIndex].emojiList.length;
this.activeIndex = this.items[this.groupIndex].emojiList.length;
// transition='margin-left .2s ease-out'
} else {
this.pointItemList = this.items[this.groupIndex].emojiList.length;
this.activeIndex = 1;
// transition='none'
this.selectTab(1, this.groupIndex);
}
this.beforeList = this.items[this.groupIndex - 1].emojiList[this.items[this.groupIndex - 1].emojiList.length - 1] this.beforeList =
this.nextList = this.items[this.groupIndex + 1].emojiList[0] this.items[this.groupIndex - 1].emojiList[
this.items[this.groupIndex - 1].emojiList.length - 1
];
this.nextList = this.items[this.groupIndex + 1].emojiList[0];
this.emojiWidth =
windowWidth * (this.items[this.groupIndex].emojiList.length + 2);
this.emojiMarginLeft = -windowWidth * this.activeIndex;
// this.transition=transition
} else {
this.emojiWidth =
windowWidth * (this.items[this.groupIndex].emojiList.length + 2);
this.emojiMarginLeft = -windowWidth * this.activeIndex;
// this.transition='none'
}
} else {
// this.toast('')
this.reset();
}
},
this.emojiWidth = windowWidth * (this.items[this.groupIndex].emojiList.length + 2) /**
this.emojiMarginLeft = -windowWidth * this.activeIndex * 计算起始位置
// this.transition=transition */
slice: function () {
var deltaX = this.nowX - this.beginX;
this.emojiWidth =
windowWidth * (this.items[this.groupIndex].emojiList.length + 2);
this.emojiMarginLeft = -windowWidth * this.activeIndex + deltaX;
// this.transition='none'
},
/**
* 重置
*/
reset: function () {
this.emojiWidth =
windowWidth * (this.items[this.groupIndex].emojiList.length + 2);
this.emojiMarginLeft = -windowWidth * this.activeIndex;
// this.transition='all .2s ease-out'
},
} else { imgClick: function (e, emojiList, emojiItem, groupIndex) {
// this.toast(': ' + emojiItem.alt + ':' + emojiItem.url)
// let emotion = '<img src="' + emojiPath + emojiItem.url + '"/>'
this.$emit("addEmoji", {
emojiPath: emojiList.emojiPath,
minEmoji: emojiList.minEmoji,
emojiItem: emojiItem,
groupIndex: groupIndex,
});
},
// toast
toast: function (str) {
let me = this;
if (str.length > 0) {
me.toastText = str;
me.toastShow = true;
setTimeout(function () {
me.toastShow = false;
me.toastText = "";
}, 1500);
}
},
// clickHandler(i) {
this.emojiWidth = windowWidth * (this.items[this.groupIndex].emojiList.length + 2) // let emotion = `#${i};`
this.emojiMarginLeft = -windowWidth * this.activeIndex // this.$emit('emotion', emotion)
// this.transition='none' // },
// emotion(res) {
} // //let word = res.replace(/\#|\;/gi,'')
} else if (deltaX <= -windowWidth * 3 / 5) { // // const list = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '饿', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '西', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '便便', '', '', '', '', '', '', '', '', '', '', '', '', '', 'NO', 'OK', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']
// this.toast('') // let index = list.indexOf(res)
// [1] 1 // return `<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/${index}.gif" align="middle">`
++this.activeIndex // }
// [2], items.length -2, items.length -2 },
if (this.activeIndex > this.items[this.groupIndex].emojiList.length) { };
//
++this.groupIndex
var transition = ''
// this.toast(":"+vm.groupIndex +",:" + vm.groupSize)
//
if (this.groupIndex > this.groupSize - 2) {
// 1 , vm.groupSize ,
this.groupIndex = this.groupSize - 2
this.pointItemList = this.items[this.groupIndex].emojiList.length
this.activeIndex = this.items[this.groupIndex].emojiList.length
// transition='margin-left .2s ease-out'
} else {
this.pointItemList = this.items[this.groupIndex].emojiList.length
this.activeIndex = 1
// transition='none'
this.selectTab(1, this.groupIndex)
}
this.beforeList = this.items[this.groupIndex - 1].emojiList[this.items[this.groupIndex - 1].emojiList.length - 1]
this.nextList = this.items[this.groupIndex + 1].emojiList[0]
this.emojiWidth = windowWidth * (this.items[this.groupIndex].emojiList.length + 2)
this.emojiMarginLeft = -windowWidth * this.activeIndex
// this.transition=transition
} else {
this.emojiWidth = windowWidth * (this.items[this.groupIndex].emojiList.length + 2)
this.emojiMarginLeft = -windowWidth * this.activeIndex
// this.transition='none'
}
} else {
// this.toast('')
this.reset()
}
},
/**
* 计算起始位置
*/
slice: function() {
var deltaX = this.nowX - this.beginX
this.emojiWidth = windowWidth * (this.items[this.groupIndex].emojiList.length + 2)
this.emojiMarginLeft = -windowWidth * this.activeIndex + deltaX
// this.transition='none'
},
/**
* 重置
*/
reset: function() {
this.emojiWidth = windowWidth * (this.items[this.groupIndex].emojiList.length + 2)
this.emojiMarginLeft = -windowWidth * this.activeIndex
// this.transition='all .2s ease-out'
},
imgClick: function(e, emojiList, emojiItem, groupIndex) {
// this.toast(': ' + emojiItem.alt + ':' + emojiItem.url)
// let emotion = '<img src="' + emojiPath + emojiItem.url + '"/>'
this.$emit('addEmoji', {
emojiPath: emojiList.emojiPath,
minEmoji: emojiList.minEmoji,
emojiItem: emojiItem,
groupIndex: groupIndex
})
},
// toast
toast: function(str) {
let me = this
if (str.length > 0) {
me.toastText = str
me.toastShow = true
setTimeout(function() {
me.toastShow = false
me.toastText = ""
}, 1500)
}
}
// clickHandler(i) {
// let emotion = `#${i};`
// this.$emit('emotion', emotion)
// },
// emotion(res) {
// //let word = res.replace(/\#|\;/gi,'')
// const list = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '饿', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '西', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '便便', '', '', '', '', '', '', '', '', '', '', '', '', '', 'NO', 'OK', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']
// let index = list.indexOf(res)
// return `<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/${index}.gif" align="middle">`
// }
}
}
</script> </script>
<style scoped> <style scoped>
@import url("@/static/css/vue-emoji.css"); @import url("@/static/css/vue-emoji.css");
.scroll-view_H { .scroll-view_H {
/* border:2px solid red; */ /* border:2px solid red; */
white-space: nowrap; white-space: nowrap;
width: 76%; width: 76%;
margin-top: -128rpx; margin-top: -128rpx;
margin-left: 96rpx; margin-left: 96rpx;
} }
.scroll-view-item_H { .scroll-view-item_H {
display: inline-block; display: inline-block;
width: 20%; width: 20%;
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
text-align: center; text-align: center;
font-size: 16rpx; font-size: 16rpx;
} }
.activeEmojiTab { .activeEmojiTab {
background-color: gray; background-color: gray;
opacity: 0.8; opacity: 0.8;
border-radius: 20rpx; border-radius: 20rpx;
} }
</style> </style>

View File

@ -51,7 +51,7 @@ var emojiData = {
{ url: '18.gif', alt: '[抓狂]' }, { url: '18.gif', alt: '[抓狂]' },
{ url: '19.gif', alt: '[吐]' }, { url: '19.gif', alt: '[吐]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
@ -76,7 +76,7 @@ var emojiData = {
{ url: '38.gif', alt: '[敲打]' }, { url: '38.gif', alt: '[敲打]' },
{ url: '39.gif', alt: '[再见]' }, { url: '39.gif', alt: '[再见]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '40.gif', alt: '[擦汗]' }, { url: '40.gif', alt: '[擦汗]' },
@ -100,7 +100,7 @@ var emojiData = {
{ url: '58.gif', alt: '[篮球]' }, { url: '58.gif', alt: '[篮球]' },
{ url: '59.gif', alt: '[乒乓]' }, { url: '59.gif', alt: '[乒乓]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '60.gif', alt: '[咖啡]' }, { url: '60.gif', alt: '[咖啡]' },
@ -124,7 +124,7 @@ var emojiData = {
{ url: '78.gif', alt: '[拥抱]' }, { url: '78.gif', alt: '[拥抱]' },
{ url: '79.gif', alt: '[强]' }, { url: '79.gif', alt: '[强]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '80.gif', alt: '[弱]' }, { url: '80.gif', alt: '[弱]' },
@ -148,7 +148,7 @@ var emojiData = {
{ url: '98.gif', alt: '[跳绳]' }, { url: '98.gif', alt: '[跳绳]' },
{ url: '99.gif', alt: '[投降]' }, { url: '99.gif', alt: '[投降]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '100.gif', alt: '[激动]' }, { url: '100.gif', alt: '[激动]' },
@ -157,7 +157,7 @@ var emojiData = {
{ url: '103.gif', alt: '[左太极]' }, { url: '103.gif', alt: '[左太极]' },
{ url: '104.gif', alt: '[右太极]' }, { url: '104.gif', alt: '[右太极]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
] ]
] ]
}, },
@ -166,7 +166,7 @@ var emojiData = {
emojiName:"huoxinList", emojiName:"huoxinList",
emojiSort:2, emojiSort:2,
minEmoji:true, minEmoji:true,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/huoxin/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/huoxin/",
emojiList: [ emojiList: [
[ [
{ url: 'q_000.png', alt: '[测试1]' }, { url: 'q_000.png', alt: '[测试1]' },
@ -190,7 +190,7 @@ var emojiData = {
{ url: 'q_018.png', alt: '[]' }, { url: 'q_018.png', alt: '[]' },
{ url: 'q_019.png', alt: '[]' }, { url: 'q_019.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_020.png', alt: '[]' }, { url: 'q_020.png', alt: '[]' },
@ -214,7 +214,7 @@ var emojiData = {
{ url: 'q_038.png', alt: '[]' }, { url: 'q_038.png', alt: '[]' },
{ url: 'q_039.png', alt: '[]' }, { url: 'q_039.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_040.png', alt: '[]' }, { url: 'q_040.png', alt: '[]' },
@ -238,7 +238,7 @@ var emojiData = {
{ url: 'q_058.png', alt: '[]' }, { url: 'q_058.png', alt: '[]' },
{ url: 'q_059.png', alt: '[]' }, { url: 'q_059.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_060.png', alt: '[]' }, { url: 'q_060.png', alt: '[]' },
@ -262,7 +262,7 @@ var emojiData = {
{ url: 'q_078.png', alt: '[]' }, { url: 'q_078.png', alt: '[]' },
{ url: 'q_079.png', alt: '[]' }, { url: 'q_079.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_080.png', alt: '[]' }, { url: 'q_080.png', alt: '[]' },
@ -285,7 +285,7 @@ var emojiData = {
{ url: 'q_097.png', alt: '[]' }, { url: 'q_097.png', alt: '[]' },
{ url: 'q_098.png', alt: '[]' }, { url: 'q_098.png', alt: '[]' },
{ url: 'q_099.png', alt: '[]' }, { url: 'q_099.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_101.png', alt: '[]' }, { url: 'q_101.png', alt: '[]' },
@ -308,7 +308,7 @@ var emojiData = {
{ url: 'q_118.png', alt: '[]' }, { url: 'q_118.png', alt: '[]' },
{ url: 'q_119.png', alt: '[]' }, { url: 'q_119.png', alt: '[]' },
{ url: 'q_120.png', alt: '[]' }, { url: 'q_120.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_121.png', alt: '[]' }, { url: 'q_121.png', alt: '[]' },
@ -331,7 +331,7 @@ var emojiData = {
{ url: 'q_138.png', alt: '[]' }, { url: 'q_138.png', alt: '[]' },
{ url: 'q_139.png', alt: '[]' }, { url: 'q_139.png', alt: '[]' },
{ url: 'q_140.png', alt: '[]' }, { url: 'q_140.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_141.png', alt: '[]' }, { url: 'q_141.png', alt: '[]' },
@ -354,7 +354,7 @@ var emojiData = {
{ url: 'q_158.png', alt: '[]' }, { url: 'q_158.png', alt: '[]' },
{ url: 'q_159.png', alt: '[]' }, { url: 'q_159.png', alt: '[]' },
{ url: 'q_160.png', alt: '[]' }, { url: 'q_160.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_161.png', alt: '[]' }, { url: 'q_161.png', alt: '[]' },
@ -367,7 +367,7 @@ var emojiData = {
{ url: 'q_168.png', alt: '[]' }, { url: 'q_168.png', alt: '[]' },
{ url: 'q_169.png', alt: '[]' }, { url: 'q_169.png', alt: '[]' },
{ url: 'q_170.png', alt: '[]' }, { url: 'q_170.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
] ]
] ]
}, },
@ -376,7 +376,7 @@ var emojiData = {
emojiName:"dingdingList", emojiName:"dingdingList",
emojiSort:2, emojiSort:2,
minEmoji:true, minEmoji:true,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/dingding/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/dingding/",
emojiList: [ emojiList: [
[ [
{ url: 'emotion_001.png', alt: '[微笑]' }, { url: 'emotion_001.png', alt: '[微笑]' },
@ -399,7 +399,7 @@ var emojiData = {
{ url: 'emotion_018.png', alt: '[抱拳]' }, { url: 'emotion_018.png', alt: '[抱拳]' },
{ url: 'emotion_019.png', alt: '[握手]' }, { url: 'emotion_019.png', alt: '[握手]' },
{ url: 'emotion_020.png', alt: '[OK]' }, { url: 'emotion_020.png', alt: '[OK]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'emotion_021.png', alt: '[]' }, { url: 'emotion_021.png', alt: '[]' },
@ -422,7 +422,7 @@ var emojiData = {
{ url: 'emotion_038.png', alt: '[]' }, { url: 'emotion_038.png', alt: '[]' },
{ url: 'emotion_039.png', alt: '[]' }, { url: 'emotion_039.png', alt: '[]' },
{ url: 'emotion_040.png', alt: '[]' }, { url: 'emotion_040.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'emotion_041.png', alt: '[]' }, { url: 'emotion_041.png', alt: '[]' },
@ -445,7 +445,7 @@ var emojiData = {
{ url: 'emotion_058.png', alt: '[]' }, { url: 'emotion_058.png', alt: '[]' },
{ url: 'emotion_059.png', alt: '[]' }, { url: 'emotion_059.png', alt: '[]' },
{ url: 'emotion_060.png', alt: '[]' }, { url: 'emotion_060.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'emotion_061.png', alt: '[]' }, { url: 'emotion_061.png', alt: '[]' },
@ -468,7 +468,7 @@ var emojiData = {
{ url: 'emotion_078.png', alt: '[]' }, { url: 'emotion_078.png', alt: '[]' },
{ url: 'emotion_079.png', alt: '[]' }, { url: 'emotion_079.png', alt: '[]' },
{ url: 'emotion_080.png', alt: '[]' }, { url: 'emotion_080.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'emotion_081.png', alt: '[]' }, { url: 'emotion_081.png', alt: '[]' },
@ -491,7 +491,7 @@ var emojiData = {
{ url: 'emotion_098.png', alt: '[]' }, { url: 'emotion_098.png', alt: '[]' },
{ url: 'emotion_099.png', alt: '[]' }, { url: 'emotion_099.png', alt: '[]' },
{ url: 'emotion_100.png', alt: '[]' }, { url: 'emotion_100.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'emotion_101.png', alt: '[]' }, { url: 'emotion_101.png', alt: '[]' },
@ -514,7 +514,7 @@ var emojiData = {
{ url: 'emotion_118.png', alt: '[]' }, { url: 'emotion_118.png', alt: '[]' },
{ url: 'emotion_119.png', alt: '[]' }, { url: 'emotion_119.png', alt: '[]' },
{ url: 'emotion_120.png', alt: '[]' }, { url: 'emotion_120.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'emotion_121.png', alt: '[]' }, { url: 'emotion_121.png', alt: '[]' },
@ -537,7 +537,7 @@ var emojiData = {
{ url: 'emotion_138.png', alt: '[]' }, { url: 'emotion_138.png', alt: '[]' },
{ url: 'emotion_139.png', alt: '[]' }, { url: 'emotion_139.png', alt: '[]' },
{ url: 'emotion_140.png', alt: '[]' }, { url: 'emotion_140.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
] ]
] ]
}, },
@ -546,7 +546,7 @@ var emojiData = {
emojiName:"douyinList", emojiName:"douyinList",
emojiSort:3, emojiSort:3,
minEmoji:true, minEmoji:true,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/douyin/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/douyin/",
emojiList: [ emojiList: [
[ [
{ url: '0.png', alt: '[抖音1]' }, { url: '0.png', alt: '[抖音1]' },
@ -570,7 +570,7 @@ var emojiData = {
{ url: '18.png', alt: '[]' }, { url: '18.png', alt: '[]' },
{ url: '19.png', alt: '[]' }, { url: '19.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '20.png', alt: '[]' }, { url: '20.png', alt: '[]' },
@ -594,7 +594,7 @@ var emojiData = {
{ url: '38.png', alt: '[]' }, { url: '38.png', alt: '[]' },
{ url: '39.png', alt: '[]' }, { url: '39.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '40.png', alt: '[]' }, { url: '40.png', alt: '[]' },
@ -618,7 +618,7 @@ var emojiData = {
{ url: '58.png', alt: '[]' }, { url: '58.png', alt: '[]' },
{ url: '59.png', alt: '[]' }, { url: '59.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '60.png', alt: '[]' }, { url: '60.png', alt: '[]' },
@ -641,7 +641,7 @@ var emojiData = {
{ url: '77.png', alt: '[]' }, { url: '77.png', alt: '[]' },
{ url: '78.png', alt: '[]' }, { url: '78.png', alt: '[]' },
{ url: '79.png', alt: '[]' }, { url: '79.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '80.png', alt: '[]' }, { url: '80.png', alt: '[]' },
@ -665,7 +665,7 @@ var emojiData = {
{ url: '98.png', alt: '[]' }, { url: '98.png', alt: '[]' },
{ url: '99.png', alt: '[]' }, { url: '99.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '100.png', alt: '[]' }, { url: '100.png', alt: '[]' },
@ -689,7 +689,7 @@ var emojiData = {
{ url: '118.png', alt: '[]' }, { url: '118.png', alt: '[]' },
{ url: '119.png', alt: '[]' }, { url: '119.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '120.png', alt: '[]' }, { url: '120.png', alt: '[]' },
@ -713,12 +713,12 @@ var emojiData = {
{ url: '138.png', alt: '[]' }, { url: '138.png', alt: '[]' },
{ url: '139.png', alt: '[]' }, { url: '139.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '140.png', alt: '[]' }, { url: '140.png', alt: '[]' },
{ url: '141.png', alt: '[]' }, { url: '141.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
] ]
] ]
}, },
@ -726,7 +726,7 @@ var emojiData = {
emojiName:"ajmdList", emojiName:"ajmdList",
emojiSort:4, emojiSort:4,
minEmoji:false, minEmoji:false,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/ajmd/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/ajmd/",
emojiList: [ emojiList: [
[ [
{ url: '0.png', alt: '[ajmd1]' }, { url: '0.png', alt: '[ajmd1]' },
@ -794,7 +794,7 @@ var emojiData = {
emojiName:"gongfuhuList", emojiName:"gongfuhuList",
emojiSort:5, emojiSort:5,
minEmoji:false, minEmoji:false,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/gongfuhu/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/gongfuhu/",
emojiList: [ emojiList: [
[ [
{ url: '0.gif', alt: '[]' }, { url: '0.gif', alt: '[]' },
@ -841,7 +841,7 @@ var emojiData = {
emojiName:"xxyList", emojiName:"xxyList",
emojiSort:6, emojiSort:6,
minEmoji: false, minEmoji: false,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/xxy/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/xxy/",
emojiList: [ emojiList: [
[ [
{ url: '0.png', alt: '[]' }, { url: '0.png', alt: '[]' },
@ -899,7 +899,7 @@ var emojiData = {
emojiName:"feineneList", emojiName:"feineneList",
emojiSort:7, emojiSort:7,
minEmoji: false, minEmoji: false,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/feinene/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/feinene/",
emojiList: [ emojiList: [
[ [
{ url: '0.gif', alt: '[]' }, { url: '0.gif', alt: '[]' },

View File

@ -38,7 +38,7 @@
</view> </view>
<view class="u-top-default"> <view class="u-top-default">
<navigator url='/pages/index/index' open-type="switchTab" class="u-back2"> <navigator url='/pages/index/index' open-type="switchTab" class="u-back2">
<image src='https://static.lancerdt.com/xcxfile/appicon/img/gohome.png'></image> <image src='https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/img/gohome.png'></image>
</navigator> </navigator>
</view> </view>
@ -46,253 +46,438 @@
</template> </template>
<script> <script>
import { import { mapState, mapMutations } from "vuex";
mapState,
mapMutations
} from 'vuex'
export default { export default {
data: function() { data: function () {
return { return {
money: "", money: "",
nodiscount: "", nodiscount: "",
discount: "", discount: "",
isshow: false, isshow: false,
deliveryNum: "", deliveryNum: "",
isshow1: false, isshow1: false,
shop_discount: 10, shop_discount: 10,
totalMoney: "", totalMoney: "",
payment: 0, payment: 0,
info: [], info: [],
orderNum: "", orderNum: "",
formId: "", formId: "",
time: "", time: "",
Description: "", Description: "",
MoneyLimit: "", MoneyLimit: "",
CouponEnabeld: "", CouponEnabeld: "",
discountvalue: "", discountvalue: "",
nodiscountvalue: "", nodiscountvalue: "",
DiscountMoney: "0.00", DiscountMoney: "0.00",
couponItemId: 0, couponItemId: 0,
IsUseCoupon: 1, IsUseCoupon: 1,
MaxUsableCash: 0, MaxUsableCash: 0,
MaxUsableECardCash: 0, MaxUsableECardCash: 0,
MaxUsableExtraCash: 0, MaxUsableExtraCash: 0,
balance: 0, balance: 0,
realMoney: 0, realMoney: 0,
isBalance: true, isBalance: true,
eCardCash: 0, eCardCash: 0,
extraCash: 0, extraCash: 0,
realPayMoney: 0, realPayMoney: 0,
isECashCard: true, isECashCard: true,
isCoupon: true, isCoupon: true,
isSubmit: true, isSubmit: true,
Currency: __('¥'), Currency: __("¥"),
store_id: 0, store_id: 0,
title: "", title: "",
exchange_type: 1 //1:money-> 2:->money exchange_type: 1, //1:money-> 2:->money
} };
}, },
computed: mapState(['Config', 'StateCode', 'notice', 'plantformInfo', 'shopInfo', 'userInfo', 'hasLogin']), computed: mapState([
onLoad(options) { "Config",
uni.setNavigationBarTitle({ "StateCode",
title:this.__('积分兑换') "notice",
}); "plantformInfo",
"shopInfo",
"userInfo",
"hasLogin",
]),
onLoad(options) {
uni.setNavigationBarTitle({
title: this.__("积分兑换"),
});
var that = this; var that = this;
that.setData({ that.setData({
exchange_type: options.type ? options.type : 1 exchange_type: options.type ? options.type : 1,
}); });
if (that.exchange_type == 1) if (that.exchange_type == 1) {
{ that.title = "余额兑换积分";
that.title = '余额兑换积分'; } else {
} that.title = "积分转余额";
else }
{
that.title = '积分转余额';
}
that.$.setNavigationBarTitle({ that.$.setNavigationBarTitle({
title: that.title title: that.title,
}); });
that.getPlantformInfo(function(plantform) { that.getPlantformInfo(function (plantform) {
that.forceUserInfo(function (user) { that.forceUserInfo(function (user) {
that.setData({ that.setData({
Currency: ' ', Currency: " ",
store_id: 1001 store_id: 1001,
}); });
that.load(options); that.load(options);
}); });
}) });
}, },
onUnload(){ onUnload() {
// //
var that = this var that = this;
this.notice.removeNotification("RefreshCoupon1", that); this.notice.removeNotification("RefreshCoupon1", that);
}, },
methods: { methods: {
...mapMutations([
"login",
"logout",
"getPlantformInfo",
"forceUserInfo",
"getUserInfo",
"reloadUserResource",
]),
...mapMutations(['login', 'logout', 'getPlantformInfo', 'forceUserInfo', 'getUserInfo', 'reloadUserResource']), load: function (options) {
var store_id = 1001;
load: function(options) { var a = {
var store_id = 1001; store_id: store_id,
};
//console.log("val+++++", a);
var that = this;
},
clearnum: function (a) {
//console.info(111)
this.setData({
deliveryNum: "",
realPayMoney: "",
});
},
inputnum: function (e) {
let that = this;
var a = { let num = e.detail.value;
store_id: store_id
};
//console.log("val+++++", a);
var that = this;
}, //
clearnum: function(a) { if (that.exchange_type == 1) {
//console.info(111) let need_money = num * that.Config.POINTS_VAUE_RATE;
this.setData({
deliveryNum: "",
realPayMoney: ""
})
},
inputnum: function(e) {
let that = this;
let num = e.detail.value; if (need_money > that.userInfo.user_money) {
num = Math.ceil(
that.userInfo.user_money / that.Config.POINTS_VAUE_RATE
);
// that.$.alert(that.$.sprintf("最多兑换 %d 积分", num));
if (that.exchange_type == 1)
{
let need_money = num * that.Config.POINTS_VAUE_RATE;
if (need_money > that.userInfo.user_money) this.setData({
{ deliveryNum: num,
num = Math.ceil(that.userInfo.user_money / that.Config.POINTS_VAUE_RATE); });
} else {
that.$.alert(that.$.sprintf('最多兑换 %d 积分', num));
this.setData({
deliveryNum: num
});
}
else
{
}
this.setData({
realPayMoney: num * that.Config.POINTS_VAUE_RATE
});
}
else
{
//
if (num > that.userInfo.user_points)
{
num = that.userInfo.user_points;
that.$.alert(that.$.sprintf('积分最多可用 %d', that.userInfo.user_points));
this.setData({
deliveryNum: that.userInfo.user_points
});
}
else
{
}
this.setData({
realPayMoney: num * that.Config.POINTS_VAUE_RATE
});
}
},
blur: function(a) {
let that = this;
/^\d{1,10}(\.\d{1,2})?$/.test(a.detail.value) || that.$.showModal({
title: "提示",
content: "请输入正确金额"
})
},
paysubmit: function(a) {
var that = this;
if (that.$.isNull(this.deliveryNum) || 0 == this.deliveryNum) return that.$.showModal({
title: "提示",
content: "请输入积分总数"
});
if (!/^\d{1,10}(\.\d{1,2})?$/.test(that.deliveryNum)) return that.$.showModal({
title: "提示",
content: "请输入正确金额"
});
let url = that.Config.URL.user.money2points;
let tips = that.$.sprintf('确认{¥%.2f兑换%i积分?', that.realPayMoney, that.deliveryNum);
//
if (that.exchange_type == 1)
{
}
else
{
url = that.Config.URL.user.points2money;
tips = that.$.sprintf('确认%i积分转为余额¥%.2f?', that.deliveryNum, that.realPayMoney);
}
//
that.$.confirm(
tips,
function(n) {
if (n.confirm) {
//
that.$.request({
type: 'post',
url: url,
data: {points_num: that.deliveryNum},
dataType: 'json',
success: function(data, status, msg, code) {
if (200 == status)
{
that.$.alert(that.__('转赠成功!'));
setTimeout(function() {
that.reloadUserResource(function (user_info) {
that.$.gopage(
'/integral/integral/record'
);
});
}, 2e3);
}
else
{
that.$.alert(msg);
}
}
});
}
},
true
);
},
gotopay: function() {
},
switchChange: function(a) {
a.detail.value ? this.setData({
realPayMoney: this.realMoney,
isBalance: true
}) : this.setData({
realPayMoney: this.payment,
isBalance: false
})
}
} }
} this.setData({
realPayMoney: num * that.Config.POINTS_VAUE_RATE,
});
} else {
//
if (num > that.userInfo.user_points) {
num = that.userInfo.user_points;
that.$.alert(
that.$.sprintf("积分最多可用 %d", that.userInfo.user_points)
);
this.setData({
deliveryNum: that.userInfo.user_points,
});
} else {
}
this.setData({
realPayMoney: num * that.Config.POINTS_VAUE_RATE,
});
}
},
blur: function (a) {
let that = this;
/^\d{1,10}(\.\d{1,2})?$/.test(a.detail.value) ||
that.$.showModal({
title: "提示",
content: "请输入正确金额",
});
},
paysubmit: function (a) {
var that = this;
if (that.$.isNull(this.deliveryNum) || 0 == this.deliveryNum)
return that.$.showModal({
title: "提示",
content: "请输入积分总数",
});
if (!/^\d{1,10}(\.\d{1,2})?$/.test(that.deliveryNum))
return that.$.showModal({
title: "提示",
content: "请输入正确金额",
});
let url = that.Config.URL.user.money2points;
let tips = that.$.sprintf(
"确认{¥%.2f兑换%i积分?",
that.realPayMoney,
that.deliveryNum
);
//
if (that.exchange_type == 1) {
} else {
url = that.Config.URL.user.points2money;
tips = that.$.sprintf(
"确认%i积分转为余额¥%.2f?",
that.deliveryNum,
that.realPayMoney
);
}
//
that.$.confirm(
tips,
function (n) {
if (n.confirm) {
//
that.$.request({
type: "post",
url: url,
data: { points_num: that.deliveryNum },
dataType: "json",
success: function (data, status, msg, code) {
if (200 == status) {
that.$.alert(that.__("转赠成功!"));
setTimeout(function () {
that.reloadUserResource(function (user_info) {
that.$.gopage("/integral/integral/record");
});
}, 2e3);
} else {
that.$.alert(msg);
}
},
});
}
},
true
);
},
gotopay: function () {},
switchChange: function (a) {
a.detail.value
? this.setData({
realPayMoney: this.realMoney,
isBalance: true,
})
: this.setData({
realPayMoney: this.payment,
isBalance: false,
});
},
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
@import "../../styles/_variables";
@import "../../styles/_variables"; .totalMoney {
.totalMoney { width: 90%; display: flex; margin: 24rpx auto 0; justify-content: space-betwee; height: 92rpx; border-radius: 8rpx; } .totalMoney label { width: 54%; height: 92rpx; line-height: 92rpx; font-size: 26rpx; color: #000; } .totalMoney input { height: 92rpx; line-height: 92rpx; font-size: 26rpx; text-align: right; margin-right: 20rpx; } .nodiscount { width: 90%; margin: 51rpx auto 20rpx auto; } .check { height: 58rpx; line-height: 58rpx; font-size: 26rpx; color: #808080; } .discount { height: 85rpx; line-height: 90rpx; padding: 0 40rpx; background: #fff; font-size: 28rpx; color: #000; margin: 24rpx 0; } .pay { padding: 0 40rpx; background: #fff; } .coupon { display: flex; justify-content: space-between; height: 98rpx; line-height: 98rpx; font-size: 26rpx; color: #000; border-bottom: 1rpx solid #f1f1f1; } .payments { display: flex; justify-content: space-between; height: 98rpx; line-height: 98rpx; font-size: 28rpx; color: #000; } .payment { width: 90%; height: 80rpx; line-height: 82rpx; background: #db384c; color: #fff; margin-top: 50rpx; } .explain { width: 90%; margin: 50rpx auto; } .title { font-size: 28rpx; color: #000; } .content { font-size: 24rpx; color: #717171; margin-top: 10rpx; } .m-cell-ft::after { content: " "; display: inline-block; height: 12rpx; width: 12rpx; border-width: 4rpx 4rpx 0 0; border-color: #999; border-style: solid; -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); position: relative; margin-top: -8rpx; top: -4rpx; right: -4rpx; } .u-back2 image { border-radius: 100%; width: 77rpx; height: 77rpx; border: 1px solid #eee; font-size: 20rpx; text-align: center; background-color: #fff; box-shadow: 0px 4rpx 8rpx rgba(0, 0, 0, 0.35); z-index: 999; opacity: 0.8; line-height: 77rpx; margin-bottom: 20rpx; } .bj_able { background: #fff; width: 92%; margin: 0 auto; padding-bottom: 40rpx; } .able_text { letter-spacing: 2rpx; width: 80%; height: 92rpx; line-height: 92rpx; font-size: 26rpx; color: #000; } .able_input { width:90%; margin:20rpx auto 0 auto; border-bottom:1rpx solid #f1f1f1; height:110rpx; display:flex; } .able_fuhao { font-family: PingFangSC-Medium; font-size: 60rpx; color: #000; letter-spacing: 0.84rpx; text-align: center; line-height: 94rpx; margin-right: 10rpx; font-weight: bold } /* .input_lab { float: left; width: 75%; height: 100%; } */ .checkbox { font-family: PingFangSC-Regular; font-size: 26rpx; color: #7b7b7b; letter-spacing: 0.5rpx; text-align: center; } .no_lab { width: 90%; display: flex; margin: 24rpx auto 0; justify-content: space-betwee; height: 98rpx; border-radius: 8rpx; line-height: 98rpx; border-bottom: 1rpx solid #f1f1f1; } .pict_fal { width: 38rpx; height: 38rpx; position: absolute; top: 161rpx; right: 9%; } .fal_pic { width: 38rpx; height: 38rpx; } .input_lab{ width: 87%; font-family: UICTFontTextStyleBody; font-size: 74rpx; height: 74rpx; /* line-height:74rpx; *//* padding:8rpx 0; */ min-height: 83rpx; line-height: normal; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; vertical-align: middl; font-weight: bold } width: 90%;
display: flex;
margin: 24rpx auto 0;
justify-content: space-betwee;
height: 92rpx;
border-radius: 8rpx;
}
.totalMoney label {
width: 54%;
height: 92rpx;
line-height: 92rpx;
font-size: 26rpx;
color: #000;
}
.totalMoney input {
height: 92rpx;
line-height: 92rpx;
font-size: 26rpx;
text-align: right;
margin-right: 20rpx;
}
.nodiscount {
width: 90%;
margin: 51rpx auto 20rpx auto;
}
.check {
height: 58rpx;
line-height: 58rpx;
font-size: 26rpx;
color: #808080;
}
.discount {
height: 85rpx;
line-height: 90rpx;
padding: 0 40rpx;
background: #fff;
font-size: 28rpx;
color: #000;
margin: 24rpx 0;
}
.pay {
padding: 0 40rpx;
background: #fff;
}
.coupon {
display: flex;
justify-content: space-between;
height: 98rpx;
line-height: 98rpx;
font-size: 26rpx;
color: #000;
border-bottom: 1rpx solid #f1f1f1;
}
.payments {
display: flex;
justify-content: space-between;
height: 98rpx;
line-height: 98rpx;
font-size: 28rpx;
color: #000;
}
.payment {
width: 90%;
height: 80rpx;
line-height: 82rpx;
background: #db384c;
color: #fff;
margin-top: 50rpx;
}
.explain {
width: 90%;
margin: 50rpx auto;
}
.title {
font-size: 28rpx;
color: #000;
}
.content {
font-size: 24rpx;
color: #717171;
margin-top: 10rpx;
}
.m-cell-ft::after {
content: " ";
display: inline-block;
height: 12rpx;
width: 12rpx;
border-width: 4rpx 4rpx 0 0;
border-color: #999;
border-style: solid;
-webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
position: relative;
margin-top: -8rpx;
top: -4rpx;
right: -4rpx;
}
.u-back2 image {
border-radius: 100%;
width: 77rpx;
height: 77rpx;
border: 1px solid #eee;
font-size: 20rpx;
text-align: center;
background-color: #fff;
box-shadow: 0px 4rpx 8rpx rgba(0, 0, 0, 0.35);
z-index: 999;
opacity: 0.8;
line-height: 77rpx;
margin-bottom: 20rpx;
}
.bj_able {
background: #fff;
width: 92%;
margin: 0 auto;
padding-bottom: 40rpx;
}
.able_text {
letter-spacing: 2rpx;
width: 80%;
height: 92rpx;
line-height: 92rpx;
font-size: 26rpx;
color: #000;
}
.able_input {
width: 90%;
margin: 20rpx auto 0 auto;
border-bottom: 1rpx solid #f1f1f1;
height: 110rpx;
display: flex;
}
.able_fuhao {
font-family: PingFangSC-Medium;
font-size: 60rpx;
color: #000;
letter-spacing: 0.84rpx;
text-align: center;
line-height: 94rpx;
margin-right: 10rpx;
font-weight: bold;
} /* .input_lab { float: left; width: 75%; height: 100%; } */
.checkbox {
font-family: PingFangSC-Regular;
font-size: 26rpx;
color: #7b7b7b;
letter-spacing: 0.5rpx;
text-align: center;
}
.no_lab {
width: 90%;
display: flex;
margin: 24rpx auto 0;
justify-content: space-betwee;
height: 98rpx;
border-radius: 8rpx;
line-height: 98rpx;
border-bottom: 1rpx solid #f1f1f1;
}
.pict_fal {
width: 38rpx;
height: 38rpx;
position: absolute;
top: 161rpx;
right: 9%;
}
.fal_pic {
width: 38rpx;
height: 38rpx;
}
.input_lab {
width: 87%;
font-family: UICTFontTextStyleBody;
font-size: 74rpx;
height: 74rpx; /* line-height:74rpx; */ /* padding:8rpx 0; */
min-height: 83rpx;
line-height: normal;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
vertical-align: middl;
font-weight: bold;
}
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -394,13 +394,14 @@ export default {
// that.notice.postNotificationName("RefreshOrder", options); // that.notice.postNotificationName("RefreshOrder", options);
// }); // });
// } // }
if (item) { if (item) {
var that = this; var that = this;
var options = that.options; var options = that.options;
if (options.issub != "true") return;
options.ud_id = item.ud_id; options.ud_id = item.ud_id;
options.address = item.ud_address; options.address = item.ud_address;
that.$.navigateBack(1, function () { that.$.navigateBack(1, function () {
//console.info('SelectAddress')
that.notice.postNotificationName("RefreshOrder", options); that.notice.postNotificationName("RefreshOrder", options);
}); });
} }

View File

@ -107,7 +107,7 @@
/> />
<view class="con-bd-sex-box" @click="chooseSex(1)"> <view class="con-bd-sex-box" @click="chooseSex(1)">
<image <image
class="choose-sex-icon" :class="['choose-sex-icon', formData.sexType == 1]"
:src="formData.sexType == 1 ? sele2Icon : noseleIcon" :src="formData.sexType == 1 ? sele2Icon : noseleIcon"
mode="" mode=""
></image> ></image>
@ -290,6 +290,9 @@ export default {
cityData: [], cityData: [],
provinceData: [], provinceData: [],
isFound: false, isFound: false,
issub: false,
options: {},
spid: "",
}; };
}, },
computed: { computed: {
@ -312,7 +315,7 @@ export default {
if (city) { if (city) {
this.originalData.result.addressComponent.city = city; this.originalData.result.addressComponent.city = city;
} else { } else {
if (this.ud_id) { if (this.ud_id && this.ud_id != "-1") {
this.getCurrAddress(); this.getCurrAddress();
} else { } else {
this.getLocation(); this.getLocation();
@ -323,6 +326,13 @@ export default {
if (options.ud_id) { if (options.ud_id) {
this.ud_id = options.ud_id; this.ud_id = options.ud_id;
} }
this.setData({
issub: options.issub,
ud_id: options.ud_id || 0,
spid: options.spid || "",
options: options,
});
}, },
methods: { methods: {
getAppDistrict() { getAppDistrict() {
@ -370,14 +380,13 @@ export default {
that.formData.userPhone = data.ud_mobile; that.formData.userPhone = data.ud_mobile;
that.formData.lableName = data.ud_label - 1; that.formData.lableName = data.ud_label - 1;
that.formData.sexType = data.ud_gender; that.formData.sexType = data.ud_gender;
let item = { let item = {
name: data.ud_marker, name: data.ud_marker,
location: { location: {
lat: data.ud_latitude, lat: data.ud_latitude,
lng: data.ud_longitude, lng: data.ud_longitude,
}, },
addr: data.ud_address, addr: data.ud_street_addr,
}; };
that.handerSetAddress(item); that.handerSetAddress(item);
@ -590,19 +599,19 @@ export default {
} }
}, },
//使 //使
setData(obj) { // setData(obj) {
this.oldObj = obj; // this.oldObj = obj;
this.formData.detailAddress = obj.detailAddress; // this.formData.detailAddress = obj.detailAddress;
this.formData.userName = obj.userName; // this.formData.userName = obj.userName;
this.formData.userPhone = obj.userPhone; // this.formData.userPhone = obj.userPhone;
this.formData.lableName = obj.lableName; // this.formData.lableName = obj.lableName;
this.formData.sexType = obj.sexType; // this.formData.sexType = obj.sexType;
this.addressInfo.title = obj.title; // this.addressInfo.title = obj.title;
this.addressInfo.address = obj.address; // this.addressInfo.address = obj.address;
this.addressInfo.latitude = obj.latitude; // this.addressInfo.latitude = obj.latitude;
this.addressInfo.longitude = obj.longitude; // this.addressInfo.longitude = obj.longitude;
this.agreeState = obj.agreeState; // this.agreeState = obj.agreeState;
}, // },
// //
getLocation(type) { getLocation(type) {
let that = this; let that = this;
@ -658,7 +667,7 @@ export default {
const lowerShortStr = shortStr.toLowerCase(); const lowerShortStr = shortStr.toLowerCase();
const lowerLongStr = longStr.toLowerCase(); const lowerLongStr = longStr.toLowerCase();
return lowerLongStr.includes(lowerShortStr); return lowerShortStr.includes(lowerLongStr);
}, },
// //
submitAddress() { submitAddress() {
@ -703,6 +712,7 @@ export default {
} }
let item = this.originalData; let item = this.originalData;
let province = { let province = {
label: "", label: "",
value: 0, value: 0,
@ -720,8 +730,8 @@ export default {
this.provinceData.forEach((group) => { this.provinceData.forEach((group) => {
let isFind = this.fuzzyMatch( let isFind = this.fuzzyMatch(
group.label, item.result.addressComponent.province,
item.result.addressComponent.province group.label
); );
if (isFind) { if (isFind) {
province = group; province = group;
@ -773,17 +783,20 @@ export default {
ud_street_no: this.formData.detailAddress, ud_street_no: this.formData.detailAddress,
ud_latitude: this.latitude, ud_latitude: this.latitude,
ud_longitude: this.longitude, ud_longitude: this.longitude,
ud_label: lableName, ud_label: lableName || "",
ud_province_id: province.value, // ID ud_province_id: province.value, // ID
ud_province: province.label, // ud_province: province.label, //
ud_city_id: city.value, // ud_city_id ID ud_city_id: city.value, // ud_city_id ID
ud_city: city.label, // ud_city: city.label, //
ud_county_id: county.value, // ID ud_county_id: county.value, // ID
ud_county: county.label, // ud_county: county.label, //
ud_address: this.currRoadAddress, ud_address: this.currAddress + this.formData.detailAddress,
ud_is_default: 0, ud_is_default: 1,
}; };
let that = this;
var options = that.options;
this.$.request({ this.$.request({
url: this.Config.URL.user.address_edit, url: this.Config.URL.user.address_edit,
method: "post", method: "post",
@ -795,7 +808,16 @@ export default {
icon: "success", icon: "success",
duration: 2e3, duration: 2e3,
}); });
uni.navigateBack(); if (options.issub) {
that.$.navigateBack(1, function () {
options.ud_id = data.ud_id;
that.notice.postNotificationName("RefreshOrder", options);
});
} else {
that.$.navigateBack(1, function () {
that.notice.postNotificationName("RefreshAddress", 1);
});
}
} }
}, },
}); });
@ -980,7 +1002,6 @@ export default {
}; };
return obj; return obj;
}); });
console.log("that.searchAddress", that.searchAddress); console.log("that.searchAddress", that.searchAddress);
that.searchAddress.forEach((item) => { that.searchAddress.forEach((item) => {
@ -1001,7 +1022,7 @@ export default {
region: this.originalData.result.addressComponent.city, region: this.originalData.result.addressComponent.city,
output: "json", output: "json",
city_limit: true, city_limit: true,
ak: "vMqiMPVK8i30Q5VOCDI3LWxgZqR2tfKa", ak: "qWKt2xbrqXsp2yK35YYXVBNZgrbiCG5v",
ret_coordtype: "gcj02ll", ret_coordtype: "gcj02ll",
}; };

View File

@ -1,187 +1,203 @@
<template> <template>
<view> <view>
<view class="sign_conent_box"> <view class="sign_conent_box">
<view class="sign_conent"> <view class="sign_conent">
<view class="sign_conent_title"> <view class="sign_conent_title">
本月你已连续签到 本月你已连续签到
<span class="sign_conent_title_span">{{ signDays || 0 }}</span> <span class="sign_conent_title_span">{{ signDays || 0 }}</span>
</view> </view>
<view class="sign_list_aligns"> <view class="sign_list_aligns">
<scroll-view class="scroll-view_H" scroll-x="true"> <scroll-view class="scroll-view_H" scroll-x="true">
<view class="scroll_view_items" v-for="(item, index) in signList" :key="index"> <view
<!-- --> class="scroll_view_items"
<view class="scroll_view_itemsv"> v-for="(item, index) in signList"
<view class="scroll_view_item"> :key="index"
<view class="scroll_view_item_img_box"> >
<image src="https://static.lancerdt.com/xcxfile/appicon/images/sign_bg.png" class="scroll_view_item_img" <!-- -->
mode=""></image> <view class="scroll_view_itemsv">
<view class="scroll_view_item_top">{{ item.value_str }}</view> <view class="scroll_view_item">
<!-- <view class="scroll_view_item_bottom">一张</view> --> <view class="scroll_view_item_img_box">
</view> <image
<view class="scroll_view_item_tips">签到{{ item.days }}</view> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/sign_bg.png"
</view> class="scroll_view_item_img"
<view class="scroll_xian" v-show="index !== signList.length - 1"></view> mode=""
</view> ></image>
</view> <view class="scroll_view_item_top">{{
</scroll-view> item.value_str
</view> }}</view>
<view v-if="!isSign" class="sign_conent_btn" @click="cksigin">今日签到</view> <!-- <view class="scroll_view_item_bottom">一张</view> -->
<view v-else class="is_sign_conent_btn">已签到</view> </view>
</view> <view class="scroll_view_item_tips"
</view> >签到{{ item.days }}</view
</view> >
</view>
<view
class="scroll_xian"
v-show="index !== signList.length - 1"
></view>
</view>
</view>
</scroll-view>
</view>
<view v-if="!isSign" class="sign_conent_btn" @click="cksigin"
>今日签到</view
>
<view v-else class="is_sign_conent_btn">已签到</view>
</view>
</view>
</view>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
is_sign: 0, is_sign: 0,
continue_sign_days: 0, continue_sign_days: 0,
sign_list: [], sign_list: [],
}, },
watch: { watch: {
is_sign: function(val, oldVal) { is_sign: function (val, oldVal) {
this.isSign = val this.isSign = val;
}, },
continue_sign_days: function(val) { continue_sign_days: function (val) {
this.signDays = val this.signDays = val;
}, },
sign_list: function(val) { sign_list: function (val) {
this.signList = val; this.signList = val;
} },
}, },
data() { data() {
return { return {
signDays :0, signDays: 0,
isSign :0, isSign: 0,
signList : [], signList: [],
}; };
}, },
methods: { methods: {
cksigin() { cksigin() {
this.$emit('click', ''); this.$emit("click", "");
} },
} },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.sign_conent_box { .sign_conent_box {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
margin-top: 50rpx; margin-top: 50rpx;
.sign_conent { .sign_conent {
width: 686rpx; width: 686rpx;
background: white; background: white;
border-radius: 20rpx; border-radius: 20rpx;
padding: 40rpx 32rpx; padding: 40rpx 32rpx;
box-sizing: border-box; box-sizing: border-box;
.sign_conent_title { .sign_conent_title {
width: 100%; width: 100%;
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
.sign_conent_title_span { .sign_conent_title_span {
color: #ff6526 !important; color: #ff6526 !important;
} }
} }
.sign_list_aligns { .sign_list_aligns {
width: 100%; width: 100%;
padding: 48rpx 0 64rpx 0; padding: 48rpx 0 64rpx 0;
box-sizing: border-box; box-sizing: border-box;
.scroll-view_H { .scroll-view_H {
width: 100%; width: 100%;
display: flex; display: flex;
white-space: nowrap; white-space: nowrap;
.scroll_view_items { .scroll_view_items {
display: inline-block; display: inline-block;
} }
.scroll_view_itemsv { .scroll_view_itemsv {
display: flex; display: flex;
} }
.scroll_view_item { .scroll_view_item {
.scroll_view_item_img_box { .scroll_view_item_img_box {
width: 108rpx; width: 108rpx;
height: 108rpx; height: 108rpx;
position: relative; position: relative;
.scroll_view_item_top { .scroll_view_item_top {
font-size: 20rpx; font-size: 20rpx;
color: #bf8d46; color: #bf8d46;
font-weight: bold; font-weight: bold;
position: absolute; position: absolute;
top: 32rpx; top: 32rpx;
width: 100%; width: 100%;
text-align: center; text-align: center;
z-index: 1; z-index: 1;
} }
.scroll_view_item_bottom { .scroll_view_item_bottom {
font-size: 12rpx; font-size: 12rpx;
color: #ffe29d; color: #ffe29d;
position: absolute; position: absolute;
bottom: 18rpx; bottom: 18rpx;
left: 42rpx; left: 42rpx;
z-index: 2; z-index: 2;
} }
} }
.scroll_view_item_tips { .scroll_view_item_tips {
width: 108rpx; width: 108rpx;
text-align: center; text-align: center;
font-size: 26rpx; font-size: 26rpx;
padding-top: 16rpx; padding-top: 16rpx;
color: #333333; color: #333333;
} }
.scroll_view_item_img { .scroll_view_item_img {
width: 108rpx; width: 108rpx;
height: 108rpx; height: 108rpx;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: 0; z-index: 0;
} }
} }
.scroll_xian { .scroll_xian {
width: 64rpx; width: 64rpx;
height: 2rpx; height: 2rpx;
background: #ffe4d9; background: #ffe4d9;
margin-top: 52rpx; margin-top: 52rpx;
} }
} }
} }
.sign_conent_btn { .sign_conent_btn {
width: 100%; width: 100%;
border-radius: 45rpx; border-radius: 45rpx;
background: linear-gradient(270deg, #fcae3a 0%, #f15d25 100%); background: linear-gradient(270deg, #fcae3a 0%, #f15d25 100%);
color: #ffffff; color: #ffffff;
text-align: center; text-align: center;
padding: 22rpx 0; padding: 22rpx 0;
font-size: 32rpx; font-size: 32rpx;
} }
.is_sign_conent_btn { .is_sign_conent_btn {
width: 100%; width: 100%;
border-radius: 45rpx; border-radius: 45rpx;
background: #666; background: #666;
color: #ffffff; color: #ffffff;
text-align: center; text-align: center;
padding: 22rpx 0; padding: 22rpx 0;
font-size: 32rpx; font-size: 32rpx;
} }
} }
} }
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,863 @@
<template>
<view class="supermarket-container">
<view class="hander">
<uni-nav-bar
class="hander-nav-bar"
title=""
:fixed="true"
:statusBar="true"
:border="false"
backgroundColor="transparent"
>
<view class="title-name">门店列表</view>
<block slot="left">
<uni-icons type="back" color="#fff" size="24" @click="handerSkip" />
</block>
</uni-nav-bar>
</view>
<view class="address-block">
<view class="address-name" @click="selectAddress">
<text class="iconfontAili icon-dingwei"></text>
<text class="address-box">{{
originalData.result.sematic_description
}}</text>
<text class="iconfontAili icon-right"></text>
</view>
<view class="refresh-address" @click="anewLoction">
<text class="iconfontAili icon-zhongxindingwei"></text>
<text style="padding-left: 8rpx">重新定位</text>
</view>
</view>
<view class="supermarketl-list">
<view class="input-block">
<view class="input-view">
<uni-icons
type="search"
size="22"
color="#666666"
style="line-height: 60rpx"
/>
<input
confirm-type="search"
class="input"
type="text"
v-model="storeName"
placeholder="输入超市名进行搜索"
@input="handerInputName"
/>
</view>
</view>
<scroll-view
class="m-scroll-list"
scroll-y="true"
@scrolltolower="scrollbottom"
:show-scrollbar="false"
:scroll-with-animation="false"
enhanced
>
<view class="">
<view
class="list-content"
v-for="(item, index) of shopList"
:key="index"
@click="handerSkipShop(item)"
>
<view class="list-item-hander">
<view class="list-item-img">
<image
class="item-img"
lazy-load
:src="item.store_logo"
></image>
</view>
<view class="list-item-info">
<view class="list-item-name">{{ item.store_name }}</view>
<view class="list-item-time"
>{{ item.store_opening_hours }}~{{
item.store_close_hours
}}</view
>
<view class="list-item-address">
<view class="address-name">{{ item.store_address }}</view>
<view class="list-item-distance">
<text class="distance-number">{{
(item.distance / 1000).toFixed(2)
}}</text>
<text class="distance-unit">km</text>
</view>
</view>
</view>
</view>
<view class="list-item-bottom">
<view class="list-item-lable-list">
<!-- <text class="list-item-lable">实体店</text> -->
<text class="list-item-lable" v-if="item.chain_count > 0"
>上门自提</text
>
<text class="list-item-lable" v-if="same_city_setting_count > 0"
>同城配送</text
>
</view>
<view class="list-item-skipu">
<text class="skipu-name">详细</text>
<text class="iconfontAili icon-right"></text>
</view>
</view>
</view>
<block v-if="ispage">
<view class="u-loadmore">
<label class="u-loading"></label>
<text class="u-loadmore-tips">{{ __("正在加载") }}</text>
</view>
</block>
<block v-else>
<view class="u-loadmore u-loadmore-line">
<text class="u-loadmore-tips">{{ __("没有更多数据啦!") }}</text>
</view>
</block>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
import { mapState, mapMutations } from "vuex";
var bmap = require("../../libs/bmap-wx");
export default {
data() {
return {
ispage: false,
originalData: {
result: {
sematic_description: "定位中..",
},
},
addressInfo: {},
provinceData: [],
cityData: [],
areaData: [],
pageNum: 1,
pageSize: 10,
time: null,
shopList: [],
time2: null,
isNoData: false,
storeName: "",
};
},
computed: mapState([
"Config",
"StateCode",
"notice",
"plantformInfo",
"shopInfo",
"userInfo",
"hasLogin",
]),
onLoad(options) {
// if (options) {
// this.originalData.result.sematic_description = options.address;
// }
},
onPullDownRefresh() {
this.pageNum = 1;
this.storeName = "";
this.shopList = [];
this.getShopList(null);
},
onShow() {
let item = uni.getStorageSync("currentAddress");
this.getAppDistrict();
if (item) {
this.originalData.result.sematic_description = item.name;
this.addressInfo = item;
this.getShopList();
} else {
this.isPhoneLocationEnabled();
}
},
onHide() {
this.time = null;
clearTimeout(this.time);
this.time2 = null;
clearTimeout(this.time2);
this.shopList = [];
this.pageNum = 1;
},
methods: {
handerSkipShop(item) {
let km = (item.distance / 1000).toFixed(2);
uni.navigateTo({
url: `/pagesub/index/store?store_id=${item.store_id}&d=${km}km`,
});
},
handerSkip() {
this.$.gopage("/pages/index/index");
},
handerInputName(e) {
this.storeName = e.target.value;
if (this.time !== null) {
clearTimeout(this.time);
}
this.time = setTimeout(() => {
this.getShopList(e.target.value, null, true);
}, 600);
},
isPhoneLocationEnabled() {
let _this = this;
//
uni.getSystemInfo({
success: (res) => {
const locationEnabled = res.locationEnabled;
if (locationEnabled) {
// GPSAPP访
_this.isAppAuthorized();
} else {
// GPS
uni.showModal({
title: "提示",
content:
'小程序需要基于您的手机定位信息为您提供服务,当前检测到您的手机并未打开定位开关,请关闭小程序后前往 "设置 - 定位服务/位置信息" 开启手机定位,然后重新进入小程序~',
showCancel: false,
confirmText: "我已知悉",
});
}
},
fail: (err) => {
console.log("用户手机系统信息获取失败", err);
},
});
},
isAuthorized(a = "scope.userLocation") {
// 访scope
let _this = this;
uni.getSetting({
success: (res) => {
let userLocation = res.authSetting[a];
if (!userLocation) {
//
_this.getAuthorize();
} else {
_this.getLocation();
}
},
fail: (err) => {
_this.openSetting();
},
});
},
isAppAuthorized() {
let _this = this;
// APP
const appAuthorizeSetting = uni.getAppAuthorizeSetting();
// 使
let locationAuthorized = appAuthorizeSetting.locationAuthorized;
switch (locationAuthorized) {
case "authorized":
_this.isAuthorized();
break;
case "denied":
uni.showModal({
title: "提示",
content:
"已拒绝微信获取定位权限,即将打开权限管理页面,请把定位权限设置为允许~",
confirmText: "前往设置",
success: (res) => {
if (res.confirm) {
_this.openAppAuthorizeSetting();
} else if (res.cancel) {
_this.rejectGetLocation();
}
},
});
break;
case "not determined":
uni.showModal({
title: "提示",
content: "请授权微信获取定位权限~",
confirmText: "同意授权",
success: (res) => {
if (res.confirm) {
_this.openAppAuthorizeSetting();
} else if (res.cancel) {
_this.rejectGetLocation();
}
},
});
break;
}
},
getAuthorize(a = "scope.userLocation") {
let _this = this;
// uniapp
uni.authorize({
scope: a,
success: () => {
_this.getLocation();
},
fail: () => {
_this.openSetting();
},
});
},
openSetting() {
let _this = this;
uni.showModal({
title: "提示",
content: "我们需要获取您的位置信息,为您提供服务~",
success: (res) => {
if (res.confirm) {
uni.openSetting({
success: (res) => {
if (res.authSetting["scope.userLocation"] === true) {
_this.getLocation();
} else {
_this.rejectGetLocation();
}
},
fail: (err) => {
console.log("小程序授权弹窗打开失败", err);
},
});
} else if (res.cancel) {
_this.rejectGetLocation();
}
},
});
},
rejectGetLocation() {
uni.showToast({
title: "您拒绝了位置授权,小程序无法继续提供出行服务~",
icon: "none",
duration: 3000,
});
},
openAppAuthorizeSetting() {
let _this = this;
uni.openAppAuthorizeSetting({
success: (res) => {
console.log("打开系统微信授权管理页成功", res);
_this.isAuthorized();
},
fail: (err) => {
console.log("打开系统微信授权管理页失败", err);
},
});
},
getLocation() {
uni.getLocation({
type: "wgs84",
isHighAccuracy: true,
success: function (res) {
location = res.latitude + "," + res.longitude;
let BMap = new bmap.BMapWX({
ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
});
let fail = function (res) {
console.log("fail", res);
};
let success = function (res) {
console.log("结果地址", res);
that.originalData = res.originalData;
that.getShopList(null);
};
BMap.regeocoding({
location: location,
coordtype: "wgs84ll",
ret_coordtype: "gcj02ll",
fail: fail,
success: success,
});
},
fail: function (error) {
console.error("获取位置失败:", error);
},
});
},
selectAddress() {
uni.navigateTo({
url: "/address/selectShippingAddress?isShopList=true",
});
},
getAppDistrict() {
let that = this;
// 使
let district_data = uni.getStorageSync("district_data");
if (!district_data) {
that.$.request({
url: that.cf.URL.getAppDistrict,
data: {},
loading: false,
ajaxCache: {
timeout: this.cf.CACHE_EXPIRE,
},
success: function (data, status, msg, code) {
if (status == 200) {
uni.setStorageSync("district_data", data);
that.setDistrictData(data);
}
},
});
} else {
that.setDistrictData(district_data);
}
},
setDistrictData(district_data) {
this.provinceData = district_data.provinceData;
this.cityData = district_data.cityData;
this.areaData = district_data.areaData;
},
fuzzyMatch(shortStr, longStr) {
if (!shortStr || !longStr) {
console.log("找不到地址");
return;
}
const lowerShortStr = shortStr.toLowerCase();
const lowerLongStr = longStr.toLowerCase();
return lowerShortStr.includes(lowerLongStr);
},
getLocation() {
var that = this;
var location = "";
uni.getLocation({
type: "wgs84",
success: function (res) {
location = res.latitude + "," + res.longitude;
let BMap = new bmap.BMapWX({
ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
});
let fail = function (res) {
console.log("fail", res);
};
let success = function (res) {
console.log("结果地址", res);
that.originalData = res.originalData;
that.getShopList(null, res.originalData.result.location);
};
BMap.regeocoding({
location: location,
coordtype: "wgs84ll",
ret_coordtype: "gcj02ll",
fail: fail,
success: success,
});
},
fail: function (error) {
console.error("获取位置失败:", error);
},
});
},
async getShopList(storeName, currlocation, isSearch) {
let that = this;
var province = {
label: "",
value: 0,
};
var city = {
label: "",
value: 0,
};
var county = {
label: "",
value: 0,
};
var location = {
lat: 0,
lng: 0,
};
if (!currlocation) {
var item = this.addressInfo;
if (item && item.ud_id) {
province.value = item.ud_province_id;
city.value = item.ud_city_id;
county.value = item.ud_county_id;
location = item.location;
}
if (item && !item.ud_id) {
let res = await this.getAddressUid(item.uid);
let items = res.data.result;
location = items.location;
this.provinceData.forEach((group) => {
let isFind = this.fuzzyMatch(items.province, group.label);
if (isFind) {
province = group;
}
});
this.cityData.forEach((group) => {
group.forEach((group1) => {
let isFind = this.fuzzyMatch(group1.label, items.city);
if (isFind) {
city = group1;
}
});
});
this.areaData.forEach((group) => {
group.forEach((group1) => {
group1.forEach((group2) => {
let isFind = this.fuzzyMatch(group2.label, items.area);
if (isFind) {
county = group2;
}
});
});
});
}
} else {
let data = this.originalData.result.addressComponent;
this.provinceData.forEach((group) => {
let isFind = this.fuzzyMatch(data.province, group.label);
if (isFind) {
province = group;
}
});
this.cityData.forEach((group) => {
group.forEach((group1) => {
let isFind = this.fuzzyMatch(group1.label, data.city);
if (isFind) {
city = group1;
}
});
});
this.areaData.forEach((group) => {
group.forEach((group1) => {
group1.forEach((group2) => {
let isFind = this.fuzzyMatch(group2.label, data.district);
if (isFind) {
county = group2;
}
});
});
});
location = currlocation;
console.log(province, city, county);
}
let params = {
provinceId: province.value,
cityId: city.value,
countyId: county.value,
userLng: location.lng,
userLat: location.lat,
storeCategoryId: 1003,
pageNum: this.pageNum,
pageSize: this.pageSize,
storeName: this.storeName || "",
};
that.ispage = true;
that.$.request({
url: that.Config.URL.store.nearList,
data: params,
success: (res, status) => {
if (status == 200) {
if (res.items.length > 0) {
if (isSearch) {
that.shopList = res.items;
} else {
that.shopList = [...that.shopList, ...res.items];
}
console.log(that.shopList);
} else {
that.isNoData = true;
that.pageNum = 1;
}
that.ispage = false;
}
},
fail: (res) => {},
});
},
getAddressUid(uid) {
let baiduParams = {
uid: uid,
scope: 1,
ak: "qWKt2xbrqXsp2yK35YYXVBNZgrbiCG5v",
output: "json",
};
return new Promise((resolve) => {
uni.request({
url: "https://api.map.baidu.com/place/v2/detail",
data: baiduParams,
success(res) {
console.log("66", res);
resolve(res);
},
fail(res) {
resolve(res);
},
});
}).catch((e) => {});
},
scrollbottom() {
if (this.isNoData) return;
if (this.time2 !== null) {
clearTimeout(this.time2);
}
this.time2 = setTimeout(() => {
this.pageNum = this.pageNum + 1;
this.getShopList();
}, 600);
},
anewLoction() {
uni.removeStorageSync("currentAddress");
this.time = null;
clearTimeout(this.time);
this.time2 = null;
clearTimeout(this.time2);
this.shopList = [];
this.pageNum = 1;
this.isPhoneLocationEnabled();
},
},
};
</script>
<style lang="scss">
.supermarket-container {
height: 100vh;
// background: linear-gradient(to top left, #e85169, #e93340);
// background: linear-gradient(to top left, #e93340, #e85169);
background: rgb(249, 55, 43);
overflow: hidden;
.hander {
.title-name {
width: 100vw;
font-size: 16px;
text-align: center;
color: #fff;
}
}
/* 隐藏滚动条 */
.m-scroll-list {
scrollbar-width: none; /* Firefox */
}
.m-scroll-list::-webkit-scrollbar {
display: none; /* Chrome, Safari */
}
.address-block {
display: flex;
justify-content: space-between;
color: #fff;
padding: 16px;
.address-name {
display: flex;
align-items: center;
}
.address-box {
display: block;
margin: 0 6px;
max-width: 180px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.icon-zhongxindingwei {
margin-right: 4px;
}
}
.m-scroll-list {
height: calc(100vh - 220px);
}
.supermarketl-list {
background: #f4f5f9;
padding: 4px;
border-top-left-radius: 18px;
border-top-right-radius: 18px;
overflow: hidden;
.input-view {
// width: 50%;
display: flex;
background-color: #ffffff;
height: 60rpx;
border-radius: 30rpx;
padding: 0 4%;
flex-wrap: nowrap;
margin: 20px 10px;
line-height: 60rpx;
color: #b9b9b9;
}
.input-view .uni-icon {
line-height: 60rpx !important;
font-size: 24rpx;
}
.input-view .uni-icons {
font-size: 32rpx !important;
}
.input-view .input {
height: 60rpx;
line-height: 60rpx;
width: 100%;
padding: 0 2%;
font-size: 24rpx;
}
.list-content {
margin: 10px;
background: #fff;
border-radius: 6px;
padding: 18px 12px;
.list-item-hander {
display: flex;
.list-item-img {
border-radius: 10px;
margin-right: 12px;
width: 102px;
height: 102px;
overflow: hidden;
.item-img {
width: 102px;
height: 102px;
}
}
.list-item-info {
flex: 1 1;
font-size: 13px;
color: #5e6066;
line-height: 18px;
.list-item-name {
font-size: 16px;
color: #2f3033;
line-height: 22px;
margin-bottom: 6px;
font-weight: 700;
max-width: 258px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.list-item-time {
font-size: 13px;
color: #5e6066;
line-height: 18px;
margin-bottom: 6px;
}
.list-item-address {
display: flex;
justify-content: space-between;
.address-name {
max-width: 180px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.list-item-distance {
.distance-number {
font-weight: 700;
font-size: 20px;
color: #000;
}
}
}
}
}
.list-item-bottom {
display: flex;
justify-content: space-between;
.list-item-lable-list {
.list-item-lable {
margin-right: 9px;
border-radius: 4px;
height: 18px;
font-size: 11px;
padding: 0 4px;
align-items: center;
justify-content: center;
color: #6f7dad;
background: #f4f6fa;
}
}
.list-item-skipu {
font-size: 14px;
font-weight: 700;
color: #fe0137;
}
}
}
}
@media screen and (max-width: 320px) {
.address-block {
.address-box {
max-width: 140px;
}
}
.list-item-img {
width: 62px !important;
height: 62px !important;
.item-img {
width: 62px !important;
height: 62px !important;
}
}
.address-name {
max-width: 120px !important;
}
}
@media screen and (min-width: 321px) {
.m-product-info {
width: 60%;
}
}
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="page"> <view class="page order-list-container">
<view :class="show ? 'cover' : ''"></view> <view :class="show ? 'cover' : ''"></view>
<view class="m-product-all"> <view class="m-product-all">
<view class="m-tab"> <view class="m-tab">
@ -8,54 +8,56 @@
scroll-x scroll-x
style="width: 100%" style="width: 100%"
> >
<view <view class="tab-list">
:class="[ <view
'm-navbar-item ellipsis', :class="[
tapindex == 1 ? 'm-navbar-item-on' : '', 'm-navbar-item ellipsis',
]" tapindex == 1 ? 'm-navbar-item-on' : '',
@click="allOrders" ]"
> @click="allOrders"
{{ __("全部订单") }} >
</view> 全部
<view </view>
:class="[ <view
'm-navbar-item ellipsis', :class="[
tapindex == 2 ? 'm-navbar-item-on' : '', 'm-navbar-item ellipsis',
]" tapindex == 2 ? 'm-navbar-item-on' : '',
@click="toBePaid" ]"
> @click="toBePaid"
{{ __("待支付") }} >
</view> {{ __("待支付") }}
<view </view>
v-if="!card_kind_id" <view
:class="[ v-if="!card_kind_id"
'm-navbar-item ellipsis', :class="[
tapindex == 5 ? 'm-navbar-item-on' : '', 'm-navbar-item ellipsis',
]" tapindex == 5 ? 'm-navbar-item-on' : '',
@click="toBeShipping" ]"
> @click="toBeShipping"
<label v-if="kind_id == 1201">{{ __("待发货") }}</label> >
<label v-else>{{ __("待服务") }}</label> <label v-if="kind_id == 1201">{{ __("待发货") }}</label>
</view> <label v-else>{{ __("待服务") }}</label>
<view </view>
:class="[ <view
'm-navbar-item ellipsis', :class="[
tapindex == 3 ? 'm-navbar-item-on' : '', 'm-navbar-item ellipsis',
]" tapindex == 3 ? 'm-navbar-item-on' : '',
@click="receiptOfGoods" ]"
> @click="receiptOfGoods"
<label v-if="kind_id == 1201">{{ __("待收货") }}</label> >
<label v-else>{{ __("待确认") }}</label> <label v-if="kind_id == 1201">{{ __("待收货") }}</label>
</view> <label v-else>{{ __("待确认") }}</label>
<view </view>
:class="[ <view
'm-navbar-item ellipsis', :class="[
tapindex == 4 ? 'm-navbar-item-on' : '', 'm-navbar-item ellipsis',
]" tapindex == 4 ? 'm-navbar-item-on' : '',
@click="toBeEvaluated" ]"
> @click="toBeEvaluated"
<label v-if="kind_id == 1201">{{ __("已完成") }}</label> >
<label v-else>{{ __("已服务") }}</label> <label v-if="kind_id == 1201">{{ __("已完成") }}</label>
<label v-else>{{ __("已服务") }}</label>
</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -78,7 +80,8 @@
style="" style=""
hover-class="none" hover-class="none"
> >
<view class="m-cell-bd m-cell-primary"> <text class="iconfontAili icon-dianpu"></text>
<view class="m-cell-bd m-cell-primary title-block">
<p class="m-store-info"> <p class="m-store-info">
{{ items.store_name }} {{ items.store_name }}
</p> </p>
@ -94,63 +97,135 @@
? __("货到付款") ? __("货到付款")
: __("在线支付") : __("在线支付")
}}</text> }}</text>
<label>{{ items.order_state_name }}</label> <label>{{ formatOrderName(items.order_state_name) }}</label>
</view> </view>
<view class="m-product-list"> <view class="m-product-list" v-if="items.item.length == 1">
<navigator <navigator
:url="'/member/order/detail?on=' + items.order_id" :url="'/member/order/detail?on=' + items.order_id"
v-for="(item, ii) in items.item" v-for="(item, ii) in items.item"
:key="ii" :key="ii"
class="m-product-item"
> >
<view class="m-product-img"> <view class="m-product-item-1">
<image :src="item.order_item_image" mode="aspectFill" /> <view class="m-product-img">
</view> <image :src="item.order_item_image" mode="aspectFill" />
<view class="m-product-info">
<view class="m-product-name">
<!-- items.OrderType == 1 拼团 -->
<label
><text
v-if="item.activity_type_name"
class="tag tag-orange"
>{{ item.activity_type_name }}</text
>{{ item.item_name }}</label
>
<label
class="m-min-name"
style="
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
"
v-if="false"
>
{{ item.spec_info ? item.spec_info : "" }}
</label>
</view> </view>
<view class="m-product-info-item">
<view class="m-product-name">
<!-- items.OrderType == 1 拼团 -->
<label
><text
v-if="item.activity_type_name"
class="tag tag-orange"
>{{ item.activity_type_name }}</text
>{{ item.item_name }}</label
>
<view class="m-product-price"> <label
<block v-if="item.order_item_unit_price"> class="m-min-name"
<label>{{ __("¥") }}</label style="
>{{ item.order_item_unit_price }} overflow: hidden;
</block> text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
"
v-if="false"
>
{{ item.spec_info ? item.spec_info : "" }}
</label>
</view>
<block v-if="item.item_unit_points"> <!-- <view class="m-product-price">
<label style="margin: auto 10rpx">+</label <block v-if="item.order_item_unit_price">
>{{ item.item_unit_points }}{{ __("积分") }} <label>{{ __("¥") }}</label
</block> >{{ item.order_item_unit_price }}
</block>
<block v-if="item.item_unit_sp"> <block v-if="item.item_unit_points">
<label style="margin: auto 10rpx">+</label <label style="margin: auto 10rpx">+</label
>{{ item.item_unit_sp }}{{ __("众宝") }} >{{ item.item_unit_points }}{{ __("积分") }}
</block> </block>
<text style="float: right; margin-right: 60rpx" <block v-if="item.item_unit_sp">
>x{{ item.order_item_quantity }}</text <label style="margin: auto 10rpx">+</label
>{{ item.item_unit_sp }}{{ __("众宝") }}
</block>
<text style="float: right; margin-right: 60rpx"
>x{{ item.order_item_quantity }}</text
>
</view> -->
</view>
<view class="m-product-price-item">
<view class="m-product-price-item-amount">
<label>{{ __("¥") }}</label>
<label style="font-size: 17px; min-height: 37px">
{{
String(items.order_payment_amount).split(".")[0]
}}</label
>
<label
v-if="String(items.order_payment_amount).includes('.')"
>
.
{{
String(items.order_payment_amount).split(".")[1]
}}</label
>
</view>
<view class="m-product-price-item-number"
>{{ items.item.length }}</view
>
</view>
</view>
</navigator>
</view>
<view class="m-product-list" v-else>
<navigator :url="'/member/order/detail?on=' + items.order_id">
<view class="m-product-item-2">
<scroll-view
class="m-product-item-2-scroll"
scroll-x="true"
:show-scrollbar="true"
:enable-flex="true"
style="
display: flex;
white-space: nowrap;
position: relative;
width: 100%;
"
>
<view
class="img-item"
v-for="(item, index) in items.item"
:key="index"
>
<image :src="item.order_item_image" mode="aspectFill" />
</view>
</scroll-view>
<view class="m-product-price-item m-product-price-item-2">
<view class="m-product-price-item-amount">
<label>{{ __("¥") }}</label>
<label style="font-size: 17px; min-height: 37px">
{{
String(items.order_payment_amount).split(".")[0]
}}</label
>
<label
v-if="String(items.order_payment_amount).includes('.')"
>
.
{{
String(items.order_payment_amount).split(".")[1]
}}</label
>
</view>
<view class="m-product-price-item-number"
>{{ items.item.length }}</view
> >
</view> </view>
</view> </view>
@ -175,7 +250,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="m-total-info"> <!-- <view class="m-total-info">
<view> <view>
{{ __("总金额") }} {{ __("总金额") }}
<block v-if="items.order_payment_amount"> <block v-if="items.order_payment_amount">
@ -215,7 +290,7 @@
> >
+ {{ items.order_resource_ext2 }}{{ __("众宝") }}</label + {{ items.order_resource_ext2 }}{{ __("众宝") }}</label
> >
</view> </view> -->
<view class="m-total-btn"> <view class="m-total-btn">
<form report-submit="true"> <form report-submit="true">
<button <button
@ -283,12 +358,12 @@
>{{ __("确认收货") }}</view >{{ __("确认收货") }}</view
> >
<view <view
class="u-link-btn"
:data-on="items.order_id" :data-on="items.order_id"
v-if=" v-if="
items.kind_id == 1201 && items.kind_id == 1201 &&
items.order_state_id == StateCode.ORDER_STATE_FINISH items.order_state_id == StateCode.ORDER_STATE_FINISH
" "
class="u-link-btn"
@click="placeAnOrder" @click="placeAnOrder"
>{{ __("再下一单") }}</view >{{ __("再下一单") }}</view
> >
@ -478,6 +553,19 @@ export default {
"forceUserInfo", "forceUserInfo",
"getUserInfo", "getUserInfo",
]), ]),
formatOrderName(name) {
switch (name) {
case "已取消/已作废":
return "已取消";
break;
case "已完成/已签收":
return "已完成";
break;
default:
return name;
}
},
formatAmout(amout) {},
RefreshMessage: function (e) { RefreshMessage: function (e) {
this.setData({ this.setData({
tapindex: 1, tapindex: 1,
@ -595,7 +683,8 @@ export default {
url: this.Config.URL.user.order_lists, url: this.Config.URL.user.order_lists,
data: params, data: params,
success: function (data, status, msg, code) { success: function (data, status, msg, code) {
if (200 == status && data.items.length > 0) { console.log(data);
if (status == 200 && data && data.items.length > 0) {
if (data.page >= data.total) { if (data.page >= data.total) {
that.setData({ that.setData({
flag: false, flag: false,
@ -825,206 +914,345 @@ export default {
<style lang="scss"> <style lang="scss">
@import "../../styles/_variables"; @import "../../styles/_variables";
.m-navbar-item { .order-list-container {
padding: 20rpx 0; .tab-list {
font-size: 28rpx; display: flex;
} margin: 8px 0;
.m-navbar-item:after {
border: none;
}
.m-navbar-item.m-navbar-item-on {
background-color: #fff;
color: $default-skin-bg;
}
.m-navbar-item.m-navbar-item-on::before {
content: " ";
position: absolute;
left: 0;
bottom: 0;
right: 0;
height: 6rpx;
border-bottom: 6rpx solid $default-skin-bg;
color: #cccccc;
-webkit-transform-origin: 0 100%;
transform-origin: 0 100%;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
z-index: 3;
}
.m-panel-hd {
padding: 20rpx 30rpx 10rpx;
display: flex;
line-height: 60rpx;
}
.m-cell {
padding: 0px;
}
.m-cell-access .m-cell-ft:after {
margin-top: -3px;
margin-left: 6rpx;
}
.m-panel-hd:after {
border-bottom: 0;
}
.m-panel-hd label {
float: right;
color: $default-skin-bg;
font-size: 26rpx;
flex: 1;
text-align: right;
}
.m-total-info {
text-align: right;
padding: 10rpx 38rpx;
font-size: 24rpx;
}
.m-total-info label {
font-size: 32rpx;
color: $default-skin-bg;
}
.m-total-info text {
font-size: 24rpx;
color: $default-skin-bg;
}
.m-total-btn {
text-align: right;
padding: 20rpx 20rpx 20rpx 20rpx;
position: relative;
}
.m-total-btn::before {
content: " ";
position: absolute;
left: 0;
top: 0;
right: 0;
height: 1px;
border-top: 1px solid #ebebe7;
color: #ebebe7;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
.m-total-btn .u-link-btn {
margin: 0 10rpx;
vertical-align: middle;
display: inline-block;
line-height: 40rpx;
background-color: #fff;
font-size: 24rpx;
}
.m-sort {
position: relative;
}
.m-sort image {
width: 24rpx;
height: 24rpx;
position: absolute;
/*top: 50%;*/
margin-top: 10rpx;
margin-left: 2rpx;
}
.m-product-price text {
font-size: 24rpx;
color: #999999;
margin-left: 6rpx;
}
.m-tab {
position: fixed;
width: 100%;
top: var(--window-top);
z-index: 2;
}
.m-orderlist {
padding-top: 84rpx;
position: absolute;
box-sizing: border-box;
width: 100%;
height: 100%;
}
.u-tuan-label {
padding: 5rpx;
background-color: $default-skin-bg;
border-radius: 4rpx;
font-size: 24rpx;
color: #fff;
margin-right: 5rpx;
}
.alert {
font-size: 32rpx;
width: 70%;
height: 200rpx;
padding: 0 40rpx;
position: absolute;
left: 10%;
top: 40%;
background: #fff;
border-radius: 10rpx;
justify-content: center;
display: flex;
align-items: center;
z-index: 999;
}
.cover {
position: fixed;
width: 100%;
height: 100%;
top: 0px;
background: rgba(0, 0, 0, 0.4);
overflow: hidden;
z-index: 998;
}
.m-product-name {
font-size: 24rpx;
}
.m-product-img {
image {
padding: 10rpx;
} }
}
.m-product-item { /* 隐藏滚动条 */
margin-top: 0rpx; .scroll-view {
} scrollbar-width: none; /* Firefox */
}
.scroll-view_H { .scroll-view::-webkit-scrollbar {
width: 100%; display: none; /* Chrome, Safari */
white-space: nowrap; }
height: 84rpx; .icon-dianpu {
font-size: 18px;
font-weight: bold;
}
.title-block {
max-width: 275px;
padding-left: 4px;
padding-right: 4px;
font-weight: bold;
font-size: 17px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
color: #202021;
}
.m-navbar {
background: none;
}
.m-product-list {
position: relative;
padding: 0 11px 11px;
}
.m-product-info-item {
flex: 1;
}
.m-product-price-item-2 {
position: absolute;
right: 0;
bottom: 10;
height: 80px;
padding-right: 11px;
}
.m-navbar-item { .m-navbar-item {
display: inline-block; // padding: 20rpx 0;
padding-left: 20rpx; padding: 0;
padding-right: 20rpx; font-size: 28rpx;
height: 40px;
line-height: 40px;
color: #999ca7;
}
/*min-width:110rpx;*/ .m-navbar-item:after {
min-width: 150rpx; border: none;
min-width: 108rpx; }
.m-navbar-item.m-navbar-item-on {
background: none;
color: #202021 !important;
font-weight: 700;
}
.m-product-item-2 {
display: flex;
background: #fff;
.m-product-item-2-scroll {
.uni-scroll-view-content {
display: flex;
background: ccc;
}
}
}
.m-navbar-item.m-navbar-item-on::before {
content: " ";
position: absolute;
width: 22px;
height: 4px;
bottom: 0;
left: 50%;
margin-left: -11px;
background: #fe0137;
color: #fff;
}
.m-product-price-item-number {
color: #999ca7;
font-size: 13px;
}
.m-panel-hd {
display: flex;
padding: 0 11px;
height: 60px;
line-height: 60px;
color: #202021;
}
.m-cell {
padding: 0px;
}
.m-product-price-item-amount {
font-weight: 700;
}
.img-item {
width: 80px;
height: 80px;
background: red;
margin-right: 10px;
display: inline-block;
image {
width: 80px;
height: 80px;
}
}
.m-cell-access .m-cell-ft:after {
margin-top: -3px;
margin-left: 6rpx;
}
.m-panel-hd:after {
border-bottom: 0;
}
.m-panel-hd label {
float: right;
color: #202021;
font-size: 14px;
flex: 1;
text-align: right;
font-weight: 700;
}
.m-total-info {
text-align: right;
padding: 10rpx 38rpx;
font-size: 24rpx;
}
.m-total-info label {
font-size: 32rpx;
color: $default-skin-bg;
}
.m-total-info text {
font-size: 24rpx;
color: $default-skin-bg;
}
.m-total-btn {
text-align: right;
padding: 20rpx 20rpx 20rpx 20rpx;
// position: relative;
}
.m-total-btn::before {
content: " ";
position: absolute;
left: 0;
top: 0;
right: 0;
height: 1px;
border-top: 1px solid #ebebe7;
color: #ebebe7;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
.m-total-btn .u-link-btn {
margin: 0 10rpx;
vertical-align: middle;
display: inline-block;
line-height: 40rpx;
background-color: #fff;
height: 38px;
line-height: 38px;
width: 94px;
margin-left: 4px;
text-align: center;
font-size: 14px;
padding: 0;
border-radius: 114px;
color: #fe0137;
}
@media screen and (max-width: 320px) {
.m-total-btn .u-link-btn {
width: 64px;
height: 32px;
line-height: 32px;
font-size: 12px;
}
}
@media screen and (min-width: 321px) {
// .m-total-btn {
// height: 38px;
// line-height: 38px;
// }
}
.m-sort {
position: relative;
}
.m-sort image {
width: 24rpx;
height: 24rpx;
position: absolute;
/*top: 50%;*/
margin-top: 10rpx;
margin-left: 2rpx;
}
.m-product-price-item {
min-width: 68px;
background: linear-gradient(
270deg,
hsla(0, 0%, 100%, 0.9),
hsla(0, 0%, 100%, 0.9)
);
text-align: right;
display: flex;
flex-flow: column;
justify-content: center;
color: #202021;
font-size: 13px;
.uni-label-pointer {
font-weight: bold;
}
}
.m-product-price text {
font-size: 24rpx;
color: #999999;
margin-left: 6rpx;
}
.m-product-price .m-tab {
position: fixed;
width: 100%;
top: var(--window-top);
z-index: 2;
}
.m-orderlist {
// padding-top: 84rpx;
position: absolute;
box-sizing: border-box;
width: 100%;
height: 100%;
}
.u-tuan-label {
padding: 5rpx;
background-color: $default-skin-bg;
border-radius: 4rpx;
font-size: 24rpx;
color: #fff;
margin-right: 5rpx;
}
.alert {
font-size: 32rpx;
width: 70%;
height: 200rpx;
padding: 0 40rpx;
position: absolute;
left: 10%;
top: 40%;
background: #fff;
border-radius: 10rpx;
justify-content: center;
display: flex;
align-items: center;
z-index: 999;
}
.cover {
position: fixed;
width: 100%;
height: 100%;
top: 0px;
background: rgba(0, 0, 0, 0.4);
overflow: hidden;
z-index: 998;
}
.m-product-name {
font-size: 24rpx;
}
.m-product-img {
width: 80px;
height: 80px;
image {
width: 80px;
height: 80px;
}
}
.m-product-item {
margin-top: 0rpx;
}
.m-product-item-1 {
display: flex;
}
.scroll-view_H {
width: 100%;
white-space: nowrap;
height: 84rpx;
.m-navbar-item {
display: inline-block;
padding-left: 20rpx;
padding-right: 20rpx;
/*min-width:110rpx;*/
min-width: 150rpx;
min-width: 108rpx;
}
} }
} }
</style> </style>

View File

@ -168,7 +168,6 @@ export default {
success: function (n) { success: function (n) {
that.$.hideLoading(); that.$.hideLoading();
var up_res = that.$.parseJSON(n.data); var up_res = that.$.parseJSON(n.data);
debugger;
var s = up_res.data.url; var s = up_res.data.url;
dataInfo.comment_image.push(s); dataInfo.comment_image.push(s);
that.setData({ data_info: dataInfo }); that.setData({ data_info: dataInfo });

View File

@ -107,7 +107,7 @@
"style": { "style": {
"navigationBarTitleText": "购物车", "navigationBarTitleText": "购物车",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationStyle": "custom", // "navigationStyle": "custom",
"app-plus": { "app-plus": {
"titleNView": { "titleNView": {
"type": "transparent" "type": "transparent"
@ -269,6 +269,14 @@
"navigationBarTitleText": "成长值" "navigationBarTitleText": "成长值"
} }
}, },
{
"path": "member/supermarketlList",
"style": {
"navigationBarTitleText": "超市列表",
"enablePullDownRefresh":true,
"navigationStyle": "custom"
}
},
{ {
"path": "member/options", "path": "member/options",
"style": { "style": {
@ -511,7 +519,7 @@
{ {
"path": "order/detail", "path": "order/detail",
"style": { "style": {
"navigationBarTitleText": "订单详情" "navigationStyle": "custom"
} }
}, },
{ {
@ -1488,24 +1496,25 @@
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"selectedColor": "#DB384C", "selectedColor": "#DB384C",
"list": [{ "list": [
"pagePath": "pages/index/index", {
"iconPath": "static/images/tabBar1.png", "pagePath": "pages/index/index",
"selectedIconPath": "static/images/tabBar_sel1.png", "iconPath": "static/images/tabBar1.png",
"text": "首页" "selectedIconPath": "static/images/tabBar_sel1.png",
}, "text": "首页"
{ },
"pagePath": "pages/category/category", {
"iconPath": "static/images/tabBar2.png", "pagePath": "pages/category/category",
"selectedIconPath": "static/images/tabBar_sel2.png", "iconPath": "static/images/tabBar2.png",
"text": "分类" "selectedIconPath": "static/images/tabBar_sel2.png",
}, "text": "分类"
{ },
"pagePath": "pages/index/image", {
"iconPath": "static/images/tabBarSns.png", "pagePath": "pages/index/image",
"selectedIconPath": "static/images/tabBarSns_sel.png", "iconPath": "static/images/tabBarSns.png",
"text": "发现" "selectedIconPath": "static/images/tabBarSns_sel.png",
}, "text": "发现"
},
{ {
"pagePath": "pages/cart/cart", "pagePath": "pages/cart/cart",
"iconPath": "static/images/tabBar3.png", "iconPath": "static/images/tabBar3.png",

View File

@ -1,8 +1,12 @@
<template> <template>
<view class="page"> <view class="page">
<status-bar></status-bar> <!-- <status-bar :backgroundColor="'#fff'"></status-bar> -->
<!-- <uni-nav-bar title="购物车"></uni-nav-bar> -->
<view v-if="loadComplete"> <view v-if="loadComplete">
<block v-if="isdata"> <block v-if="isdata">
<view class="manage" @click="showDelBtn">{{
!showDelList ? "管理" : "退出管理"
}}</view>
<view class="m-product-all" style="padding-bottom: 10rpx"> <view class="m-product-all" style="padding-bottom: 10rpx">
<view class="m-product-list"> <view class="m-product-list">
<block <block
@ -24,7 +28,7 @@
store_items.cart_select ? 'circle-filled' : 'circle' store_items.cart_select ? 'circle-filled' : 'circle'
" "
:color="store_items.cart_select ? theme_bg : '#e3e3e3'" :color="store_items.cart_select ? theme_bg : '#e3e3e3'"
size="20" size="28"
/> />
</view> </view>
<navigator <navigator
@ -50,7 +54,7 @@
class="m-product-item" class="m-product-item"
> >
<view <view
:class="{ 'm-item-c': 1, del: item.cart_id == T_Id }" :class="{ 'm-item-c': 1 }"
@touchstart="removestart" @touchstart="removestart"
@touchmove="removeload" @touchmove="removeload"
@touchend="removeend" @touchend="removeend"
@ -77,7 +81,7 @@
<uni-icons <uni-icons
:type="item.cart_select ? 'circle-filled' : 'circle'" :type="item.cart_select ? 'circle-filled' : 'circle'"
:color="item.cart_select ? theme_bg : '#e3e3e3'" :color="item.cart_select ? theme_bg : '#e3e3e3'"
size="20" size="28"
/> />
</view> </view>
<view class="m-product-img"> <view class="m-product-img">
@ -362,7 +366,7 @@
<uni-icons <uni-icons
:type="pluse.cart_select ? 'circle-filled' : 'circle'" :type="pluse.cart_select ? 'circle-filled' : 'circle'"
:color="pluse.cart_select ? theme_bg : '#e3e3e3'" :color="pluse.cart_select ? theme_bg : '#e3e3e3'"
size="20" size="28"
/> />
</view> </view>
<navigator <navigator
@ -477,7 +481,7 @@
<uni-icons <uni-icons
:type="isckall ? 'circle-filled' : 'circle'" :type="isckall ? 'circle-filled' : 'circle'"
:color="isckall ? theme_bg : '#e3e3e3'" :color="isckall ? theme_bg : '#e3e3e3'"
size="20" size="28"
/> />
</view> </view>
@ -558,7 +562,7 @@
<uni-icons <uni-icons
:type="isckall ? 'circle-filled' : 'circle'" :type="isckall ? 'circle-filled' : 'circle'"
:color="isckall ? theme_bg : '#e3e3e3'" :color="isckall ? theme_bg : '#e3e3e3'"
size="20" size="28"
/> />
</view> </view>
@ -749,7 +753,7 @@
<uni-icons <uni-icons
:type="isckall ? 'circle-filled' : 'circle'" :type="isckall ? 'circle-filled' : 'circle'"
:color="isckall ? theme_bg : '#e3e3e3'" :color="isckall ? theme_bg : '#e3e3e3'"
size="20" size="28"
/> />
</view> </view>
<view <view
@ -760,11 +764,13 @@
" "
>{{ __("全选") }}</view >{{ __("全选") }}</view
> >
<view class="m-cart-del" @click="delAll"> <!-- <view class="m-cart-del" @click="delAll" v-show="showDelList">
<label class="iconfont icon-delete"></label> <view class="btn-del">
</view> 删除
</view>
</view> -->
</view> </view>
<view class="m-footer-btn-item m-cart-total"> <view class="m-footer-btn-item m-cart-total" v-show="!showDelList">
<view style="line-height: 1.8; font-size: 12px" <view style="line-height: 1.8; font-size: 12px"
>{{ __("合计:") }} >{{ __("合计:") }}
<block v-if="cartlist.orderSelMoneyAmount"> <block v-if="cartlist.orderSelMoneyAmount">
@ -797,9 +803,16 @@
</view> </view>
</view> </view>
</view> </view>
<view class="m-footer-btn-main" @click="submitorder"> <view
class="m-footer-btn-main"
v-show="!showDelList"
@click="submitorder"
>
{{ sprintf(__("结算(%s)"), cartlist.Total) }} {{ sprintf(__("结算(%s)"), cartlist.Total) }}
</view> </view>
<view class="m-footer-btn-main" v-show="showDelList" @click="delAll">
删除
</view>
</view> </view>
<view <view
@ -925,6 +938,7 @@ export default {
theme_bg: theme_bg, theme_bg: theme_bg,
loadComplete: false, // loadComplete: false, //
isGuessFlag: false, isGuessFlag: false,
showDelList: false,
}; };
}, },
computed: mapState([ computed: mapState([
@ -1004,6 +1018,9 @@ export default {
"setCartNum", "setCartNum",
"showCartNum", "showCartNum",
]), ]),
showDelBtn() {
this.showDelList = !this.showDelList;
},
// //
getPlatType: function () { getPlatType: function () {
let platStr = null; let platStr = null;
@ -1681,6 +1698,18 @@ export default {
width: 27px; width: 27px;
} }
.thin-border-right {
border-top-left-radius: 12rpx;
border-bottom-left-radius: 12rpx;
border: 1px solid #dddddd;
}
.thin-border-left {
border-top-right-radius: 12rpx;
border-bottom-right-radius: 12rpx;
border: 1px solid #dddddd;
}
.m-store-ck icon, .m-store-ck icon,
.m-store-ck .uni-icons { .m-store-ck .uni-icons {
// position: absolute; // position: absolute;
@ -1694,7 +1723,8 @@ export default {
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
margin-left: 14rpx; margin-left: 14rpx;
font-size: 14px; font-size: 15px;
font-weight: bold;
} }
/*.m-store-info::before {content: " ";position: absolute;left: 0;bottom: 0;right: 0;height: 1rpx;border-bottom: 1rpx solid #e3e3e3;color: #CCCCCC;-webkit-transform-origin: 0 100%;transform-origin: 0 100%;-webkit-transform: scaleY(0.5);transform: scaleY(0.5);z-index: 3;}*/ /*.m-store-info::before {content: " ";position: absolute;left: 0;bottom: 0;right: 0;height: 1rpx;border-bottom: 1rpx solid #e3e3e3;color: #CCCCCC;-webkit-transform-origin: 0 100%;transform-origin: 0 100%;-webkit-transform: scaleY(0.5);transform: scaleY(0.5);z-index: 3;}*/
@ -1795,6 +1825,12 @@ export default {
margin-top: 6rpx; margin-top: 6rpx;
} }
.manage {
margin: 20rpx 60rpx;
font-weight: bold;
text-align: right;
}
.m-panel-sp-pname .m-pprice { .m-panel-sp-pname .m-pprice {
color: $default-skin-bg; color: $default-skin-bg;
font-size: 32rpx; font-size: 32rpx;
@ -1808,6 +1844,12 @@ export default {
top: 20rpx; top: 20rpx;
} }
.u-cart-num::after {
// z-index: 99;
// border: 1px solid #cacaca;
border: none;
}
/* .m-panel-sp-listbox{height: 604rpx;} */ /* .m-panel-sp-listbox{height: 604rpx;} */
.m-panel-sp-listbox-item { .m-panel-sp-listbox-item {
height: 130rpx; height: 130rpx;
@ -1846,7 +1888,7 @@ export default {
// position: absolute; // position: absolute;
// top: 50%; // top: 50%;
// left: 50%; // left: 50%;
margin-top: -20rpx; // margin-top: -20rpx;
// margin-left: -20rpx; // margin-left: -20rpx;
} }
@ -1858,7 +1900,7 @@ export default {
width: 60%; width: 60%;
max-width: 60%; max-width: 60%;
height: auto; height: auto;
padding: 0px 10px 5px 5px; padding: 0px 18px 14px 5px;
} }
@media screen and (max-width: 320px) { @media screen and (max-width: 320px) {
@ -1954,7 +1996,7 @@ export default {
flex: 1; flex: 1;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin: 0 10px; margin: 0 8px;
height: 100%; height: 100%;
} }
@ -1972,9 +2014,9 @@ export default {
} }
.m-footer-btn-main { .m-footer-btn-main {
width: 25%; width: 23%;
height: 100%; height: 100%;
float: left; float: right;
background: $default-skin-bg; background: $default-skin-bg;
color: #fff; color: #fff;
font-size: 32rpx; font-size: 32rpx;
@ -2057,12 +2099,12 @@ view {
} }
.m-product-img { .m-product-img {
width: 59px; width: 80px;
height: 59px; height: 80px;
image { image {
// padding: 14rpx; // padding: 14rpx;
width: 59px; width: 80px;
height: 59px; height: 80px;
padding: 0; padding: 0;
} }
} }
@ -2083,7 +2125,7 @@ view {
} }
.m-product-price { .m-product-price {
line-height: 30px !important; line-height: 40px !important;
flex: 1; flex: 1;
font-size: 12px; font-size: 12px;
} }
@ -2117,9 +2159,10 @@ view {
} }
.u-num-btn { .u-num-btn {
width: 52rpx; width: 60rpx;
line-height: 56rpx; line-height: 56rpx;
height: 56rpx; height: 56rpx;
background: #f9f9f9;
} }
.u-cart-num { .u-cart-num {
@ -2128,16 +2171,19 @@ view {
left: -20px; left: -20px;
.u-num-btn { .u-num-btn {
width: 25px; width: 29px;
line-height: 25px; line-height: 28px;
height: 25px; height: 28px;
font-weight: bold;
} }
input { input {
font-size: 13px !important; font-size: 15px !important;
width: 40px; width: 28px;
height: 25px; height: 28px;
line-height: 25px; line-height: 28px;
border-top: 1px solid #dddddd;
border-bottom: 1px solid #dddddd;
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
<template> <template>
<view style="overflow-x: hidden;" class="page-container"> <view style="overflow-x: hidden;" class="page-container">
<view> <view v-if="!selfpickFlag">
<view v-if="(ud_id>0)" @click="selectAddress" class="m-addres-info m-cell-access"> <view v-if="(ud_id>0)" @click="selectAddress" class="m-addres-info m-cell-access">
<view class="m-ad-name"> <view class="m-ad-name">
<text>{{submitinfo.delivery_address_row.ud_name}}</text> <text>{{submitinfo.delivery_address_row.ud_name}}</text>
@ -28,24 +28,32 @@
</view> </view>
<block v-if="canSelfpick && !isVirtual" > <block v-if=" !isVirtual" >
<view class="distribution" v-if="(true)"> <view class="distribution" v-if="(true)">
<view style="width:30%">{{__('配送方式')}}</view> <view style="width:30%">{{__('配送方式')}}</view>
<view class="check" style="display:flex;align-items: center;width:70%;justify-content: space-around"> <view class="check" style="display:flex;align-items: center;width:70%;justify-content: space-around">
<view style="display:flex;align-items: center;" v-if="(delivery)" @click="express"> <view style="display:flex;align-items: center" @click="handerIntraCityService" :data-store_id="store_id">
<image v-if="(intraCityService)" style="width:32rpx;height:32rpx;border-radius:50%"
src="/static/images/ziti.png" />
<view v-else class="border"
style="border-radius:50%;width:26rpx;height:26rpx;border:1px solid #db384c" />
<view style="margin-left:10rpx">同城配送</view>
</view>
<!-- <view style="display:flex;align-items: center" v-if="(deliverys)" @click="draw" :data-store_id="store_id">
<image v-if="selfpickFlag && canSelfpick" style="width:32rpx;height:32rpx;border-radius:50%"
src="/static/images/ziti.png" />
<view v-else class="border"
style="border-radius:50%;width:26rpx;height:26rpx;border:1px solid #db384c" />
<view style="margin-left:10rpx">{{__('门店自提')}}</view>
</view> -->
<view style="display:flex;align-items: center;" v-if="(delivery)" @click="express">
<image v-if="(addressFlag)" style="width:32rpx;height:32rpx;border-radius:50%" <image v-if="(addressFlag)" style="width:32rpx;height:32rpx;border-radius:50%"
src="/static/images/ziti.png" /> src="/static/images/ziti.png" />
<view v-else class="border" <view v-else class="border"
style="border-radius:50%;width:26rpx;height:26rpx;border:1px solid #db384c" /> style="border-radius:50%;width:26rpx;height:26rpx;border:1px solid #db384c" />
<view style="margin-left:10rpx">{{__('物流配送')}}</view> <view style="margin-left:10rpx">{{__('物流配送')}}</view>
</view> </view>
<view style="display:flex;align-items: center" v-if="(deliverys)" @click="draw" :data-store_id="store_id">
<image v-if="(selfpickFlag)" style="width:32rpx;height:32rpx;border-radius:50%"
src="/static/images/ziti.png" />
<view v-else class="border"
style="border-radius:50%;width:26rpx;height:26rpx;border:1px solid #db384c" />
<view style="margin-left:10rpx">{{__('门店自提')}}</view>
</view>
<view style="display:flex;align-items: center" v-if="false" @click="serve" :data-store_id="store_id"> <view style="display:flex;align-items: center" v-if="false" @click="serve" :data-store_id="store_id">
<image v-if="(storeServeFlag)" style="width:32rpx;height:32rpx;border-radius:50%" <image v-if="(storeServeFlag)" style="width:32rpx;height:32rpx;border-radius:50%"
src="/static/images/ziti.png" /> src="/static/images/ziti.png" />
@ -741,12 +749,13 @@
<payment-box :paymentDataDefault="paymentData" :order_id="order_id" ref="paymentBox" @onCancel="onCancel" <payment-box :paymentDataDefault="paymentData" :order_id="order_id" ref="paymentBox" @onCancel="onCancel"
@onPaid="onPaid" @onFail="onFail"></payment-box> @onPaid="onPaid" @onFail="onFail"></payment-box>
<loginPopup></loginPopup>
</view> </view>
</template> </template>
<script> <script>
import paymentBox from "../../components/payment-box.vue"; import paymentBox from "../../components/payment-box.vue";
import loginPopup from "../../components/loginPopup.vue";
import { mapState, mapMutations } from "vuex"; import { mapState, mapMutations } from "vuex";
export default { export default {
@ -855,6 +864,7 @@ export default {
}, },
components: { components: {
paymentBox, paymentBox,
loginPopup,
}, },
computed: mapState([ computed: mapState([
"Config", "Config",
@ -1039,7 +1049,7 @@ export default {
}, },
RefreshOrder: function (e) { RefreshOrder: function (e) {
this.setData({ this.setData({
ud_id: e.ud_id, ud_id: e.ud_id || e || 0,
chain_id: this.chain_id, chain_id: this.chain_id,
spinfo: e.spid, spinfo: e.spid,
addInfo1: this.addInfo, addInfo1: this.addInfo,
@ -1047,7 +1057,6 @@ export default {
// urlArgsud_id // urlArgsud_id
this.editUrlArgs("ud_id", e.ud_id); this.editUrlArgs("ud_id", e.ud_id);
this.getCartList(); this.getCartList();
}, },
RefreshOrderChain: function (e) { RefreshOrderChain: function (e) {
@ -1250,7 +1259,6 @@ export default {
} }
// params.delivery_type_id = that.selfpickFlag ? 5 : 10; //; //DELIVERY_TYPE_SELF_PICK_UP = 5 // params.delivery_type_id = that.selfpickFlag ? 5 : 10; //; //DELIVERY_TYPE_SELF_PICK_UP = 5
params.is_delivery = that.selfpickFlag ? 0 : 1; // params.is_delivery = that.selfpickFlag ? 0 : 1; //
that.$.request({ that.$.request({
url: this.Config.URL.cart.checkout, url: this.Config.URL.cart.checkout,
data: params, data: params,
@ -1264,6 +1272,7 @@ export default {
that.deliverys = true; that.deliverys = true;
} }
} }
console.log("deliverys", that.deliverys);
that.transportIds = data.transportIds; that.transportIds = data.transportIds;
var ud_id = 0; var ud_id = 0;
@ -1299,7 +1308,6 @@ export default {
}); });
} else { } else {
var item_row = data.items[0].items[0]; var item_row = data.items[0].items[0];
if (that.chain_id) { if (that.chain_id) {
that.drawSelf(item_row.store_id); that.drawSelf(item_row.store_id);
} }
@ -1510,7 +1518,6 @@ export default {
) || null ) || null
); );
}, },
submitorder: function (e) { submitorder: function (e) {
let that = this; let that = this;
if (that.$.isNull(that.order_id)) { if (that.$.isNull(that.order_id)) {
@ -1922,7 +1929,6 @@ export default {
onPaid: function (e) { onPaid: function (e) {
// //
let that = this; let that = this;
that.reloadUserResource(function (user_info) { that.reloadUserResource(function (user_info) {
that.returnUrl(that.order_id); that.returnUrl(that.order_id);
}); });
@ -1933,7 +1939,6 @@ export default {
}, },
returnUrl: function (e) { returnUrl: function (e) {
var that = this; var that = this;
if (that.isFightGroup) { if (that.isFightGroup) {
that.$.gotopage( that.$.gotopage(
"/activity/fightgroup/detail?gb_id=" + that.isFightGroup + "&on=" + e "/activity/fightgroup/detail?gb_id=" + that.isFightGroup + "&on=" + e
@ -2114,6 +2119,7 @@ export default {
storeServeFlag: 0, storeServeFlag: 0,
ud_name: "", ud_name: "",
phone: "", phone: "",
intraCityService: 0,
}); });
this.addressFlag this.addressFlag
@ -2126,7 +2132,12 @@ export default {
this.getCartList(); this.getCartList();
}, },
handerIntraCityService() {
this.intraCityService = 1;
this.addressFlag = 0;
this.selfpickFlag = 0;
this.getCartList();
},
// - // -
draw: function (e) { draw: function (e) {
@ -2136,6 +2147,7 @@ export default {
addressFlag: 0, addressFlag: 0,
selfpickFlag: 1, selfpickFlag: 1,
storeServeFlag: 0, storeServeFlag: 0,
intraCityService: 0,
}); });
this.drawSelf(store_id); this.drawSelf(store_id);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -389,7 +389,7 @@ export default {
current_currency: 86, current_currency: 86,
current_lang: "zh-CN", current_lang: "zh-CN",
current_img: current_img:
"https://static.lancerdt.com/lancerdt/flags/square/5322affbc4d56.png", "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbc4d56.png",
current_label: "中文", current_label: "中文",
}; };
}, },

View File

@ -27,7 +27,7 @@
:style="{ :style="{
background: PageNav.window.navigationBarBackgroundColor, background: PageNav.window.navigationBarBackgroundColor,
}" }"
@click="handerSkipu" @click="handerSkipuSelectShippingAddress"
> >
<text class="iconfontAili icon-dingwei"></text> <text class="iconfontAili icon-dingwei"></text>
<text class="address-block">{{ address }}</text> <text class="address-block">{{ address }}</text>
@ -52,6 +52,7 @@
:rightWidth="rightWidth" :rightWidth="rightWidth"
> >
<block slot="left"> <block slot="left">
<!--
<view <view
class="city" class="city"
v-if=" v-if="
@ -95,6 +96,15 @@
</view> </view>
</block> </block>
</view> </view>
-->
<view class="supermarket-block" @click="handerSkipu">
<uni-icons
type="location"
:color="PageNav.window.navigationBarTextStyle"
size="18"
/>
<view class="supermarket-name">超市入口</view>
</view>
</block> </block>
<view class="input-view"> <view class="input-view">
<uni-icons <uni-icons
@ -108,6 +118,7 @@
class="input" class="input"
type="text" type="text"
:placeholder="__('输入关键词')" :placeholder="__('输入关键词')"
readonly="readonly"
@click="onSearch" @click="onSearch"
/> />
</view> </view>
@ -402,7 +413,7 @@
:y="initY" :y="initY"
> >
<image <image
src="https://static.lancerdt.com/xcxfile/appicon/nav/black/nav_gotop.png" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/nav/black/nav_gotop.png"
:class="isQuickNav ? 'quicknav' : 'hide'" :class="isQuickNav ? 'quicknav' : 'hide'"
@tap="returnTop" @tap="returnTop"
></image> ></image>
@ -497,7 +508,7 @@ export default {
current_lang: "zh-CN", current_lang: "zh-CN",
current_standard: true, current_standard: true,
current_img: current_img:
"https://static.lancerdt.com/lancerdt/flags/square/5322affbc4d56.png", "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbc4d56.png",
current_label: "中文", current_label: "中文",
initX: "690", initX: "690",
@ -519,6 +530,9 @@ export default {
borderColor: "#dfdfdf", borderColor: "#dfdfdf",
fontColor: "#fff", fontColor: "#fff",
backgroundColor: "transparent", backgroundColor: "transparent",
provinceData: [],
cityData: [],
areaData: [],
}; };
}, },
watch: {}, watch: {},
@ -627,6 +641,7 @@ export default {
*/ */
onShow: function () { onShow: function () {
let that = this; let that = this;
this.getAppDistrict();
//that.$.isNull(that.plantformInfo) || uni.setNavigationBarTitle({title: that.plantformInfo.name}); //that.$.isNull(that.plantformInfo) || uni.setNavigationBarTitle({title: that.plantformInfo.name});
//this.refresh || this.setData({refresh: true}) //this.refresh || this.setData({refresh: true})
@ -642,7 +657,7 @@ export default {
if (currentAddress) { if (currentAddress) {
this.address = currentAddress.name; this.address = currentAddress.name;
} else { } else {
// that.isPhoneLocationEnabled(); that.isPhoneLocationEnabled();
} }
that.resetLang(); that.resetLang();
@ -725,11 +740,39 @@ export default {
"getUserInfo", "getUserInfo",
"showCartNum", "showCartNum",
]), ]),
handerSkipu() { handerSkipuSelectShippingAddress() {
uni.navigateTo({ uni.navigateTo({
url: "/address/selectShippingAddress", url: "/address/selectShippingAddress",
}); });
}, },
getAppDistrict() {
let that = this;
// 使
let district_data = uni.getStorageSync("district_data");
if (!district_data) {
that.$.request({
url: that.cf.URL.getAppDistrict,
data: {},
loading: false,
ajaxCache: {
timeout: this.cf.CACHE_EXPIRE,
},
success: function (data, status, msg, code) {
if (status == 200) {
uni.setStorageSync("district_data", data);
that.setDistrictData(data);
}
},
});
} else {
that.setDistrictData(district_data);
}
},
setDistrictData(district_data) {
this.provinceData = district_data.provinceData;
this.cityData = district_data.cityData;
this.areaData = district_data.areaData;
},
isPhoneLocationEnabled() { isPhoneLocationEnabled() {
let _this = this; let _this = this;
// //
@ -752,6 +795,7 @@ export default {
}, },
fail: (err) => { fail: (err) => {
console.log("用户手机系统信息获取失败", err); console.log("用户手机系统信息获取失败", err);
debugger;
}, },
}); });
}, },
@ -871,6 +915,17 @@ export default {
}, },
}); });
}, },
fuzzyMatch(shortStr, longStr) {
if (!shortStr || !longStr) {
console.log("找不到地址");
return;
}
const lowerShortStr = shortStr.toLowerCase();
const lowerLongStr = longStr.toLowerCase();
return lowerShortStr.includes(lowerLongStr);
},
getLocation() { getLocation() {
var that = this; var that = this;
@ -915,16 +970,34 @@ export default {
location = res.latitude + "," + res.longitude; location = res.latitude + "," + res.longitude;
let BMap = new bmap.BMapWX({ let BMap = new bmap.BMapWX({
ak: "rr77afHlUOgaGEtp7z5sVdnjy0CIaIa1", ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
}); });
let fail = function (res) { let fail = function (res) {
console.log("fail", res); console.log("fail", res);
}; };
var city = {
label: "",
value: 0,
};
let success = function (res) { let success = function (res) {
console.log("结果地址", res); console.log("结果地址", res);
let data = res.originalData.result.addressComponent;
that.address = res.originalData.result.sematic_description; that.address = res.originalData.result.sematic_description;
that.cityData.forEach((group) => {
group.forEach((group1) => {
let isFind = that.fuzzyMatch(group1.label, data.city);
if (isFind) {
city = group1;
}
});
});
uni.setStorageSync("district_id", city.value);
}; };
BMap.regeocoding({ BMap.regeocoding({
@ -1149,7 +1222,17 @@ export default {
ajaxCache: { ajaxCache: {
timeout: that.Config.CACHE_EXPIRE, timeout: that.Config.CACHE_EXPIRE,
}, },
success(data) { success(data, msg, status) {
if (!data) {
if (status == 250) {
uni.showToast({
title: "shop/mobile/getCategoryMobileNav" + msg,
icon: "error",
duration: 500,
});
}
return;
}
let tmp = data.items; let tmp = data.items;
tmp.unshift({ tmp.unshift({
id: 0, id: 0,
@ -1350,8 +1433,15 @@ export default {
forceRefresh: force_refresh, forceRefresh: force_refresh,
}, },
success: function (data, status, msg, code) { success: function (data, status, msg, code) {
if (status == 250) {
uni.showToast({
title: "shop/mobile/app" + msg,
icon: "error",
duration: 1000,
});
return;
}
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
let tmp = that.swiperTabItems[index]; let tmp = that.swiperTabItems[index];
tmp = { tmp = {
pageId: data.page_id, pageId: data.page_id,
@ -1947,6 +2037,11 @@ export default {
} }
}); });
}, },
handerSkipu() {
uni.navigateTo({
url: `/member/member/supermarketlList`,
});
},
}, },
}; };
</script> </script>
@ -2009,6 +2104,26 @@ export default {
white-space: nowrap; white-space: nowrap;
} }
.supermarket-name {
color: hsl(190, 100%, 48%);
animation: animate 5s linear alternate infinite;
}
@keyframes animate {
0%,
30%,
70% {
color: hsl(190, 80%, 50%);
text-shadow: none;
}
20%,
40%,
80%,
100% {
color: hsl(0, 0%, 100%);
}
}
.input-view { .input-view {
width: 92%; width: 92%;
display: flex; display: flex;
@ -2080,6 +2195,12 @@ export default {
transform: translate(40%, -20%); transform: translate(40%, -20%);
} }
.supermarket-block {
display: flex;
align-items: center;
font-size: 14px;
}
/* 弹出层形式的广告 */ /* 弹出层形式的广告 */
.uni-banner { .uni-banner {
width: 80%; width: 80%;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -5,26 +5,26 @@
<div ref="item" class="item" :style="boxStyle"> <div ref="item" class="item" :style="boxStyle">
<jVideo v-if="Math.abs(k-i)<=1" :state="item.state" :src="item.video_url" :img="item.cover_url" :boxStyle="boxStyle"></jVideo> <jVideo v-if="Math.abs(k-i)<=1" :state="item.state" :src="item.video_url" :img="item.cover_url" :boxStyle="boxStyle"></jVideo>
<view class="videoHover" v-if="1" @click="cplay(item.state,$event)" :style="boxStyle"> <view class="videoHover" v-if="1" @click="cplay(item.state,$event)" :style="boxStyle">
<image v-if="item.state!='play'" class="playState" src="https://static.lancerdt.com/xcxfile/appicon/video/play_1.png"></image> <image v-if="item.state!='play'" class="playState" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/play_1.png"></image>
</view> </view>
<view class="userInfo"> <view class="userInfo">
<image class="userAvatar cimg" :src="item.cover_url"></image> <image class="userAvatar cimg" :src="item.cover_url"></image>
<text class="right-follow">+</text> <text class="right-follow">+</text>
<view class="like" @click.stop="onLike"> <view class="like" @click.stop="onLike">
<image class="img-left likeIco" :src="item.IsFabulous ? 'https://static.lancerdt.com/xcxfile/appicon/video/img/axc.png' : 'https://static.lancerdt.com/xcxfile/appicon/video/img/bed.png'"/> <image class="img-left likeIco" :src="item.IsFabulous ? 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/axc.png' : 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/bed.png'"/>
<text class="likeNum right-text" :class="{'likeNumActive':item.IsFabulous}">{{item.story_like_count||1}}</text> <text class="likeNum right-text" :class="{'likeNumActive':item.IsFabulous}">{{item.story_like_count||1}}</text>
</view> </view>
<view class="comment" @click.stop="onComment"> <view class="comment" @click.stop="onComment">
<image class="img-left commentIco" src="https://static.lancerdt.com/xcxfile/appicon/video/img/ay2.png"></image> <image class="img-left commentIco" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/ay2.png"></image>
<text class="right-text" style="color: #FFFFFF;">0</text> <text class="right-text" style="color: #FFFFFF;">0</text>
</view> </view>
<view class="share" @click="onShare"> <view class="share" @click="onShare">
<image class="img-left shareIco" src="https://static.lancerdt.com/xcxfile/appicon/video/img/b6p.png"></image> <image class="img-left shareIco" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/b6p.png"></image>
<text class="shareTex right-text">分享</text> <text class="shareTex right-text">分享</text>
</view> </view>
<image src="https://static.lancerdt.com/xcxfile/appicon/video/changpian.png" class="musicIcon cimg"></image> <image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/changpian.png" class="musicIcon cimg"></image>
</view> </view>
<view class="content"> <view class="content">
<text class="userName">@{{item.user_nickname}}-{{i}}++{{k-i}}</text> <text class="userName">@{{item.user_nickname}}-{{i}}++{{k-i}}</text>

File diff suppressed because it is too large Load Diff

View File

@ -35,14 +35,14 @@
<cover-image :src="item.story_file[0]" class="avater img" @click.stop="tapAvater"></cover-image> <cover-image :src="item.story_file[0]" class="avater img" @click.stop="tapAvater"></cover-image>
<text class="right-text-avater">+</text> <text class="right-text-avater">+</text>
<text class="right-text"></text> <text class="right-text"></text>
<cover-image :src="item.IsFabulous?'https://static.lancerdt.com/xcxfile/appicon/video/img/axc.png':'https://static.lancerdt.com/xcxfile/appicon/video/img/bed.png'" class="img" @click.stop="tapLove"></cover-image> <cover-image :src="item.IsFabulous?'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/axc.png':'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/bed.png'" class="img" @click.stop="tapLove"></cover-image>
<text class="right-text">{{item.story_like_count}}</text> <text class="right-text">{{item.story_like_count}}</text>
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/img/ay2.png" class="img" @click.stop="tapMsg"></cover-image> <cover-image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/ay2.png" class="img" @click.stop="tapMsg"></cover-image>
<text class="right-text">{{item.story_comment_count}}</text> <text class="right-text">{{item.story_comment_count}}</text>
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/img/b6p.png" class="img" @click.stop="tapShare"></cover-image> <cover-image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/b6p.png" class="img" @click.stop="tapShare"></cover-image>
<text class="right-text">分享</text> <text class="right-text">分享</text>
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/changpian.png" class="musicIcon img"></cover-image> <cover-image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/changpian.png" class="musicIcon img"></cover-image>
</cover-view> </cover-view>
</div> </div>
</swiper-item> </swiper-item>

File diff suppressed because it is too large Load Diff

View File

@ -1615,7 +1615,8 @@
<mpvue-city-picker :themeColor="themeColor" ref="mpvueCityPicker" :pickerValueDefault="cityPickerValueDefault" @onCancel="onCancel" @onConfirm="onConfirm"></mpvue-city-picker> <mpvue-city-picker :themeColor="themeColor" ref="mpvueCityPicker" :pickerValueDefault="cityPickerValueDefault" @onCancel="onCancel" @onConfirm="onConfirm"></mpvue-city-picker>
<quick-nav @onReturnTop="onReturnTop" @onShareBox="onShareBox" :isquicknav="isquicknav" v-show="selectsp==0"></quick-nav> <quick-nav @onReturnTop="onReturnTop" @onShareBox="onShareBox" :isquicknav="isquicknav" v-show="selectsp==0"></quick-nav>
</view> <loginPopup :show="showLoginPopup" @close="closeLoginPopup"></loginPopup>
</view>
</template> </template>
<script> <script>
@ -1646,7 +1647,7 @@ import uniNumberBox from "@/components/uni-number-box/uni-number-box.vue";
import uniTag from "@/components/uni-tag/uni-tag.vue"; import uniTag from "@/components/uni-tag/uni-tag.vue";
import loading from "@/components/loading.vue"; import loading from "@/components/loading.vue";
import { mapMutations, mapState } from "vuex"; import { mapMutations, mapState } from "vuex";
import loginPopup from "../../components/loginPopup.vue";
var intervalDate; var intervalDate;
var intervalPt; var intervalPt;
var intervalCt; var intervalCt;
@ -1774,7 +1775,7 @@ export default {
Id: 0, Id: 0,
needed_point: 0, needed_point: 0,
cityPickerValueDefault: [0, 0, 0], cityPickerValueDefault: [1, 2, 3],
themeColor: "#007AFF", themeColor: "#007AFF",
product_freight_info: { product_freight_info: {
content: "无货", content: "无货",
@ -1787,6 +1788,7 @@ export default {
url: "", url: "",
is_chain: 0, is_chain: 0,
currentSwipperImageIndex: 1, currentSwipperImageIndex: 1,
showLoginPopup: false,
}; };
}, },
metaInfo() { metaInfo() {
@ -1837,6 +1839,7 @@ export default {
loading, loading,
headerNavMenu, headerNavMenu,
uniPopup, uniPopup,
loginPopup,
}, },
computed: { computed: {
...mapState([ ...mapState([
@ -1885,7 +1888,6 @@ export default {
await this.$onLaunched; await this.$onLaunched;
var that = this; var that = this;
if (options.scene) { if (options.scene) {
var scene = decodeURIComponent(options.scene); var scene = decodeURIComponent(options.scene);
var opts = {}; var opts = {};
@ -1989,6 +1991,8 @@ export default {
clearInterval(intervalCt); clearInterval(intervalCt);
clearInterval(intervalTimeAct); clearInterval(intervalTimeAct);
this.showLoginPopup = false;
if (this.$refs.mpvueCityPicker.showPicker) { if (this.$refs.mpvueCityPicker.showPicker) {
this.$refs.mpvueCityPicker.pickerCancel(); this.$refs.mpvueCityPicker.pickerCancel();
} }
@ -2040,7 +2044,6 @@ export default {
"getUserInfo", "getUserInfo",
"setCartNum", "setCartNum",
]), ]),
// //
createPoster(e) { createPoster(e) {
this.productPoster = e; this.productPoster = e;
@ -2210,7 +2213,6 @@ export default {
that.setData({ that.setData({
product_freight_info: data.product_freight_info, product_freight_info: data.product_freight_info,
}); });
data.item_row.ProductName = data.item_row.product_item_name; data.item_row.ProductName = data.item_row.product_item_name;
data.item_row.ProductTips = data.item_row.product_tips; data.item_row.ProductTips = data.item_row.product_tips;
data.item_row.MarketPrice = Math.max( data.item_row.MarketPrice = Math.max(
@ -2711,6 +2713,12 @@ export default {
}); });
}, },
ckselectsp1: function (e) { ckselectsp1: function (e) {
if (!this.hasLogin) {
this.showLoginPopup = true;
return;
}
// console.log(this)
this.setData({ this.setData({
//change: e.currentTarget.offsetLeft, //change: e.currentTarget.offsetLeft,
selectsp: 1, selectsp: 1,
@ -3939,7 +3947,6 @@ export default {
onConfirm(e) { onConfirm(e) {
let that = this; let that = this;
let district_info = that.$.isNull(e.label.toString()) let district_info = that.$.isNull(e.label.toString())
? that.__("请选择地址") ? that.__("请选择地址")
: e.label.toString(); : e.label.toString();
@ -3993,6 +4000,9 @@ export default {
url: "/activity/giftbag/detail?aid=" + that.ProductInfo.activity_id, url: "/activity/giftbag/detail?aid=" + that.ProductInfo.activity_id,
}); });
}, },
closeLoginPopup() {
this.showLoginPopup = false;
},
}, },
}; };
</script> </script>

View File

@ -125,7 +125,7 @@
:y="returnPos.initY" :y="returnPos.initY"
> >
<image <image
src="https://static.lancerdt.com/xcxfile/appicon/nav/black/nav_gotop.png" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/nav/black/nav_gotop.png"
:class="isQuickNav ? 'quicknav' : 'hide'" :class="isQuickNav ? 'quicknav' : 'hide'"
@tap="returnTop" @tap="returnTop"
></image> ></image>

View File

@ -56,9 +56,9 @@
<cover-view class="right-text"></cover-view> <cover-view class="right-text"></cover-view>
<!-- #endif --> <!-- #endif -->
<cover-image v-if="item.IsFabulous" src="https://static.lancerdt.com/xcxfile/appicon/video/aixinRed.png" class="img" @click.stop="onUnLike" :data-story_id="item.story_id"></cover-image> <cover-image v-if="item.IsFabulous" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/aixinRed.png" class="img" @click.stop="onUnLike" :data-story_id="item.story_id"></cover-image>
<cover-image v-if="!(item.IsFabulous)" src="https://static.lancerdt.com/xcxfile/appicon/video/aixin.png" class="img" @click.stop="onLike" :data-story_id="item.story_id"></cover-image> <cover-image v-if="!(item.IsFabulous)" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/aixin.png" class="img" @click.stop="onLike" :data-story_id="item.story_id"></cover-image>
<!-- #ifdef APP-PLUS-NVUE --> <!-- #ifdef APP-PLUS-NVUE -->
<text class="right-text">{{item.story_like_count}}</text> <text class="right-text">{{item.story_like_count}}</text>
@ -68,7 +68,7 @@
<!-- #endif --> <!-- #endif -->
<block v-if="true"> <block v-if="true">
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/xiaoxi.png" class="img" :data-story_id="item.story_id" :data-user_id="item.user_id" @click.stop="tapMsg"></cover-image> <cover-image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/xiaoxi.png" class="img" :data-story_id="item.story_id" :data-user_id="item.user_id" @click.stop="tapMsg"></cover-image>
<!-- #ifdef APP-PLUS-NVUE --> <!-- #ifdef APP-PLUS-NVUE -->
<text class="right-text">{{item.story_comment_count}}</text> <text class="right-text">{{item.story_comment_count}}</text>
@ -77,7 +77,7 @@
<cover-view class="right-text">{{item.story_comment_count}}</cover-view> <cover-view class="right-text">{{item.story_comment_count}}</cover-view>
<!-- #endif --> <!-- #endif -->
<block v-if="false"> <block v-if="false">
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/share-fill.png" class="img" @click.stop="tapShare"></cover-image> <cover-image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/share-fill.png" class="img" @click.stop="tapShare"></cover-image>
<!-- #ifdef APP-PLUS-NVUE --> <!-- #ifdef APP-PLUS-NVUE -->
<text class="right-text">{{__('分享')}}</text> <text class="right-text">{{__('分享')}}</text>
@ -88,7 +88,7 @@
</block> </block>
</block> </block>
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/changpian.png" class="musicIcon img" v-if="false"></cover-image> <cover-image src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/changpian.png" class="musicIcon img" v-if="false"></cover-image>
</cover-view> </cover-view>
</div> </div>

View File

@ -1,324 +1,368 @@
<template name="zy-search"> <template name="zy-search">
<view> <view>
<view class="search"> <view class="search">
<slot></slot> <slot></slot>
<!-- 使用$emit触发实例上(父组件)的自定义方法并传入参数 --> <!-- 使用$emit触发实例上(父组件)的自定义方法并传入参数 -->
<!-- <button type="primary" @click="$emit('test','block')">方形</button> --> <!-- <button type="primary" @click="$emit('test','block')">方形</button> -->
<!-- sync双向数据绑定语法糖 --> <!-- sync双向数据绑定语法糖 -->
<!-- <button type="primary" @click="changeStyle">双向数据绑定改变style</button> --> <!-- <button type="primary" @click="changeStyle">双向数据绑定改变style</button> -->
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<image src="https://static.lancerdt.com/xcxfile/appicon/zy-search/voice.svg" mode="aspectFit" @click="startRecognize()" class="voice-icon"></image> <image
<!-- #endif --> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/zy-search/voice.svg"
<template v-if="isFocus"> mode="aspectFit"
<input maxlength="20" focus type="text" value="" confirm-type="search" @confirm="searchStart()" :placeholder="__('请输入关键词搜索')" v-model.trim="searchText"/> @click="startRecognize()"
</template> class="voice-icon"
<template v-else> ></image>
<input maxlength="20" type="text" value="" confirm-type="search" @confirm="searchStart()" :placeholder="__('请输入关键词搜索')" v-model.trim="searchText"/> <!-- #endif -->
</template> <template v-if="isFocus">
<image src="https://static.lancerdt.com/xcxfile/appicon/zy-search/search.svg" mode="aspectFit" @click="searchStart()" class="search-icon"></image> <input
</view> maxlength="20"
<view :class="'s-' + theme" v-if="hList.length > 0"> focus
<view class="header"> type="text"
{{__('历史记录')}} value=""
<image src="https://static.lancerdt.com/xcxfile/appicon/zy-search/delete.svg" mode="aspectFit" @click="delhistory"></image> confirm-type="search"
</view> @confirm="searchStart()"
<view class="list"> :placeholder="__('请输入关键词搜索')"
<view v-for="(item,index) in hList" :key="index" @click="keywordsClick(item)">{{item}}</view> v-model.trim="searchText"
</view> />
</view> </template>
<view :class="'wanted-' + theme" v-if="showWant"> <template v-else>
<view class="header">{{__('猜你想搜的')}}</view> <input
<view class="list"> maxlength="20"
<view v-for="(item,index) in hotList" :key="index" @click="keywordsClick(item)">{{item}}</view> type="text"
</view> value=""
</view> confirm-type="search"
</view> @confirm="searchStart()"
:placeholder="__('请输入关键词搜索')"
v-model.trim="searchText"
/>
</template>
<image
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/zy-search/search.svg"
mode="aspectFit"
@click="searchStart()"
class="search-icon"
></image>
</view>
<view :class="'s-' + theme" v-if="hList.length > 0">
<view class="header">
{{ __("历史记录") }}
<image
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/zy-search/delete.svg"
mode="aspectFit"
@click="delhistory"
></image>
</view>
<view class="list">
<view
v-for="(item, index) in hList"
:key="index"
@click="keywordsClick(item)"
>{{ item }}</view
>
</view>
</view>
<view :class="'wanted-' + theme" v-if="showWant">
<view class="header">{{ __("猜你想搜的") }}</view>
<view class="list">
<view
v-for="(item, index) in hotList"
:key="index"
@click="keywordsClick(item)"
>{{ item }}</view
>
</view>
</view>
</view>
</template> </template>
<script> <script>
export default{ export default {
name:"zy-search", name: "zy-search",
props:{ props: {
isFocus:{ // isFocus: {
type: Boolean, //
default: false type: Boolean,
}, default: false,
theme:{ // },
type: String, theme: {
default: 'block' //
}, type: String,
showWant:{ // default: "block",
type: Boolean, },
default: false showWant: {
}, //
hotList: { // type: Boolean,
type: Array, default: false,
default () { },
return [] hotList: {
} //
}, type: Array,
searchHisList: { default() {
type: Array, return [];
default () { },
return [] },
} searchHisList: {
}, type: Array,
suggestText: { default() {
type: String, return [];
default: '' },
}, },
suggestText: {
type: String,
default: "",
},
speechEngine: { //=>:iFly,:'baidu' speechEngine: {
type: String, //=>:iFly,:'baidu'
default: 'baidu' type: String,
} default: "baidu",
}, },
data() { },
return { data() {
searchText:'', // return {
hList:[] // searchText: "", //
}; hList: [], //
}, };
created() { },
var that = this; created() {
setTimeout(()=>{ var that = this;
this.setData({ setTimeout(() => {
searchText: this.suggestText this.setData({
}); searchText: this.suggestText,
});
if (this.searchHisList.length > 0) if (this.searchHisList.length > 0) {
{ //this.hList = this.searchHisList;
//this.hList = this.searchHisList; this.hList = uni.getStorageSync("search_cache");
this.hList = uni.getStorageSync('search_cache'); } else {
} this.hList = uni.getStorageSync("search_cache");
else }
{ }, 200);
this.hList = uni.getStorageSync('search_cache'); },
} methods: {
}, 200) searchStart: function () {
}, //
methods: { let _this = this;
searchStart: function() { // if (_this.searchText == "") {
let _this = this; uni.showToast({
if (_this.searchText == '') { title: _this.__("请输入关键字"),
uni.showToast({ icon: "none",
title: _this.__('请输入关键字'), duration: 1000,
icon: 'none', });
duration: 1000 } else {
}); uni.getStorage({
}else{ key: "search_cache",
success(res) {
uni.getStorage({ let list = res.data;
key:'search_cache', let t = true;
success(res){ if (list.length > 5) {
let list = res.data; for (let item of list) {
let t = true; if (item == _this.searchText) {
if(list.length > 5){ return;
for(let item of list){ }
if(item == _this.searchText){ }
return; list.pop();
} list.unshift(_this.searchText);
} } else {
list.pop(); for (let item of list) {
list.unshift(_this.searchText); if (item == _this.searchText) {
}else{ t = false;
for(let item of list){ }
if(item == _this.searchText){ }
t = false; if (t) {
} list.unshift(_this.searchText);
} }
if(t) }
{ _this.hList = list;
list.unshift(_this.searchText); uni.setStorage({
} key: "search_cache",
data: _this.hList,
} });
_this.hList = list; _this.$emit("getSearchText", _this.searchText);
uni.setStorage({ },
key: 'search_cache', fail() {
data: _this.hList _this.hList = [];
}); _this.hList.push(_this.searchText);
_this.$emit('getSearchText', _this.searchText); uni.setStorage({
}, key: "search_cache",
fail() { data: _this.hList,
_this.hList = []; });
_this.hList.push(_this.searchText); _this.$emit("getSearchText", _this.searchText);
uni.setStorage({ },
key: 'search_cache', });
data: _this.hList }
}); },
_this.$emit('getSearchText', _this.searchText); keywordsClick(item) {
} //
}) this.searchText = item;
} this.$emit("getSearchText", item);
}, },
keywordsClick (item) { // delhistory() {
this.searchText = item; //
this.$emit('getSearchText', item); this.hList = [];
}, uni.setStorage({
delhistory () { // key: "search_cache",
this.hList = []; data: [],
uni.setStorage({ });
key: 'search_cache', },
data: [] startRecognize: function () {
}); //
}, let _this = this;
startRecognize: function() { // let options = {};
let _this = this; options.engine = _this.speechEngine;
let options = {}; options.punctuation = false; //
options.engine = _this.speechEngine; options.timeout = 10 * 1000;
options.punctuation = false; // plus.speech.startRecognize(options, function (s) {
options.timeout = 10 * 1000; _this.searchText = _this.searchText + s;
plus.speech.startRecognize(options, function(s) { });
_this.searchText = _this.searchText + s; },
}); },
} };
}
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.search{ .search {
width: 640rpx; width: 640rpx;
margin: 30rpx auto 0; margin: 30rpx auto 0;
position: relative; position: relative;
input{ input {
background-color: #F7F7F7; background-color: #f7f7f7;
padding: 10rpx 74rpx; padding: 10rpx 74rpx;
font-size: 28rpx; font-size: 28rpx;
border-radius: 50rpx; border-radius: 50rpx;
height: 88rpx; height: 88rpx;
} }
.voice-icon{ .voice-icon {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
padding: 16rpx 20rpx 16rpx 0; padding: 16rpx 20rpx 16rpx 0;
position: absolute; position: absolute;
left: 16rpx; left: 16rpx;
top: 4rpx; top: 4rpx;
z-index: 10; z-index: 10;
} }
.search-icon{ .search-icon {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
padding: 16rpx 20rpx 16rpx 0; padding: 16rpx 20rpx 16rpx 0;
position: absolute; position: absolute;
right: 10rpx; right: 10rpx;
top: 20rpx; top: 20rpx;
z-index: 10; z-index: 10;
} }
} }
.s-block{ .s-block {
margin-top: 30rpx; margin-top: 30rpx;
.header{ .header {
font-size: 32rpx; font-size: 32rpx;
padding: 30rpx; padding: 30rpx;
position: relative; position: relative;
image{ image {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
padding: 10rpx; padding: 10rpx;
position: absolute; position: absolute;
right: 40rpx; right: 40rpx;
top: 24rpx; top: 24rpx;
} }
} }
.list{ .list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
view{ view {
width: 50%; width: 50%;
color: #8A8A8A; color: #8a8a8a;
font-size: 28rpx; font-size: 28rpx;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
padding: 20rpx 0; padding: 20rpx 0;
border-top: 2rpx solid #FFF; border-top: 2rpx solid #fff;
border-left: 2rpx solid #FFF; border-left: 2rpx solid #fff;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
background-color: #F7F7F7; background-color: #f7f7f7;
} }
} }
} }
.s-circle{ .s-circle {
margin-top: 30rpx; margin-top: 30rpx;
.header{ .header {
font-size: 32rpx; font-size: 32rpx;
padding: 30rpx; padding: 30rpx;
border-bottom: 2rpx solid #F9F9F9; border-bottom: 2rpx solid #f9f9f9;
position: relative; position: relative;
image{ image {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
padding: 10rpx; padding: 10rpx;
position: absolute; position: absolute;
right: 40rpx; right: 40rpx;
top: 24rpx; top: 24rpx;
} }
} }
.list{ .list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 30rpx 20rpx; padding: 0 30rpx 20rpx;
view{ view {
padding: 8rpx 30rpx; padding: 8rpx 30rpx;
margin: 20rpx 30rpx 0 0; margin: 20rpx 30rpx 0 0;
font-size: 28rpx; font-size: 28rpx;
color: #8A8A8A; color: #8a8a8a;
background-color: #F7F7F7; background-color: #f7f7f7;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
border-radius: 20rpx; border-radius: 20rpx;
} }
} }
} }
.wanted-block{ .wanted-block {
margin-top: 30rpx; margin-top: 30rpx;
.header{ .header {
font-size: 32rpx; font-size: 32rpx;
padding: 30rpx; padding: 30rpx;
} }
.list{ .list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
view{ view {
width: 50%; width: 50%;
color: #8A8A8A; color: #8a8a8a;
font-size: 28rpx; font-size: 28rpx;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
padding: 20rpx 0; padding: 20rpx 0;
border-top: 2rpx solid #FFF; border-top: 2rpx solid #fff;
border-left: 2rpx solid #FFF; border-left: 2rpx solid #fff;
background-color: #F7F7F7; background-color: #f7f7f7;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
} }
.wanted-circle{ .wanted-circle {
margin-top: 30rpx; margin-top: 30rpx;
.header{ .header {
font-size: 32rpx; font-size: 32rpx;
padding: 30rpx; padding: 30rpx;
} }
.list{ .list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 30rpx 20rpx; padding: 0 30rpx 20rpx;
view{ view {
padding: 8rpx 30rpx; padding: 8rpx 30rpx;
margin: 20rpx 30rpx 0 0; margin: 20rpx 30rpx 0 0;
font-size: 28rpx; font-size: 28rpx;
color: #8A8A8A; color: #8a8a8a;
background-color: #F7F7F7; background-color: #f7f7f7;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
border-radius: 20rpx; border-radius: 20rpx;
} }
} }
} }
</style> </style>

View File

@ -3,7 +3,11 @@
<view class="header member-top"> <view class="header member-top">
<view class="header-top hide"> <view class="header-top hide">
<image <image
:src="plantformInfo.site_pc_logo || 'https://www.suteshop.com/site/static/src/default/images/landing/bbc.jpg'"></image> :src="
plantformInfo.site_pc_logo ||
'https://www.suteshop.com/site/static/src/default/images/landing/bbc.jpg'
"
></image>
</view> </view>
<view class="header-bottom"> <view class="header-bottom">
<text>{{ plantformInfo.site_name }}</text> <text>{{ plantformInfo.site_name }}</text>
@ -12,59 +16,60 @@
<image :src="plantformInfo.site_mobile_logo"></image> <image :src="plantformInfo.site_mobile_logo"></image>
</view> </view>
</view> </view>
<view style="padding: 10px;"> <view style="padding: 10px">
<view class="introduce"> <view class="introduce">
<!--<view class="title">店铺介绍</view>--> <!--<view class="title">店铺介绍</view>-->
<view class="text">{{ plantformInfo.site_meta_description || "" }}</view> <view class="text">{{
plantformInfo.site_meta_description || ""
}}</view>
</view> </view>
<view class="message"> <view class="message">
<view class="peoplename aboutUs"> <view class="peoplename aboutUs">
<view>{{ __('公司名称') }}</view> <view>{{ __("公司名称") }}</view>
<label>{{ plantformInfo.site_company_name }}</label> <label>{{ plantformInfo.site_company_name }}</label>
</view> </view>
<view class="tel aboutUs" bindtap="call"> <view class="tel aboutUs" bindtap="call">
<view>{{ __('联系方式') }}</view> <view>{{ __("联系方式") }}</view>
<image src="https://static.lancerdt.com/xcxfile/appicon/images/call.png" <image
style="width:30rpx;height:30rpx;margin-right:10rpx"></image> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/call.png"
<label style="width: 30rpx; height: 30rpx; margin-right: 10rpx"
style="color:#17abe3">{{ plantformInfo.site_tel }}</label> ></image>
<label style="color: #17abe3">{{ plantformInfo.site_tel }}</label>
</view> </view>
<view class="address aboutUs"> <view class="address aboutUs">
<view>{{ __('公司地址') }}</view> <view>{{ __("公司地址") }}</view>
<label>{{ plantformInfo.site_address }}</label> <label>{{ plantformInfo.site_address }}</label>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import {mapMutations, mapState} from 'vuex'; import { mapMutations, mapState } from "vuex";
export default { export default {
data() { data() {
return {}; return {};
}, },
computed: mapState([ computed: mapState([
'Config', "Config",
'StateCode', "StateCode",
'notice', "notice",
'plantformInfo', "plantformInfo",
'shopInfo', "shopInfo",
'userInfo', "userInfo",
'hasLogin' "hasLogin",
]), ]),
async onLoad(options) { async onLoad(options) {
await this.$onLaunched; await this.$onLaunched;
let that = this; let that = this;
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.__('关于我们') title: this.__("关于我们"),
}); });
this.getPlantformInfo(function (plantformInfo) { this.getPlantformInfo(function (plantformInfo) {});
});
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
var that = this; var that = this;
@ -79,24 +84,30 @@ export default {
*/ */
} else { } else {
uni.showToast({ uni.showToast({
title: '你点了收藏按钮', title: "你点了收藏按钮",
icon: 'none' icon: "none",
}); });
} }
}, },
methods: { methods: {
...mapMutations(['login', 'logout', 'getPlantformInfo', 'forceUserInfo', 'getUserInfo']), ...mapMutations([
"login",
"logout",
"getPlantformInfo",
"forceUserInfo",
"getUserInfo",
]),
call: function () { call: function () {
this.$.makePhoneCall({ this.$.makePhoneCall({
phoneNumber: this.data.plantformInfo.LegalNumber phoneNumber: this.data.plantformInfo.LegalNumber,
}); });
} },
} },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import '../../styles/_variables.scss'; @import "../../styles/_variables.scss";
.body { .body {
background: #f8f8f8; background: #f8f8f8;
@ -186,15 +197,14 @@ export default {
.message .aboutUs label { .message .aboutUs label {
color: #717171; color: #717171;
flex:1; flex: 1;
} }
.member-top { .member-top {
-webkit-animation: changeBg 20s infinite; -webkit-animation: changeBg 20s infinite;
animation: changeBg 20s infinite; animation: changeBg 20s infinite;
background-color: #f30213; background-color: #f30213;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZ4AAADhBAMAAAAKUc6cAAAAD1BMVEX///////9MaXH////////RWIOUAAAABXRSTlMiEQAzRBQVqpYAAAlZSURBVHhezNpRkpswDAZged0DyOQCDSdwxnuAzmzuf6aGJuEvGEsWIpvVSx8AO59/YWCnNN7qNy1qvFfqqFGu9LIq96p+OE3TMi1qGG91TskLqsdgCvd/iMIhnrzpoWV96ByUJR6a6p+GvKK4EVB4eM6VBxwXqEpnWR7PqdSgj4bnAo4HtB6FqjrCk1eeejsoF+N93OEBJ+ZDQFzqgIZNTyyXZKuho914Hh0eF6jUAY1bnlhKTseAtpptfQu7Gw7jhU1P2eFJWrshHszvDIirgAZ4Fhz0W38pHnDg8QZU1gGNG5640zOI7Ybh62fgAQ2X592t2q8LPG7QxnMH02sBMY52BjTOnnG5fmVXDwjthuHhkQOqjusBfWx5CjzugM6NeEpRPLhAySgioGlzg4eX86Vd1fSQ7AkCRwEhIBpmDzaEhzenfdXwsOYROAqIZ8/EgeeM6bAdeDuu/n1x00MaR2+5ezrwjPz/dGlvae2me8DRQRh+Wkl45oYraDd/QIhH9QThJRxosdaekTBbaD4NVJAYDxZM8BDtAg1rz2/p7sES9weUDB612/QXo7Vn5Pbmxt2jpjoe1j0kxYOyeUZucSzLNAjxqB7g7QENlWdkKpnkdHRQj4eaHiJ3QFS1SM2xrxPazeJhIndA8KTNMq7TUL2KGjyklMlzFjjGjjsnyZNpXYjHERA8QjxsH/c8jNX1igd2f0AkxmMZV7++0W4Euysg3cPyuHrx2zyGeAyeVHtyy0N0RMORIR6Uw0N1YTJXQEaPv+Ei4qk9dJDH0m6o3R4SPf6GI0s8/obLrUXnN3jcDYd4BI+v4cjQbu4dLpLebs53OJIfpv6G0xfeEA/Rfg/7PX0rj5OcnvT0JLsnHAYKlngovN0DUOBXedBwpN4+fg/+PCS025s9lIyg1pjB4FHnvXuSw2OrjdeEB7dcv/IhnlY8/ALP+qsbD9PP662y2zNMnvRdHp49AN2d8TrV1yGes+yx35gkxQNPwShTPAjI4Uk3TzrWw81jvPLMJ/IUDwJybazw+j24TIgnwvM8kX9dH/XzPMLBFSdjt/58evKLPKSU1lMk7wbw0M/2sHCU7/Gg4Lk+688P8+Cw/PBBQMHuCfxdHuEw4kEZPahv8nBjThwslYde7cHk2eqhfg8azrAfOD3FOCaLXrTbmzyxiKM348mP6zQPbiD6hfeDV+ZTTGMynv8tT2l4qPv2id/uITwq6xFXle8e7n4fjSXbPVjNbPHMUy4DiiWLHsL3gh7PvAR7PFEKKIgerGK8Lf1F9VBU7x78Iocn93t44ZlPKdO66x6ikkmtstvD8Jhvn6meZp48X0HziOX3YHqv5zR5rpqH+zjxdZ6QpH5Dw50+J89F9HQHhCusHtxAHg8d64leD7U9qcsTJo/SbwEXv86D+V0eTjxxvkLr/cDkwRV7PbEU+8fCwpOmfP7I72+dDRcdHjScEI/kmd2nKZ4f44luT6JCyvdCZ8Phil0epvZTO0ieuPDo33M6yO9BQFo8KEyMbbHv7wfweNsNHv//DsHM8IgfdHkx1hs9/eeLf69ansG+dtM9SeXoniA0XF4N1uEhu0cPKBj8IayHA2g9mLPddE+ycRILHgwHTrUBap5s9ugB2fyB6uHAWY2menCF2YMZQurlJJY9Cb8NYfd65nj+cndvuY3DMBRAL+ENkO0K7BWM0f3vbYCZD6KoI4rio2r57xgnV46lKGaWPbrXxrNf7vPYw+Ow2fAg7BEG9FQgMWvoEeNanPFIyCMg8ZUrAceWoA63kEdsz9g00nq2Nf5z4h67XPtaxpp94IG+XL9HJoYULew70Xd5WD3GDmvyj1IgtSBjR98HomIPAAskzjLiKfX8m1ONPSSJIIp77JY+98BDCx4OxSPxBh6DN5qYJArSOSTVet6tx9eZSUgSQCSinAXP3HA99Hnv7Hr8wawseqBFU/1VMgTWbZchax6eXo1meuwf0tGaB/B7SDYqDDnAj/bgd3nwezz+TiTqkU09cHlkdw8eK+l+2u9hp0fnO3t6/FP0+HDjIz1eWPFYAd3hno5U4YHTo+u5eI/XAg8vrQgZlNFC9M73BFa4CQ0Q0z2M56rksHoo39Mfz6GeO9vTG48ON+8ngr1zg/Z41KPl0Gi5PVJ8+WiRQ6NFhqc1nnenB0/1wpP7RCb5PfeiBw5P4KtNyvcwLJB6eI7uOGWfB7MeCnCA9OuHMQfCKZLCEWe67PMAcyBcz3Y/p8Lj7xSJ6xTOu3i0ku+njDkQrks4zhH/Sxy++Q4G9cnzEFDKpo3jA+EOeuhzPiIcnRcMTpK0XmAbpB4Rdzj2yaYH3B+JevDFwwGNCFY87FvOwQhIPbFanzAdGk/UgzRPZL1xKCc64KjBM3XXp6S+UZmeeA+YuId+nIe7PIwdAir29AfU4EGjB2keYIsBR9me/oD6PaC+gBI9TRFxh4cxU1QfEKV52kTc66kfeROes80DqgVleTpBvJUHpQFRmacfpJ4rfoLeEVfu6Qb1e0bdBqQMRPJW6TmePVQGItF+xLmeYTsVKQKR5Hj4FeejcCr3/LLaz7vRg5K5tkiWRwZP9A4Cyo2IEj38wgPDk/vYoXrO7IDMbl7Zlezhp3gOvCyq9VwSLSOebs+ZB1IPBrW1R0Ek6sF3eN70/38SCqIeo7tssecs/UKp36MBNS0efoqHN/AEB9y5Vz7BgPTdcAVE1Z5z7fivR2/iuQKcTyDexHMtcbScAdV7zpVL5+nwTTzXSjhPCfEmnmtNo7WD5297d4ycMBAEUdS+gXZusP/+h7SzDWzRBPojoVIXCSTUq54dNhIkUNaszPdB4v369RGqPx+zn3ktD+xXMde7CLqOhzxYZNB2HQ9kTS7oIp48WjnpBPV7crLn+x6etSNP8dS7nsezXdPzeDjRw+PJOer/YB9PLY+7EO7vGR/nGf0eFA839Wztx+c8z7A9/gHyPcieTRm3fg8jFaRwSvdsSj39npke8qWE5fEL8jmlehbI5/ieuQ/ahhRED/8/0uj3paVUzxwrwo5u9zC6g+uZzZwKHreg48UEj1rQ8RWW7iF897EggscsSDhkFTwiqIw1SPCIE2fs9QoeEQQCiODxQMovFcHjgZS7RAWPthTKuUwQPFZF0nWP4BFjiBA87g9wzcARPBqpXpeH4NFMFccR0dM/jYXo6ReB5+kXgeXpNxW7+QGaJMQFymoTmAAAAABJRU5ErkJggg=='); background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZ4AAADhBAMAAAAKUc6cAAAAD1BMVEX///////9MaXH////////RWIOUAAAABXRSTlMiEQAzRBQVqpYAAAlZSURBVHhezNpRkpswDAZged0DyOQCDSdwxnuAzmzuf6aGJuEvGEsWIpvVSx8AO59/YWCnNN7qNy1qvFfqqFGu9LIq96p+OE3TMi1qGG91TskLqsdgCvd/iMIhnrzpoWV96ByUJR6a6p+GvKK4EVB4eM6VBxwXqEpnWR7PqdSgj4bnAo4HtB6FqjrCk1eeejsoF+N93OEBJ+ZDQFzqgIZNTyyXZKuho914Hh0eF6jUAY1bnlhKTseAtpptfQu7Gw7jhU1P2eFJWrshHszvDIirgAZ4Fhz0W38pHnDg8QZU1gGNG5640zOI7Ybh62fgAQ2X592t2q8LPG7QxnMH02sBMY52BjTOnnG5fmVXDwjthuHhkQOqjusBfWx5CjzugM6NeEpRPLhAySgioGlzg4eX86Vd1fSQ7AkCRwEhIBpmDzaEhzenfdXwsOYROAqIZ8/EgeeM6bAdeDuu/n1x00MaR2+5ezrwjPz/dGlvae2me8DRQRh+Wkl45oYraDd/QIhH9QThJRxosdaekTBbaD4NVJAYDxZM8BDtAg1rz2/p7sES9weUDB612/QXo7Vn5Pbmxt2jpjoe1j0kxYOyeUZucSzLNAjxqB7g7QENlWdkKpnkdHRQj4eaHiJ3QFS1SM2xrxPazeJhIndA8KTNMq7TUL2KGjyklMlzFjjGjjsnyZNpXYjHERA8QjxsH/c8jNX1igd2f0AkxmMZV7++0W4Euysg3cPyuHrx2zyGeAyeVHtyy0N0RMORIR6Uw0N1YTJXQEaPv+Ei4qk9dJDH0m6o3R4SPf6GI0s8/obLrUXnN3jcDYd4BI+v4cjQbu4dLpLebs53OJIfpv6G0xfeEA/Rfg/7PX0rj5OcnvT0JLsnHAYKlngovN0DUOBXedBwpN4+fg/+PCS025s9lIyg1pjB4FHnvXuSw2OrjdeEB7dcv/IhnlY8/ALP+qsbD9PP662y2zNMnvRdHp49AN2d8TrV1yGes+yx35gkxQNPwShTPAjI4Uk3TzrWw81jvPLMJ/IUDwJybazw+j24TIgnwvM8kX9dH/XzPMLBFSdjt/58evKLPKSU1lMk7wbw0M/2sHCU7/Gg4Lk+688P8+Cw/PBBQMHuCfxdHuEw4kEZPahv8nBjThwslYde7cHk2eqhfg8azrAfOD3FOCaLXrTbmzyxiKM348mP6zQPbiD6hfeDV+ZTTGMynv8tT2l4qPv2id/uITwq6xFXle8e7n4fjSXbPVjNbPHMUy4DiiWLHsL3gh7PvAR7PFEKKIgerGK8Lf1F9VBU7x78Iocn93t44ZlPKdO66x6ikkmtstvD8Jhvn6meZp48X0HziOX3YHqv5zR5rpqH+zjxdZ6QpH5Dw50+J89F9HQHhCusHtxAHg8d64leD7U9qcsTJo/SbwEXv86D+V0eTjxxvkLr/cDkwRV7PbEU+8fCwpOmfP7I72+dDRcdHjScEI/kmd2nKZ4f44luT6JCyvdCZ8Phil0epvZTO0ieuPDo33M6yO9BQFo8KEyMbbHv7wfweNsNHv//DsHM8IgfdHkx1hs9/eeLf69ansG+dtM9SeXoniA0XF4N1uEhu0cPKBj8IayHA2g9mLPddE+ycRILHgwHTrUBap5s9ugB2fyB6uHAWY2menCF2YMZQurlJJY9Cb8NYfd65nj+cndvuY3DMBRAL+ENkO0K7BWM0f3vbYCZD6KoI4rio2r57xgnV46lKGaWPbrXxrNf7vPYw+Ow2fAg7BEG9FQgMWvoEeNanPFIyCMg8ZUrAceWoA63kEdsz9g00nq2Nf5z4h67XPtaxpp94IG+XL9HJoYULew70Xd5WD3GDmvyj1IgtSBjR98HomIPAAskzjLiKfX8m1ONPSSJIIp77JY+98BDCx4OxSPxBh6DN5qYJArSOSTVet6tx9eZSUgSQCSinAXP3HA99Hnv7Hr8wawseqBFU/1VMgTWbZchax6eXo1meuwf0tGaB/B7SDYqDDnAj/bgd3nwezz+TiTqkU09cHlkdw8eK+l+2u9hp0fnO3t6/FP0+HDjIz1eWPFYAd3hno5U4YHTo+u5eI/XAg8vrQgZlNFC9M73BFa4CQ0Q0z2M56rksHoo39Mfz6GeO9vTG48ON+8ngr1zg/Z41KPl0Gi5PVJ8+WiRQ6NFhqc1nnenB0/1wpP7RCb5PfeiBw5P4KtNyvcwLJB6eI7uOGWfB7MeCnCA9OuHMQfCKZLCEWe67PMAcyBcz3Y/p8Lj7xSJ6xTOu3i0ku+njDkQrks4zhH/Sxy++Q4G9cnzEFDKpo3jA+EOeuhzPiIcnRcMTpK0XmAbpB4Rdzj2yaYH3B+JevDFwwGNCFY87FvOwQhIPbFanzAdGk/UgzRPZL1xKCc64KjBM3XXp6S+UZmeeA+YuId+nIe7PIwdAir29AfU4EGjB2keYIsBR9me/oD6PaC+gBI9TRFxh4cxU1QfEKV52kTc66kfeROes80DqgVleTpBvJUHpQFRmacfpJ4rfoLeEVfu6Qb1e0bdBqQMRPJW6TmePVQGItF+xLmeYTsVKQKR5Hj4FeejcCr3/LLaz7vRg5K5tkiWRwZP9A4Cyo2IEj38wgPDk/vYoXrO7IDMbl7Zlezhp3gOvCyq9VwSLSOebs+ZB1IPBrW1R0Ek6sF3eN70/38SCqIeo7tssecs/UKp36MBNS0efoqHN/AEB9y5Vz7BgPTdcAVE1Z5z7fivR2/iuQKcTyDexHMtcbScAdV7zpVL5+nwTTzXSjhPCfEmnmtNo7WD5297d4ycMBAEUdS+gXZusP/+h7SzDWzRBPojoVIXCSTUq54dNhIkUNaszPdB4v369RGqPx+zn3ktD+xXMde7CLqOhzxYZNB2HQ9kTS7oIp48WjnpBPV7crLn+x6etSNP8dS7nsezXdPzeDjRw+PJOer/YB9PLY+7EO7vGR/nGf0eFA839Wztx+c8z7A9/gHyPcieTRm3fg8jFaRwSvdsSj39npke8qWE5fEL8jmlehbI5/ieuQ/ahhRED/8/0uj3paVUzxwrwo5u9zC6g+uZzZwKHreg48UEj1rQ8RWW7iF897EggscsSDhkFTwiqIw1SPCIE2fs9QoeEQQCiODxQMovFcHjgZS7RAWPthTKuUwQPFZF0nWP4BFjiBA87g9wzcARPBqpXpeH4NFMFccR0dM/jYXo6ReB5+kXgeXpNxW7+QGaJMQFymoTmAAAAABJRU5ErkJggg==");
background-size: cover; background-size: cover;
text-align: center; text-align: center;
width: 100%; width: 100%;
@ -291,5 +301,4 @@ export default {
background-color: #ec87bf; background-color: #ec87bf;
} }
} }
</style> </style>

File diff suppressed because it is too large Load Diff

View File

@ -1,467 +1,507 @@
<template> <template>
<view class="news-edit"> <view class="news-edit">
<view class="m-cell"> <view class="m-cell">
<view class="m-cell-hd">内容</view> <view class="m-cell-hd">内容</view>
<view class="m-cell-bd"> <view class="m-cell-bd">
<textarea <textarea
class="input" class="input"
name="text" name="text"
v-model="formData.category_content" v-model="formData.category_content"
placeholder-class="placeholder" placeholder-class="placeholder"
></textarea> ></textarea>
</view> </view>
</view> </view>
<view class="m-cell"> <view class="m-cell">
<view class="m-cell-hd">关键字</view> <view class="m-cell-hd">关键字</view>
<view class="m-cell-bd"> <view class="m-cell-bd">
<input <input
class="input input-1" class="input input-1"
placeholder-class="placeholder" placeholder-class="placeholder"
type="text" type="text"
v-model="formData.message_keywords" v-model="formData.message_keywords"
/> />
</view> </view>
</view> </view>
<view class="m-cell"> <view class="m-cell">
<view class="m-cell-hd">分类</view> <view class="m-cell-hd">分类</view>
<view class="m-cell-bd"> <view class="m-cell-bd">
<select name="public-choice" class="input input-1" v-model="formData.category_id" @change="getCouponSelected"> <select
<option value="">请选择</option> name="public-choice"
<option :value="item.category_id" v-for="item in category" >{{item.category_name}}</option> class="input input-1"
</select> v-model="formData.category_id"
</view> @change="getCouponSelected"
</view> >
<view class="m-cell"> <option value="">请选择</option>
<view class="m-cell-hd">区域</view> <option :value="item.category_id" v-for="item in category">
<view class="m-cell-bd"> {{ item.category_name }}
<select name="public-choice" class="input input-1" v-model="formData.message_area" @change="getCouponSelected"> </option>
<option value="">请选择</option> </select>
<option :value="item.id" v-for="item in area" >{{item.category_name}}</option> </view>
</select> </view>
</view> <view class="m-cell">
</view> <view class="m-cell-hd">区域</view>
<view class="m-cell m-cell-select-before" @click="showbox"> <view class="m-cell-bd">
<view class="m-cell-hd">//</view> <select
<view class="m-cell-bd"> name="public-choice"
<label>{{seladstr}}</label> class="input input-1"
</view> v-model="formData.message_area"
</view> @change="getCouponSelected"
<view class="m-cell"> >
<view class="m-cell-hd">详细地址</view> <option value="">请选择</option>
<view class="m-cell-bd"> <option :value="item.id" v-for="item in area">
<input {{ item.category_name }}
class="input input-1" </option>
placeholder-class="placeholder" </select>
type="text" </view>
v-model="formData.message_address" </view>
/> <view class="m-cell m-cell-select-before" @click="showbox">
</view> <view class="m-cell-hd">//</view>
</view> <view class="m-cell-bd">
<view class="m-cell"> <label>{{ seladstr }}</label>
<view class="m-cell-hd">联系人</view> </view>
<view class="m-cell-bd"> </view>
<input <view class="m-cell">
class="input input-1" <view class="m-cell-hd">详细地址</view>
placeholder-class="placeholder" <view class="m-cell-bd">
type="text" <input
v-model="formData.message_username" class="input input-1"
/> placeholder-class="placeholder"
</view> type="text"
</view> v-model="formData.message_address"
<view class="m-cell"> />
<view class="m-cell-hd">手机号</view> </view>
<view class="m-cell-bd"> </view>
<input <view class="m-cell">
class="input input-1" <view class="m-cell-hd">联系人</view>
placeholder-class="placeholder" <view class="m-cell-bd">
type="number" <input
v-model="formData.message_mobile" class="input input-1"
/> placeholder-class="placeholder"
</view> type="text"
</view> v-model="formData.message_username"
<view class="m-cell"> />
<view class='bk_box'> </view>
<view class='m-cell-hd'>图片</view> </view>
<view class='pic_box'> <view class="m-cell">
<view class='pic_box_img'> <view class="m-cell-hd">手机号</view>
<!-- 视频 --> <view class="m-cell-bd">
<view v-if="story_video" class="hjs-select-img" > <input
<view class="uni-icon uni-icon-clear mp-clean-icon icon-cuo" @tap="delectVideo" v-if="false"></view> class="input input-1"
<video :src="story_video" class="pic_box_image" ></video> placeholder-class="placeholder"
<cover-view class='shanchu'> type="number"
<label @tap="delectVideo" class="iconfont icon-delete" style='color:#fff'></label> v-model="formData.message_mobile"
</cover-view> />
</view> </view>
</view>
<view class="m-cell">
<view class="bk_box">
<view class="m-cell-hd">图片</view>
<view class="pic_box">
<view class="pic_box_img">
<!-- 视频 -->
<view v-if="story_video" class="hjs-select-img">
<view
class="uni-icon uni-icon-clear mp-clean-icon icon-cuo"
@tap="delectVideo"
v-if="false"
></view>
<video :src="story_video" class="pic_box_image"></video>
<cover-view class="shanchu">
<label
@tap="delectVideo"
class="iconfont icon-delete"
style="color: #fff"
></label>
</cover-view>
</view>
<block v-for="(item, index) in ImgList" :key="index"> <block v-for="(item, index) in ImgList" :key="index">
<view class="hjs-select-img"> <view class="hjs-select-img">
<image class='pic_box_image' :src='item.Url' :data-src="item.Url" @click="previewImage" mode="scaleToFill"></image> <image
<view class='shanchu' style=''><label @tap='delImg' class="iconfont icon-delete" class="pic_box_image"
:data-id="item.SkuId" :data-index="index" :src="item.Url"
style='color:#fff'></label> :data-src="item.Url"
</view> @click="previewImage"
</view> mode="scaleToFill"
</block> ></image>
<view @click='chooseVideoImage' class="hjs-select-img"> <view class="shanchu" style=""
<image class='pic_box_image' src='https://static.lancerdt.com/xcxfile/appicon/img/pic_11.png'></image> ><label
</view> @tap="delImg"
</view> class="iconfont icon-delete"
</view> :data-id="item.SkuId"
</view> :data-index="index"
</view> style="color: #fff"
<button class="u-btn u-btn-default" @click="submitInfo">提交</button> ></label>
<mpvue-city-picker </view>
:themeColor="themeColor" </view>
ref="mpvueCityPicker" </block>
:pickerValueDefault="cityPickerValueDefault" <view @click="chooseVideoImage" class="hjs-select-img">
@onCancel="onCancel" <image
@onConfirm="onConfirm" class="pic_box_image"
></mpvue-city-picker> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/img/pic_11.png"
</view> ></image>
</view>
</view>
</view>
</view>
</view>
<button class="u-btn u-btn-default" @click="submitInfo">提交</button>
<mpvue-city-picker
:themeColor="themeColor"
ref="mpvueCityPicker"
:pickerValueDefault="cityPickerValueDefault"
@onCancel="onCancel"
@onConfirm="onConfirm"
></mpvue-city-picker>
</view>
</template> </template>
<script> <script>
import mpvueCityPicker from '../../components/mpvue-citypicker/mpvueCityPicker.vue' import mpvueCityPicker from "../../components/mpvue-citypicker/mpvueCityPicker.vue";
import {mapMutations, mapState} from 'vuex' import { mapMutations, mapState } from "vuex";
var picPath = []; var picPath = [];
export default { export default {
components: { components: {
mpvueCityPicker mpvueCityPicker,
}, },
data() { data() {
return { return {
formData: { formData: {
category_content: '', category_content: "",
message_keywords: '', message_keywords: "",
category_id: '', category_id: "",
message_area: '', message_area: "",
message_full_area: '', message_full_area: "",
message_address: '', message_address: "",
message_username: '', message_username: "",
message_mobile: '', message_mobile: "",
}, },
themeColor: '#007AFF', themeColor: "#007AFF",
cityPickerValueDefault: [0, 0, 0], cityPickerValueDefault: [0, 0, 0],
form: {}, form: {},
story_video:"", story_video: "",
ImgList: [], ImgList: [],
Pindex: 0, Pindex: 0,
selectedProId: 0, selectedProId: 0,
selectedCityId: 0, selectedCityId: 0,
selectedCountyId: 0, selectedCountyId: 0,
selectedPro: '', selectedPro: "",
selectedCity: '', selectedCity: "",
selectedCounty: '', selectedCounty: "",
seladstr: "请选择所属地区", seladstr: "请选择所属地区",
'category' : [], category: [],
'area' :[], area: [],
isShow: false, isShow: false,
} };
}, },
computed: mapState(['Config']), computed: mapState(["Config"]),
onLoad: function(options) { onLoad: function (options) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title:this.__('发布信息') title: this.__("发布信息"),
}); });
this.GetAddressList(); this.GetAddressList();
},
methods: {
onUnload() {
if (this.$refs.mpvueCityPicker.showPicker) {
this.$refs.mpvueCityPicker.pickerCancel();
}
},
onBackPress() {
if (this.$refs.mpvueCityPicker.showPicker) {
this.$refs.mpvueCityPicker.pickerCancel();
return true;
}
},
onConfirm(e) {
let that = this;
console.info(e);
console.info(JSON.stringify(e));
this.pickerText = JSON.stringify(e);
this.setData({
Pindex: this.cityCode,
selectedProId: e.value[0],
selectedCityId: e.value[1],
selectedCountyId: e.value[2],
selectedPro: e.label[0],
selectedCity: e.label[1],
selectedCounty: e.label[2],
seladstr: that.$.isNull(e.label.toString())
? that.__("请选择地址")
: e.label.toString(),
});
},
onCancel(e) {
console.log(e);
},
GetAddressList: function () {
var that = this;
var params = {};
that.setData({
isdata: false,
category: [],
area: [],
});
that.$.request({
url: that.Config.URL.user.serviceMessage,
data: params,
success: function (data, status, msg, code) {
if (200 == status) {
if (data.items.length > 0) {
that.addresslist = data.items;
that.setData({
isdata: true,
category: data.category,
area: data.area,
});
} else {
that.setData({
isdata: false,
});
}
}
uni.stopPullDownRefresh();
},
});
},
submitInfo(e) {
var that = this;
var params = this.formData;
params.message_full_area = this.seladstr;
params.photos_area = JSON.stringify(that.ImgList);
params.user_birthday == that.__("请选择生日日期") &&
(params.user_birthday = "");
that.$.request({
url: this.Config.URL.user.addServiceMessage, //
data: params,
success: function (data, status, msg, code) {
if (status == 200) {
that.$.showToast({
title: that.__("更新成功!"),
});
}, setTimeout(function () {
methods: { that.$.navigateBack(1);
onUnload() { }, 2000);
if (this.$refs.mpvueCityPicker.showPicker) { } else {
this.$refs.mpvueCityPicker.pickerCancel() that.$.confirm(msg);
} }
}, },
onBackPress() { });
if (this.$refs.mpvueCityPicker.showPicker) { },
this.$refs.mpvueCityPicker.pickerCancel(); chooseVideoImage() {
return true; let that = this;
} uni.showActionSheet({
}, title: that.__("选择上传类型"),
onConfirm(e) { itemList: [that.__("图片")],
let that = this; success: (res) => {
console.info(e); console.log(res);
console.info(JSON.stringify(e)); if (res.tapIndex == 0) {
this.pickerText = JSON.stringify(e) this.chooseImages();
this.setData({ } else {
Pindex: this.cityCode, this.chooseVideo();
selectedProId: e.value[0], }
selectedCityId: e.value[1], },
selectedCountyId: e.value[2], });
selectedPro: e.label[0], },
selectedCity: e.label[1], UploadImg() {
selectedCounty: e.label[2], var that = this,
seladstr: that.$.isNull(e.label.toString()) ? that.__("请选择地址") : e.label.toString() max_num = 9;
});
},
onCancel(e) {
console.log(e)
},
GetAddressList: function() {
var that = this;
var params = {};
that.setData({
isdata: false,
category: [],
area: []
});
that.$.request({
url: that.Config.URL.user.serviceMessage,
data: params,
success: function(data, status, msg, code) {
if (200 == status){
if (data.items.length > 0) {
that.addresslist = data.items;
that.setData({
isdata: true,
category: data.category,
area: data.area
});
} else {
that.setData({
isdata: false
});
}
}
uni.stopPullDownRefresh()
},
})
},
submitInfo(e) {
var that = this;
var params = this.formData
params.message_full_area = this.seladstr
params.photos_area = JSON.stringify(that.ImgList)
params.user_birthday == that.__("请选择生日日期") && (params.user_birthday = "");
that.$.request({
url: this.Config.URL.user.addServiceMessage,//
data: params,
success: function(data, status, msg, code) {
if (status == 200) {
that.$.showToast({
title: that.__("更新成功!")
})
setTimeout(function(){ if (
that.$.navigateBack(1) (that.$.isNull(that.ImgList) || (max_num = 9 - that.ImgList.length),
},2000) 0 != max_num)
} else { ) {
that.$.confirm(msg); that.$.chooseImage({
} count: max_num,
} sizeType: ["compressed"],
}); sourceType: ["album", "camera"],
}, success: function (result) {
chooseVideoImage(){ for (
let that = this; var num = that.ImgList.length,
uni.showActionSheet({ path = result.tempFilePaths,
title:that.__("选择上传类型"), idx = 0;
itemList: [that.__('图片')], idx < path.length;
success: (res) => { idx++
console.log(res) ) {
if(res.tapIndex == 0){ that.$.uploadFile({
this.chooseImages() url: that.Config.URL.upload,
} else { method: "POST",
this.chooseVideo() filePath: path[idx],
} name: "upfile",
} formData: { user: idx + num },
}) //header: {"content-type": "multipart/form-data"},
}, success: function (t) {
UploadImg() { console.log(t), console.log(t.data);
var that = this, max_num = 9; var a = JSON.parse(t.data);
console.log(a);
var s = that.$.parseJSON(t.data);
let info = { Url: s.data.url, SkuId: 1 };
picPath.push(info);
for (var o = picPath.length - 1; 0 < o; o--) {
for (var e = 0; e < o; e++) {
if (picPath[e].order > picPath[e + 1].order) {
var i = picPath[e];
(picPath[e] = picPath[e + 1]), (picPath[e + 1] = i);
}
}
}
that.setData({ ImgList: picPath });
},
fail: function (t) {},
complete: function (t) {},
});
}
},
fail: function (t) {},
complete: function (t) {},
});
} else {
that.$.alert(that.__("最多上传9张图片"));
}
},
delImg(e) {
var that = this;
that.$.confirm(
"是否放弃上传本张图片?",
function (t) {
if (t.confirm) {
var a = that.ImgList,
s = [];
for (var o in ((picPath = []), a)) {
o != e.target.dataset.index && (s.push(a[o]), picPath.push(a[o]));
}
that.setData({ ImgList: s });
}
},
true
);
},
chooseImages() {
this.UploadImg();
if (that.$.isNull(that.ImgList) || (max_num = 9 - that.ImgList.length), 0 != max_num){ return;
that.$.chooseImage({
count: max_num,
sizeType: ["compressed"],
sourceType: ["album", "camera"],
success: function (result) {
for (var num = that.ImgList.length, path = result.tempFilePaths, idx = 0; idx < path.length; idx++){
that.$.uploadFile({
url: that.Config.URL.upload,
method: "POST",
filePath: path[idx],
name: "upfile",
formData: {user: idx + num},
//header: {"content-type": "multipart/form-data"},
success: function (t) {
console.log(t), console.log(t.data);
var a = JSON.parse(t.data);
console.log(a);
var s = that.$.parseJSON(t.data);
let info = {Url:s.data.url, SkuId:1}
picPath.push(info);
for (var o = picPath.length - 1; 0 < o; o--)
{
for (var e = 0; e < o; e++)
{
if (picPath[e].order > picPath[e + 1].order)
{
var i = picPath[e];
picPath[e] = picPath[e + 1], picPath[e + 1] = i
}
}
}
that.setData({ImgList: picPath})
},
fail: function (t) {
},
complete: function (t) {
}
})
}
},
fail: function (t) {
},
complete: function (t) {
}
})
}
else
{
that.$.alert(that.__("最多上传9张图片"))
}
},
delImg(e) {
var that = this;
that.$.confirm("是否放弃上传本张图片?", function (t) {
if (t.confirm)
{
var a = that.ImgList, s = [];
for (var o in picPath = [], a)
{
o != e.target.dataset.index && (s.push(a[o]), picPath.push(a[o]));
}
that.setData({ImgList: s})
}
},
true)
},
chooseImages(){
this.UploadImg();
return; //
uni.chooseImage({
count: 4, //9
sizeType: ["original", "compressed"], //
sourceType: ["album", "camera"], //
success: (res) => {
this.ImgList = this.ImgList.concat(res.tempFilePaths);
// if (this.ImgList.length == 4) {
uni.chooseImage({ this.VideoOfImagesShow = false;
count: 4, //9 }
sizeType: ['original', 'compressed'], // },
sourceType: ['album','camera'], // });
success:(res)=> { },
this.ImgList = this.ImgList.concat(res.tempFilePaths); //
showbox() {
if(this.ImgList.length == 4) { /*
this.VideoOfImagesShow = false
}
}
});
},
//
showbox() {
/*
this.setData({ this.setData({
isShow: true isShow: true
}) })
*/ */
this.$refs.mpvueCityPicker.show() this.$refs.mpvueCityPicker.show();
}, },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../styles/_variables.scss'; @import "../../styles/_variables.scss";
.input{ .input {
font-size: 30rpx; font-size: 30rpx;
color: #333333; color: #333333;
line-height: 34rpx; line-height: 34rpx;
border: 1rpx dashed #666; border: 1rpx dashed #666;
width: auto; width: auto;
height: 100px; height: 100px;
border-radius: 5px; border-radius: 5px;
padding: 20rpx; padding: 20rpx;
&.input-1{ &.input-1 {
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
border-style: solid; border-style: solid;
padding: 0 20rpx; padding: 0 20rpx;
} }
} }
.placeholder{ .placeholder {
line-height: 40rpx; line-height: 40rpx;
font-size: 30rpx; font-size: 30rpx;
color: #CCCCCC; color: #cccccc;
} }
.m-cell-hd{ .m-cell-hd {
width: 120rpx; width: 120rpx;
text-align: center; text-align: center;
flex-shrink: 0; flex-shrink: 0;
} }
.m-cell{ .m-cell {
padding: 30rpx; padding: 30rpx;
} }
.m-cell-hd{ .m-cell-hd {
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
} }
.bk_box{ .bk_box {
display: flex; display: flex;
.pic_box_image{ .pic_box_image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.pic_box_img{ .pic_box_img {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.hjs-select-img{ .hjs-select-img {
display: inline-block; display: inline-block;
position: relative; position: relative;
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
margin: 0 20rpx 20rpx; margin: 0 20rpx 20rpx;
} }
} }
.m-select-box-msk { .m-select-box-msk {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 100%; height: 100%;
left: 0; left: 0;
top: 0; top: 0;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
z-index: 3; z-index: 3;
} }
.m-select-box { .m-select-box {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 300px; height: 300px;
background-color: #fff; background-color: #fff;
left: 0; left: 0;
bottom: 0; bottom: 0;
} }
.u-select { .u-select {
width: 100%; width: 100%;
height: 300px; height: 300px;
text-align: center; text-align: center;
} }
.u-select .m-cell-bd { .u-select .m-cell-bd {
width: 100%; width: 100%;
line-height: 50px; line-height: 50px;
font-size: 28rpx; font-size: 28rpx;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.u-select .m-cell-bd label { .u-select .m-cell-bd label {
width: 100%; width: 100%;
} }
.m-select-content {
position: relative
}
.m-select-content {
position: relative;
}
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,287 +1,293 @@
<template> <template>
<view class="register"> <view class="register">
<view class="content">
<!-- 头部logo -->
<view class="header">
<image :src="logo"></image>
</view>
<!-- 主体 -->
<view class="main">
<wInput
v-model="user_mobile"
type="text"
isShowIntl
@intl="intlChange"
:placeholder="__('请输入手机号码')"
></wInput>
<view class="content"> <wInput
<!-- 头部logo --> v-model="mobile_code"
<view class="header"> type="number"
<image :src="logo"></image> maxlength="4"
</view> :placeholder="__('请输入验证码')"
<!-- 主体 --> isShowCode
<view class="main"> :codeText="__('获取验证码')"
<wInput ref="runCode"
v-model="user_mobile" @setCode="getSmsCode()"
type="text" ></wInput>
isShowIntl </view>
@intl="intlChange"
:placeholder="__('请输入手机号码')"
></wInput>
<wInput <wButton
v-model="mobile_code" :text="__('登 录')"
type="number" :rotate="isRotate"
maxlength="4" @click.native="startReg()"
:placeholder="__('请输入验证码')" style="margin-top: 30rpx"
isShowCode ></wButton>
:codeText="__('获取验证码')" </view>
ref="runCode" </view>
@setCode="getSmsCode()"
></wInput>
</view>
<wButton
:text="__('登 录')"
:rotate="isRotate"
@click.native="startReg()" style="margin-top: 30rpx;"
></wButton>
</view>
</view>
</template> </template>
<script> <script>
import wInput from '../../components/watch-login/watch-input.vue' //input import wInput from "../../components/watch-login/watch-input.vue"; //input
import wButton from '../../components/watch-login/watch-button.vue' //button import wButton from "../../components/watch-login/watch-button.vue"; //button
import imgcode from '@/components/verify-code/imgcode.vue'; import imgcode from "@/components/verify-code/imgcode.vue";
import { import { mapState, mapMutations } from "vuex";
mapState,
mapMutations
} from 'vuex'
export default { export default {
data: function() { data: function () {
return { return {
logo: "", logo: "",
user_intl: "", user_intl: "",
user_mobile: "", user_mobile: "",
user_avatar: "https://static.lancerdt.com/demodata/assets/data/avatar.png", user_avatar:
user_password: "", "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/demodata/assets/data/avatar.png",
mobile_code: "", user_password: "",
btntext: "发送", mobile_code: "",
isUserMobile: true, btntext: "发送",
isUserEmail: true, isUserMobile: true,
isNickname: true, isUserEmail: true,
isPassword: true, isNickname: true,
isSend: true, isPassword: true,
sendTime: 120, isSend: true,
isCode: true, sendTime: 120,
isImgCode: false, isCode: true,
isImgCode: false,
client_info: "{}",
client_info: '{}', countdown: 6,
cTimer: null,
countdown: 6, isRotate: false, //
cTimer: null, };
},
computed: mapState([
"Config",
"StateCode",
"notice",
"plantformInfo",
"shopInfo",
"userInfo",
"hasLogin",
]),
components: {
wInput,
wButton,
imgcode,
},
onLoad: function (options) {
uni.setNavigationBarTitle({
title: this.__("手机验证码登录"),
});
isRotate: false // this.setData({
} options: options,
}, });
computed: mapState(['Config', 'StateCode', 'notice', 'plantformInfo', 'shopInfo', 'userInfo', 'hasLogin']),
components: {
wInput,
wButton,
imgcode
},
onLoad: function(options) {
uni.setNavigationBarTitle({
title:this.__('手机验证码登录')
});
this.setData({ this.btntext = this.__("发送");
options: options
})
this.btntext = this.__('发送') setTimeout(() => {
this.getPlantformInfo((plantformInfo) => {
this.logo = plantformInfo.logo;
});
}, 200);
setTimeout(()=>{ this.show();
this.getPlantformInfo((plantformInfo)=> {
this.logo = plantformInfo.logo;
});
}, 200);
this.show(); // #ifdef APP-PLUS
plus.push.getClientInfoAsync(
function (info) {
console.log(info);
if (info.clientid) {
that.client_info = JSON.stringify(info);
}
},
function (e) {
console.log(JSON.stringify(e));
}
);
// #endif
},
methods: {
...mapMutations([
"login",
"logout",
"getPlantformInfo",
"forceUserInfo",
"getUserInfo",
]),
intlChange: function (data) {
this.user_intl = data;
},
/* start 图形验证码 */
refresh: function () {
//this.$refs.imgcode.refresh();
},
show: function () {
var _self = this;
setTimeout(function () {
_self.refresh();
}, 500);
},
onInputImgCode: function (e) {
if (
e.detail.value.toLocaleLowerCase() ==
uni.getStorageSync("imgcode").toLocaleLowerCase()
) {
this.setData({ isImgCode: true });
} else {
this.setData({ isImgCode: false });
}
},
/* end 图形验证码 */
// #ifdef APP-PLUS inputuser_email: function (e) {
plus.push.getClientInfoAsync(function(info) { let that = this;
console.log(info); this.setData({ user_email: e.detail.value }),
if (info.clientid) { that.$.isNull(e.detail.value)
that.client_info = JSON.stringify(info); ? this.setData({ isUserEmail: false })
} : /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/.test(
}, function(e) { e.detail.value
console.log(JSON.stringify(e)); )
}) ? this.setData({ isUserEmail: true })
// #endif : this.setData({ isUserEmail: false });
}, },
methods: { startReg: function (e) {
...mapMutations(['login', 'logout', 'getPlantformInfo', 'forceUserInfo', 'getUserInfo']), let that = this;
intlChange:function(data){
this.user_intl = data;
},
/* start 图形验证码 */ //
refresh:function(){ if (this.isRotate) {
//this.$refs.imgcode.refresh(); //
}, return false;
show:function(){ }
var _self=this;
setTimeout(function(){ if (!that.$.tel(this.user_mobile, this.user_intl)) {
_self.refresh(); this.setData({ isUserMobile: false });
},500);
}, uni.showToast({
onInputImgCode:function(e){ icon: "none",
if (e.detail.value.toLocaleLowerCase() == uni.getStorageSync('imgcode').toLocaleLowerCase()) position: "bottom",
{ title: that.__("手机号不正确"),
this.setData({isImgCode: true}) });
return false;
}
if (this.mobile_code.length != 4) {
uni.showToast({
icon: "none",
position: "bottom",
title: that.__("验证码不正确"),
});
return false;
}
this.update();
},
update: function () {
var that = this;
var params = {
user_mobile: this.user_intl + this.user_mobile,
rand_key: this.user_intl + this.user_mobile,
verify_code: this.mobile_code,
client_info: that.client_info,
};
that.$.request({
url: this.Config.URL.doSmsLogin,
data: params,
success: function (data, status, msg, code) {
if (status == 200) {
var id = that.$.setStorageSync("uid", data.user_id);
var key = that.$.setStorageSync("ukey", data.key);
// #ifdef H5
$cookies.set("uid", data.user_id);
$cookies.set("ukey", data.key);
// #endif
that.$.showToast({
title: that.__("登录成功!"),
success: function () {
that.login(data);
if (data.im && that.plantformInfo.config.chat_global) {
that.$Socket.connectserver(data.im);
} }
else
{
this.setData({isImgCode: false})
}
},
/* end 图形验证码 */
inputuser_email: function (e) { setTimeout(() => {
let that = this; var prePage = getCurrentPages()[getCurrentPages().length - 2];
this.setData({user_email: e.detail.value}), that.$.isNull(e.detail.value) ? this.setData({isUserEmail: false}) : /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/.test(e.detail.value) ? this.setData({isUserEmail: true}) : this.setData({isUserEmail: false})
},
startReg: function (e) {
let that = this;
// try {
if(this.isRotate){ if (prePage.refreshData) {
// prePage.refreshData(prePage.options);
return false; } else if (prePage.onLoad) {
} prePage.onLoad(prePage.options);
if (!that.$.tel(this.user_mobile, this.user_intl))
{
this.setData({isUserMobile: false});
uni.showToast({
icon: 'none',
position: 'bottom',
title: that.__('手机号不正确')
});
return false;
}
if (this.mobile_code.length != 4) {
uni.showToast({
icon: 'none',
position: 'bottom',
title: that.__('验证码不正确')
});
return false;
}
this.update();
},
update: function () {
var that = this;
var params = {
user_mobile: this.user_intl + this.user_mobile,
rand_key: this.user_intl + this.user_mobile,
verify_code: this.mobile_code,
client_info:that.client_info
};
that.$.request({
url: this.Config.URL.doSmsLogin,
data: params,
success: function (data, status, msg, code) {
if (status == 200)
{
var id = that.$.setStorageSync('uid', data.user_id);
var key = that.$.setStorageSync('ukey', data.key);
// #ifdef H5
$cookies.set('uid', data.user_id);
$cookies.set('ukey', data.key);
// #endif
that.$.showToast({
title: that.__("登录成功!"), success: function () {
that.login(data);
if (data.im && that.plantformInfo.config.chat_global)
{
that.$Socket.connectserver(data.im);
}
setTimeout(() => {
var prePage = getCurrentPages()[getCurrentPages().length - 2];
try
{
if (prePage.refreshData)
{
prePage.refreshData(prePage.options);
}
else if (prePage.onLoad)
{
prePage.onLoad(prePage.options);
}
}
catch (e)
{
}
that.$.navigateBack(2)
}, 200)
}
})
}
else
{
that.$.confirm(msg);
}
} }
} catch (e) {}
}); that.$.navigateBack(2);
}, }, 200);
inputphone: function (e) { },
let that = this; });
this.setData({user_mobile: e.detail.value}); } else {
that.$.isNull(e.detail.value) ? this.setData({isUserMobile: false}) : /^1[0123456789]\d{9}$/.test(e.detail.value) ? this.setData({isUserMobile: true}) : this.setData({isUserMobile: false}) that.$.confirm(msg);
}, }
},
});
},
inputphone: function (e) {
let that = this;
this.setData({ user_mobile: e.detail.value });
that.$.isNull(e.detail.value)
? this.setData({ isUserMobile: false })
: /^1[0123456789]\d{9}$/.test(e.detail.value)
? this.setData({ isUserMobile: true })
: this.setData({ isUserMobile: false });
},
inputcode: function (e) {
let that = this;
this.setData({ mobile_code: e.detail.value }),
that.$.isNull(e.detail.value)
? this.setData({ isCode: false })
: this.setData({ isCode: true });
},
getSmsCode: function () {
let that = this;
inputcode: function (e) { if (!that.$.tel(this.user_mobile, this.user_intl)) {
let that = this; this.setData({ isUserMobile: false });
this.setData({mobile_code: e.detail.value}), that.$.isNull(e.detail.value) ? this.setData({isCode: false}) : this.setData({isCode: true})
},
getSmsCode: function () {
let that = this;
if (!that.$.tel(this.user_mobile, this.user_intl)) uni.showToast({
{ icon: "none",
this.setData({isUserMobile: false}); position: "bottom",
title: that.__("手机号不正确"),
});
return false;
}
uni.showToast({ //
icon: 'none', this.$refs.runCode.$emit("runCode"); //
position: 'bottom',
title: that.__('手机号不正确')
});
return false;
}
// /*
this.$refs.runCode.$emit('runCode'); //
/*
if (!this.isImgCode) if (!this.isImgCode)
{ {
uni.showToast({ uni.showToast({
@ -292,67 +298,66 @@
} }
*/ */
setTimeout(function(){ setTimeout(function () {
that.$refs.runCode.$emit('runCode',0); // that.$refs.runCode.$emit("runCode", 0); //
},60000) }, 60000);
if (this.isSend) if (this.isSend) {
{ this.setData({ isSend: false });
this.setData({isSend: false}); var t = this.sendTime;
var t = this.sendTime; var params = {
var params = { mobile: this.user_intl + this.user_mobile,
mobile: this.user_intl + this.user_mobile };
};
that.$.request({ that.$.request({
url: this.Config.URL.account.get_mobile_checkcode, url: this.Config.URL.account.get_mobile_checkcode,
data: params, data: params,
success: function (data, status, msg, code) { success: function (data, status, msg, code) {
if (status == 200) if (status == 200) {
{ var r = setInterval(function () {
var r = setInterval(function () { t > 0
t > 0 ? that.setData({btntext: t-- + "s"}) : (that.setData({ ? that.setData({ btntext: t-- + "s" })
isSend: true, : (that.setData({
sendTime: 120, isSend: true,
btntext: that.__("重新发送") sendTime: 120,
}), clearInterval(r)) btntext: that.__("重新发送"),
}, 1e3); }),
} clearInterval(r));
else }, 1e3);
{ } else {
that.setData({isSend: true}); that.setData({ isSend: true });
that.$.alert(msg) that.$.alert(msg);
that.$refs.runCode.$emit('runCode',0); // that.$refs.runCode.$emit("runCode", 0); //
} }
} },
}); });
} }
}, },
startTimer: function() { startTimer: function () {
var that = this; var that = this;
if (that.cTimer == null) { if (that.cTimer == null) {
that.countdown--; that.countdown--;
that.cTimer = setInterval(function() { that.cTimer = setInterval(function () {
that.countdown--; that.countdown--;
if (that.countdown == 0) { if (that.countdown == 0) {
that.clearTimer(); that.clearTimer();
} }
}, 1000); }, 1000);
} }
}, },
clearTimer: function() { clearTimer: function () {
var that = this; var that = this;
clearInterval(that.cTimer); clearInterval(that.cTimer);
that.cTimer = null; that.cTimer = null;
that.countdown = 6; that.countdown = 6;
} },
} },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import '../../styles/reg.scss'; @import "../../styles/reg.scss";
</style> </style>

View File

@ -1,235 +1,392 @@
<template> <template>
<view class="content"> <view class="content">
<view class="searchBox"> <view class="searchBox">
<view class="inputBox"> <view class="inputBox">
<input type="text" :placeholder="defaultKeyword" @input="inputChange" v-model="keyword" @confirm="doSearch(false)" <input
placeholder-class="placeholder-class" confirm-type="search"> type="text"
</view> :placeholder="defaultKeyword"
<view class="searchBtn" @tap="doSearch(false)">搜索</view> @input="inputChange"
</view> v-model="keyword"
<view class="search-keyword" @touchstart="blur"> @confirm="doSearch(false)"
<scroll-view class="keywordListBox" v-show="isShowKeywordList" scroll-y> placeholder-class="placeholder-class"
<view class="keywordEntry" hover-class="keywordEntryTap" v-for="row in keywordList" wx:key="row.keyword"> confirm-type="search"
<view class="keywordText" @tap="doSearch(row.keyword)"> />
<rich-text :nodes="row.htmlStr"></rich-text> </view>
</view> <view class="searchBtn" @tap="doSearch(false)">搜索</view>
<view class="keywordImg" @tap="setkeyword(row)"> </view>
<image src="https://static.lancerdt.com/xcxfile/appicon/search/back.png"></image> <view class="search-keyword" @touchstart="blur">
</view> <scroll-view class="keywordListBox" v-show="isShowKeywordList" scroll-y>
</view> <view
</scroll-view> class="keywordEntry"
<scroll-view class="keywordBox" v-show="!isShowKeywordList" scroll-y> hover-class="keywordEntryTap"
<view class="keyword-block" v-if="oldKeywordList.length>0"> v-for="row in keywordList"
<view class="keyword-list-header"> wx:key="row.keyword"
<view>历史搜索</view> >
<view> <view class="keywordText" @tap="doSearch(row.keyword)">
<image @tap="oldDelete" src="https://static.lancerdt.com/xcxfile/appicon/search/delete.png"></image> <rich-text :nodes="row.htmlStr"></rich-text>
</view> </view>
</view> <view class="keywordImg" @tap="setkeyword(row)">
<view class="keyword"> <image
<view v-for="key in oldKeywordList" @tap="doSearch(key)" wx:key="key">{{key}}</view> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/search/back.png"
</view> ></image>
</view> </view>
<view class="keyword-block"> </view>
<view class="keyword-list-header"> </scroll-view>
<view>热门搜索</view> <scroll-view class="keywordBox" v-show="!isShowKeywordList" scroll-y>
<view> <view class="keyword-block" v-if="oldKeywordList.length > 0">
<image @tap="hotToggle" :src="'https://static.lancerdt.com/xcxfile/appicon/search/attention'+forbid+'.png'"></image> <view class="keyword-list-header">
</view> <view>历史搜索</view>
</view> <view>
<view class="keyword" v-if="forbid==''"> <image
<view v-for="key in hotKeywordList" @tap="doSearch(key)" wx:key="key">{{key}}</view> @tap="oldDelete"
</view> src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/search/delete.png"
<view class="hideHotTis" v-else> ></image>
<view>当前搜热门搜索已隐藏</view> </view>
</view> </view>
</view> <view class="keyword">
</scroll-view> <view
</view> v-for="key in oldKeywordList"
</view> @tap="doSearch(key)"
wx:key="key"
>{{ key }}</view
>
</view>
</view>
<view class="keyword-block">
<view class="keyword-list-header">
<view>热门搜索</view>
<view>
<image
@tap="hotToggle"
:src="
'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/search/attention' +
forbid +
'.png'
"
></image>
</view>
</view>
<view class="keyword" v-if="forbid == ''">
<view
v-for="key in hotKeywordList"
@tap="doSearch(key)"
wx:key="key"
>{{ key }}</view
>
</view>
<view class="hideHotTis" v-else>
<view>当前搜热门搜索已隐藏</view>
</view>
</view>
</scroll-view>
</view>
</view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
defaultKeyword: "", defaultKeyword: "",
keyword: "", keyword: "",
oldKeywordList: [], oldKeywordList: [],
hotKeywordList: [], hotKeywordList: [],
keywordList: [], keywordList: [],
forbid: '', forbid: "",
isShowKeywordList: false isShowKeywordList: false,
} };
}, },
onLoad() { onLoad() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title:this.__('') title: this.__(""),
}); });
this.init(); this.init();
}, },
methods: { methods: {
init() { init() {
this.loadDefaultKeyword(); this.loadDefaultKeyword();
this.loadOldKeyword(); this.loadOldKeyword();
this.loadHotKeyword(); this.loadHotKeyword();
},
}, blur() {
blur(){ uni.hideKeyboard();
uni.hideKeyboard() },
}, //
// loadDefaultKeyword() {
loadDefaultKeyword() { //ajax,
//ajax, this.defaultKeyword = "默认关键字";
this.defaultKeyword = "默认关键字"; },
}, //,Storage
//,Storage loadOldKeyword() {
loadOldKeyword() { uni.getStorage({
uni.getStorage({ key: "OldKeys",
key: 'OldKeys', success: (res) => {
success: (res) => { var OldKeys = JSON.parse(res.data);
var OldKeys = JSON.parse(res.data); this.oldKeywordList = OldKeys;
this.oldKeywordList = OldKeys; },
} });
}); },
}, //
// loadHotKeyword() {
loadHotKeyword() { //ajax
//ajax this.hotKeywordList = [
this.hotKeywordList = ['键盘', '鼠标', '显示器', '电脑主机', '蓝牙音箱', '笔记本电脑', '鼠标垫', 'USB', 'USB3.0']; "键盘",
}, "鼠标",
// "显示器",
inputChange(event) { "电脑主机",
var keyword = event.detail.value; "蓝牙音箱",
if (!keyword) { "笔记本电脑",
this.keywordList = []; "鼠标垫",
this.isShowKeywordList = false; "USB",
return; "USB3.0",
} ];
this.isShowKeywordList = true; },
// //
uni.request({ inputChange(event) {
url: 'https://suggest.taobao.com/sug?code=utf-8&q=' + keyword, // var keyword = event.detail.value;
success: (res) => { if (!keyword) {
this.keywordList = this.drawCorrelativeKeyword(res.data.result, keyword); this.keywordList = [];
} this.isShowKeywordList = false;
}); return;
}, }
// this.isShowKeywordList = true;
drawCorrelativeKeyword(keywords, keyword) { //
var len = keywords.length, uni.request({
keywordArr = []; url: "https://suggest.taobao.com/sug?code=utf-8&q=" + keyword, //
for (var i = 0; i < len; i++) { success: (res) => {
var row = keywords[i]; this.keywordList = this.drawCorrelativeKeyword(
//#9f9f9f res.data.result,
var html = row[0].replace(keyword, "<span style='color: #9f9f9f;'>" + keyword + "</span>"); keyword
html = '<div>' + html + '</div>'; );
var tmpObj = { },
keyword: row[0], });
htmlStr: html },
}; //
keywordArr.push(tmpObj) drawCorrelativeKeyword(keywords, keyword) {
} var len = keywords.length,
return keywordArr; keywordArr = [];
}, for (var i = 0; i < len; i++) {
// var row = keywords[i];
setkeyword(data) { //#9f9f9f
this.keyword = data.keyword; var html = row[0].replace(
}, keyword,
// "<span style='color: #9f9f9f;'>" + keyword + "</span>"
oldDelete() { );
let that = this; html = "<div>" + html + "</div>";
that.$.showModal({ var tmpObj = {
content: '确定清除历史搜索记录?', keyword: row[0],
success: (res) => { htmlStr: html,
if (res.confirm) { };
//console.log(''); keywordArr.push(tmpObj);
this.oldKeywordList = []; }
uni.removeStorage({ return keywordArr;
key: 'OldKeys' },
}); //
} else if (res.cancel) { setkeyword(data) {
//console.log(''); this.keyword = data.keyword;
} },
} //
}); oldDelete() {
}, let that = this;
// that.$.showModal({
hotToggle() { content: "确定清除历史搜索记录?",
this.forbid = this.forbid ? '' : '_forbid'; success: (res) => {
}, if (res.confirm) {
// //console.log('');
doSearch(key) { this.oldKeywordList = [];
key = key ? key : this.keyword ? this.keyword : this.defaultKeyword; uni.removeStorage({
this.keyword = key; key: "OldKeys",
this.saveKeyword(key); // });
uni.showToast({ } else if (res.cancel) {
title: key, //console.log('');
icon: 'none', }
duration: 2000 },
}); });
// },
//#ifdef APP-PLUS //
plus.runtime.openURL(encodeURI('taobao://s.taobao.com/search?q=' + key)); hotToggle() {
//#endif this.forbid = this.forbid ? "" : "_forbid";
//#ifdef H5 },
window.location.href = 'taobao://s.taobao.com/search?q=' + key //
//#endif doSearch(key) {
}, key = key ? key : this.keyword ? this.keyword : this.defaultKeyword;
// this.keyword = key;
saveKeyword(keyword) { this.saveKeyword(key); //
uni.getStorage({ uni.showToast({
key: 'OldKeys', title: key,
success: (res) => { icon: "none",
//console.log(res.data); duration: 2000,
var OldKeys = JSON.parse(res.data); });
var findIndex = OldKeys.indexOf(keyword); //
if (findIndex == -1) { //#ifdef APP-PLUS
OldKeys.unshift(keyword); plus.runtime.openURL(encodeURI("taobao://s.taobao.com/search?q=" + key));
} else { //#endif
OldKeys.splice(findIndex, 1); //#ifdef H5
OldKeys.unshift(keyword); window.location.href = "taobao://s.taobao.com/search?q=" + key;
} //#endif
//10 },
OldKeys.length > 10 && OldKeys.pop(); //
uni.setStorage({ saveKeyword(keyword) {
key: 'OldKeys', uni.getStorage({
data: JSON.stringify(OldKeys) key: "OldKeys",
}); success: (res) => {
this.oldKeywordList = OldKeys; // //console.log(res.data);
}, var OldKeys = JSON.parse(res.data);
fail: (e) => { var findIndex = OldKeys.indexOf(keyword);
var OldKeys = [keyword]; if (findIndex == -1) {
uni.setStorage({ OldKeys.unshift(keyword);
key: 'OldKeys', } else {
data: JSON.stringify(OldKeys) OldKeys.splice(findIndex, 1);
}); OldKeys.unshift(keyword);
this.oldKeywordList = OldKeys; // }
} //10
}); OldKeys.length > 10 && OldKeys.pop();
} uni.setStorage({
} key: "OldKeys",
} data: JSON.stringify(OldKeys),
});
this.oldKeywordList = OldKeys; //
},
fail: (e) => {
var OldKeys = [keyword];
uni.setStorage({
key: "OldKeys",
data: JSON.stringify(OldKeys),
});
this.oldKeywordList = OldKeys; //
},
});
},
},
};
</script> </script>
<style> <style>
.searchBox {width:95%;background-color:rgb(242,242,242);padding:7.5px 2.5%;display:flex;justify-content:space-between;} .searchBox {
.searchBox .inputBox {width:85%;flex-shrink:1;display:flex;justify-content:center;align-items:center;} width: 95%;
.searchBox .searchBtn {width:15%;margin:0 0 0 2%;display:flex;justify-content:center;align-items:center;flex-shrink:0;font-size:14px;color:#fff;background:linear-gradient(to right,#ff9801,#ff570a);border-radius:30px;} background-color: rgb(242, 242, 242);
.searchBox .inputBox>input {width:100%;height:30px;font-size:16px;border:0;border-radius:30px;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0 3%;margin:0;background-color:#ffffff;} padding: 7.5px 2.5%;
.placeholder-class {color:#9e9e9e;} display: flex;
.search-keyword {width:100%;background-color:rgb(242,242,242);} justify-content: space-between;
.keywordListBox {height:calc(100vh - 55px);padding-top:5px;border-radius:10px 10px 0 0;background-color:#fff;} }
.keywordEntryTap {background-color:#eee;} .searchBox .inputBox {
.keywordEntry {width:94%;height:40px;margin:0 3%;font-size:15px;color:#333;display:flex;justify-content:space-between;align-items:center;border-bottom:solid 1px #e7e7e7;} width: 85%;
.keywordEntry image {width:30px;height:30px;} flex-shrink: 1;
.keywordEntry .keywordText,.keywordEntry .keywordImg {height:40px;display:flex;align-items:center;} display: flex;
.keywordEntry .keywordText {width:90%;} justify-content: center;
.keywordEntry .keywordImg {width:10%;justify-content:center;} align-items: center;
.keywordBox {height:calc(100vh - 55px);border-radius:10px 10px 0 0;background-color:#fff;} }
.keywordBox .keyword-block {padding:5px 0;} .searchBox .searchBtn {
.keywordBox .keyword-block .keyword-list-header {width:94%;padding:5px 3%;font-size:13.5px;color:#333;display:flex;justify-content:space-between;} width: 15%;
.keywordBox .keyword-block .keyword-list-header image {width:20px;height:20px;} margin: 0 0 0 2%;
.keywordBox .keyword-block .keyword {width:94%;padding:3px 3%;display:flex;flex-flow:wrap;justify-content:flex-start;} display: flex;
.keywordBox .keyword-block .hideHotTis {display:flex;justify-content:center;font-size:14px;color:#6b6b6b;} justify-content: center;
.keywordBox .keyword-block .keyword>view {display:flex;justify-content:center;align-items:center;border-radius:30px;padding:0 10px;margin:5px 10px 5px 0;height:30px;font-size:14px;background-color:rgb(242,242,242);color:#6b6b6b;} align-items: center;
flex-shrink: 0;
font-size: 14px;
color: #fff;
background: linear-gradient(to right, #ff9801, #ff570a);
border-radius: 30px;
}
.searchBox .inputBox > input {
width: 100%;
height: 30px;
font-size: 16px;
border: 0;
border-radius: 30px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding: 0 3%;
margin: 0;
background-color: #ffffff;
}
.placeholder-class {
color: #9e9e9e;
}
.search-keyword {
width: 100%;
background-color: rgb(242, 242, 242);
}
.keywordListBox {
height: calc(100vh - 55px);
padding-top: 5px;
border-radius: 10px 10px 0 0;
background-color: #fff;
}
.keywordEntryTap {
background-color: #eee;
}
.keywordEntry {
width: 94%;
height: 40px;
margin: 0 3%;
font-size: 15px;
color: #333;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: solid 1px #e7e7e7;
}
.keywordEntry image {
width: 30px;
height: 30px;
}
.keywordEntry .keywordText,
.keywordEntry .keywordImg {
height: 40px;
display: flex;
align-items: center;
}
.keywordEntry .keywordText {
width: 90%;
}
.keywordEntry .keywordImg {
width: 10%;
justify-content: center;
}
.keywordBox {
height: calc(100vh - 55px);
border-radius: 10px 10px 0 0;
background-color: #fff;
}
.keywordBox .keyword-block {
padding: 5px 0;
}
.keywordBox .keyword-block .keyword-list-header {
width: 94%;
padding: 5px 3%;
font-size: 13.5px;
color: #333;
display: flex;
justify-content: space-between;
}
.keywordBox .keyword-block .keyword-list-header image {
width: 20px;
height: 20px;
}
.keywordBox .keyword-block .keyword {
width: 94%;
padding: 3px 3%;
display: flex;
flex-flow: wrap;
justify-content: flex-start;
}
.keywordBox .keyword-block .hideHotTis {
display: flex;
justify-content: center;
font-size: 14px;
color: #6b6b6b;
}
.keywordBox .keyword-block .keyword > view {
display: flex;
justify-content: center;
align-items: center;
border-radius: 30px;
padding: 0 10px;
margin: 5px 10px 5px 0;
height: 30px;
font-size: 14px;
background-color: rgb(242, 242, 242);
color: #6b6b6b;
}
</style> </style>

View File

@ -1,6 +1,6 @@
var HOST="http://127.0.0.1/project/xyx/"; var HOST="http://127.0.0.1/project/xyx/";
var API_HOST=HOST+"/api/"; var API_HOST=HOST+"/api/";
var CDN_HOST="https://static.lancerdt.com/plant/"; var CDN_HOST="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/plant/";
var session_id; var session_id;

View File

@ -189,7 +189,7 @@ function play_mp3(url){
} }
function play_sfx(sfx_name,delay=0){ function play_sfx(sfx_name,delay=0){
function do_sfx(){ function do_sfx(){
var sfx=play_mp3("https://static.lancerdt.com/plant/static/sounds/"+sfx_name+".mp3"); var sfx=play_mp3("https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/plant/static/sounds/"+sfx_name+".mp3");
sfx.volume=.5; sfx.volume=.5;
} }

View File

@ -1,134 +1,238 @@
<template> <template>
<view v-if="show" @touchend="touch_end" style="width: 100%;height: 100%;position: fixed;z-index:99;top:0;left:0;background: rgba(0,0,0,.3);"> <view
<view v-if="guides.length>0 && guides[guide_index].arrow&&delay_done" :style="{left:guides[guide_index].arrow.x+'px',top:guides[guide_index].arrow.y+'px',transform:'rotate('+guides[guide_index].arrow.rotate+'deg)'}" style="transform-origin: 50% 100%;position: absolute;width:46px;height: 65px;z-index: 3;"> v-if="show"
<image class="arrow-jump" src="https://static.lancerdt.com/plant/static/guides/arrow.png" mode="scaleToFill" style="width: 46px;height: 65px;"></image> @touchend="touch_end"
</view> style="
<view v-if="guides.length>0" style="width: 100%;height: 100%;"> width: 100%;
<!-- guide_role.png --> height: 100%;
<view v-if="guides[guide_index].text&&delay_done" style="width: 324px;height: 257px;position: absolute;z-index: 20;left:50%;bottom:290px;margin-left: -162px;"> position: fixed;
<form @submit="next_clicked" report-submit="true" style="width:100%;height: 100%;position: absolute;top:0px;left:0px;z-index: 31;"> z-index: 99;
<button v-if="guides[guide_index].login" @getuserinfo="get_user_info" open-type="getUserInfo" class="clear_button" style="font-size: 16px;color:#fff;width:100%;height: 100%;"> top: 0;
<view style="position: absolute;bottom: 80px;left:15px;color:#fff;font-size: 14px;">点击继续</view><!--点击继续--> left: 0;
</button> background: rgba(0, 0, 0, 0.3);
<button v-else-if="!guides[guide_index].arrow||guides[guide_index].arrow.withcontinue" form-type="submit" class="clear_button" style="font-size: 16px;color:#fff;width:100%;height: 100%;"> "
<view style="position: absolute;bottom: 80px;left:15px;color:#fff;font-size: 14px;">点击继续</view><!--点击继续--> >
</button> <view
</form> v-if="guides.length > 0 && guides[guide_index].arrow && delay_done"
<image src="https://static.lancerdt.com/plant/static/guides/guide_role.png" mode="widthFix" style="width:100%;z-index: 30;"></image> :style="{
<view style="position: absolute;z-index: 32;color:#fff;top:25px;left: 15px;width:220px;font-size: 14px;"> left: guides[guide_index].arrow.x + 'px',
{{guides[guide_index].text}} top: guides[guide_index].arrow.y + 'px',
</view> transform: 'rotate(' + guides[guide_index].arrow.rotate + 'deg)',
</view> }"
</view> style="
</view> transform-origin: 50% 100%;
position: absolute;
width: 46px;
height: 65px;
z-index: 3;
"
>
<image
class="arrow-jump"
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/plant/static/guides/arrow.png"
mode="scaleToFill"
style="width: 46px; height: 65px"
></image>
</view>
<view v-if="guides.length > 0" style="width: 100%; height: 100%">
<!-- guide_role.png -->
<view
v-if="guides[guide_index].text && delay_done"
style="
width: 324px;
height: 257px;
position: absolute;
z-index: 20;
left: 50%;
bottom: 290px;
margin-left: -162px;
"
>
<form
@submit="next_clicked"
report-submit="true"
style="
width: 100%;
height: 100%;
position: absolute;
top: 0px;
left: 0px;
z-index: 31;
"
>
<button
v-if="guides[guide_index].login"
@getuserinfo="get_user_info"
open-type="getUserInfo"
class="clear_button"
style="font-size: 16px; color: #fff; width: 100%; height: 100%"
>
<view
style="
position: absolute;
bottom: 80px;
left: 15px;
color: #fff;
font-size: 14px;
"
>点击继续</view
><!--点击继续-->
</button>
<button
v-else-if="
!guides[guide_index].arrow ||
guides[guide_index].arrow.withcontinue
"
form-type="submit"
class="clear_button"
style="font-size: 16px; color: #fff; width: 100%; height: 100%"
>
<view
style="
position: absolute;
bottom: 80px;
left: 15px;
color: #fff;
font-size: 14px;
"
>点击继续</view
><!--点击继续-->
</button>
</form>
<image
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/plant/static/guides/guide_role.png"
mode="widthFix"
style="width: 100%; z-index: 30"
></image>
<view
style="
position: absolute;
z-index: 32;
color: #fff;
top: 25px;
left: 15px;
width: 220px;
font-size: 14px;
"
>
{{ guides[guide_index].text }}
</view>
</view>
</view>
</view>
</template> </template>
<script> <script>
import utils from "@/plant/plant/common/utils.js" import utils from "@/plant/plant/common/utils.js";
import server from "@/plant/plant/common/server.js" import server from "@/plant/plant/common/server.js";
import api from "@/plant/plant/common/api.js" import api from "@/plant/plant/common/api.js";
export default { export default {
props:{ props: {
show:{ show: {
type:Boolean, type: Boolean,
default:false default: false,
}, },
guides:{ guides: {
type:Array, type: Array,
default(){ default() {
return []; return [];
} },
} },
}, },
data() { data() {
return { return {
guide_index:0, guide_index: 0,
delay_done:true delay_done: true,
}; };
}, },
methods:{ methods: {
touch_end:function(e){ touch_end: function (e) {
//click //click
var touch=e.changedTouches[0]; var touch = e.changedTouches[0];
var guide_item=this.guides[this.guide_index]; var guide_item = this.guides[this.guide_index];
var arrow=guide_item.arrow; var arrow = guide_item.arrow;
if(arrow){ if (arrow) {
var distance=utils.get2PointDistance(touch.clientX,touch.clientY,arrow.x+23,arrow.y+65); var distance = utils.get2PointDistance(
if(arrow.id&&distance<=44){ touch.clientX,
this.$emit("arrow_clicked",guide_item,arrow.id); touch.clientY,
this.next_guide(); arrow.x + 23,
} arrow.y + 65
} );
}, if (arrow.id && distance <= 44) {
next_clicked:function(e){ this.$emit("arrow_clicked", guide_item, arrow.id);
if(e&&e.detail&&e.detail.formId)utils.report_formid(e.detail.formId); this.next_guide();
this.next_guide(); }
}, }
next_guide:function(){ },
var that=this; next_clicked: function (e) {
if(this.guide_index<this.guides.length-1){ if (e && e.detail && e.detail.formId)
this.guide_index+=1; utils.report_formid(e.detail.formId);
var item=this.guides[this.guide_index]; this.next_guide();
if(item.delay){ },
that.delay_done=false; next_guide: function () {
setTimeout(function(){ var that = this;
that.delay_done=true; if (this.guide_index < this.guides.length - 1) {
},item.delay); this.guide_index += 1;
}else{ var item = this.guides[this.guide_index];
that.delay_done=true; if (item.delay) {
} that.delay_done = false;
}else{ setTimeout(function () {
this.$emit("finished"); that.delay_done = true;
} }, item.delay);
}, } else {
get_user_info:function(e){ that.delay_done = true;
var that=this; }
var user_info=e.detail.userInfo; } else {
if(user_info){ this.$emit("finished");
user_info.openid=global.user_info.openid; }
server.post_api(api.POST_USER_INFO,user_info,{ },
success:function(res){ get_user_info: function (e) {
if(res.err==0){ var that = this;
if(res.result.user_info){ var user_info = e.detail.userInfo;
global.user_info=res.result.user_info; if (user_info) {
that.next_guide(); user_info.openid = global.user_info.openid;
that.$emit("login_success"); server.post_api(api.POST_USER_INFO, user_info, {
}else{ success: function (res) {
utils.show_alert("未知错误"); if (res.err == 0) {
} if (res.result.user_info) {
} global.user_info = res.result.user_info;
}, that.next_guide();
fail:function(res){ that.$emit("login_success");
utils.show_alert(res.msg); } else {
} utils.show_alert("未知错误");
}); }
}else{ }
that.next_guide(); },
} fail: function (res) {
} utils.show_alert(res.msg);
} },
} });
} else {
that.next_guide();
}
},
},
};
</script> </script>
<style> <style>
@keyframes ani-jump{ @keyframes ani-jump {
0%{ 0% {
transform: translateY(0px); transform: translateY(0px);
} }
50%{ 50% {
transform: translateY(-10px); transform: translateY(-10px);
} }
100%{ 100% {
transform: translateY(0px); transform: translateY(0px);
} }
} }
.arrow-jump .arrow-jump {
{ animation: ani-jump 2s infinite;
animation: ani-jump 2s infinite; }
}
button{ button {
background: transparent; background: transparent;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -673,7 +673,7 @@
<view class="m-cell-bd"> <view class="m-cell-bd">
<view class="m-order-title" > <view class="m-order-title" >
<view style="float:left;"> <view style="float:left;">
<image class="nav-image" lazy-load style="width:60rpx;height:60rpx;" :src="(user.user_avatar?user.user_avatar:'https://static.lancerdt.com/demodata/assets/data/avatar.png')" mode="scaleToFill" /> <image class="nav-image" lazy-load style="width:60rpx;height:60rpx;" :src="(user.user_avatar?user.user_avatar:'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/demodata/assets/data/avatar.png')" mode="scaleToFill" />
</view> </view>
<view style="float:left;margin-left:20rpx"> <view style="float:left;margin-left:20rpx">
<view class="m-ber-n">{{user.user_account}}</view> <view class="m-ber-n">{{user.user_account}}</view>

View File

@ -51,7 +51,7 @@ var emojiData = {
{ url: '18.gif', alt: '[抓狂]' }, { url: '18.gif', alt: '[抓狂]' },
{ url: '19.gif', alt: '[吐]' }, { url: '19.gif', alt: '[吐]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
@ -76,7 +76,7 @@ var emojiData = {
{ url: '38.gif', alt: '[敲打]' }, { url: '38.gif', alt: '[敲打]' },
{ url: '39.gif', alt: '[再见]' }, { url: '39.gif', alt: '[再见]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '40.gif', alt: '[擦汗]' }, { url: '40.gif', alt: '[擦汗]' },
@ -100,7 +100,7 @@ var emojiData = {
{ url: '58.gif', alt: '[篮球]' }, { url: '58.gif', alt: '[篮球]' },
{ url: '59.gif', alt: '[乒乓]' }, { url: '59.gif', alt: '[乒乓]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '60.gif', alt: '[咖啡]' }, { url: '60.gif', alt: '[咖啡]' },
@ -124,7 +124,7 @@ var emojiData = {
{ url: '78.gif', alt: '[拥抱]' }, { url: '78.gif', alt: '[拥抱]' },
{ url: '79.gif', alt: '[强]' }, { url: '79.gif', alt: '[强]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '80.gif', alt: '[弱]' }, { url: '80.gif', alt: '[弱]' },
@ -148,7 +148,7 @@ var emojiData = {
{ url: '98.gif', alt: '[跳绳]' }, { url: '98.gif', alt: '[跳绳]' },
{ url: '99.gif', alt: '[投降]' }, { url: '99.gif', alt: '[投降]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '100.gif', alt: '[激动]' }, { url: '100.gif', alt: '[激动]' },
@ -157,7 +157,7 @@ var emojiData = {
{ url: '103.gif', alt: '[左太极]' }, { url: '103.gif', alt: '[左太极]' },
{ url: '104.gif', alt: '[右太极]' }, { url: '104.gif', alt: '[右太极]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
] ]
] ]
}, },
@ -166,7 +166,7 @@ var emojiData = {
emojiName:"huoxinList", emojiName:"huoxinList",
emojiSort:2, emojiSort:2,
minEmoji:true, minEmoji:true,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/huoxin/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/huoxin/",
emojiList: [ emojiList: [
[ [
{ url: 'q_000.png', alt: '[测试1]' }, { url: 'q_000.png', alt: '[测试1]' },
@ -190,7 +190,7 @@ var emojiData = {
{ url: 'q_018.png', alt: '[]' }, { url: 'q_018.png', alt: '[]' },
{ url: 'q_019.png', alt: '[]' }, { url: 'q_019.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_020.png', alt: '[]' }, { url: 'q_020.png', alt: '[]' },
@ -214,7 +214,7 @@ var emojiData = {
{ url: 'q_038.png', alt: '[]' }, { url: 'q_038.png', alt: '[]' },
{ url: 'q_039.png', alt: '[]' }, { url: 'q_039.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_040.png', alt: '[]' }, { url: 'q_040.png', alt: '[]' },
@ -238,7 +238,7 @@ var emojiData = {
{ url: 'q_058.png', alt: '[]' }, { url: 'q_058.png', alt: '[]' },
{ url: 'q_059.png', alt: '[]' }, { url: 'q_059.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_060.png', alt: '[]' }, { url: 'q_060.png', alt: '[]' },
@ -262,7 +262,7 @@ var emojiData = {
{ url: 'q_078.png', alt: '[]' }, { url: 'q_078.png', alt: '[]' },
{ url: 'q_079.png', alt: '[]' }, { url: 'q_079.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_080.png', alt: '[]' }, { url: 'q_080.png', alt: '[]' },
@ -285,7 +285,7 @@ var emojiData = {
{ url: 'q_097.png', alt: '[]' }, { url: 'q_097.png', alt: '[]' },
{ url: 'q_098.png', alt: '[]' }, { url: 'q_098.png', alt: '[]' },
{ url: 'q_099.png', alt: '[]' }, { url: 'q_099.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_101.png', alt: '[]' }, { url: 'q_101.png', alt: '[]' },
@ -308,7 +308,7 @@ var emojiData = {
{ url: 'q_118.png', alt: '[]' }, { url: 'q_118.png', alt: '[]' },
{ url: 'q_119.png', alt: '[]' }, { url: 'q_119.png', alt: '[]' },
{ url: 'q_120.png', alt: '[]' }, { url: 'q_120.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_121.png', alt: '[]' }, { url: 'q_121.png', alt: '[]' },
@ -331,7 +331,7 @@ var emojiData = {
{ url: 'q_138.png', alt: '[]' }, { url: 'q_138.png', alt: '[]' },
{ url: 'q_139.png', alt: '[]' }, { url: 'q_139.png', alt: '[]' },
{ url: 'q_140.png', alt: '[]' }, { url: 'q_140.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_141.png', alt: '[]' }, { url: 'q_141.png', alt: '[]' },
@ -354,7 +354,7 @@ var emojiData = {
{ url: 'q_158.png', alt: '[]' }, { url: 'q_158.png', alt: '[]' },
{ url: 'q_159.png', alt: '[]' }, { url: 'q_159.png', alt: '[]' },
{ url: 'q_160.png', alt: '[]' }, { url: 'q_160.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'q_161.png', alt: '[]' }, { url: 'q_161.png', alt: '[]' },
@ -367,7 +367,7 @@ var emojiData = {
{ url: 'q_168.png', alt: '[]' }, { url: 'q_168.png', alt: '[]' },
{ url: 'q_169.png', alt: '[]' }, { url: 'q_169.png', alt: '[]' },
{ url: 'q_170.png', alt: '[]' }, { url: 'q_170.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
] ]
] ]
}, },
@ -376,7 +376,7 @@ var emojiData = {
emojiName:"dingdingList", emojiName:"dingdingList",
emojiSort:2, emojiSort:2,
minEmoji:true, minEmoji:true,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/dingding/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/dingding/",
emojiList: [ emojiList: [
[ [
{ url: 'emotion_001.png', alt: '[微笑]' }, { url: 'emotion_001.png', alt: '[微笑]' },
@ -399,7 +399,7 @@ var emojiData = {
{ url: 'emotion_018.png', alt: '[抱拳]' }, { url: 'emotion_018.png', alt: '[抱拳]' },
{ url: 'emotion_019.png', alt: '[握手]' }, { url: 'emotion_019.png', alt: '[握手]' },
{ url: 'emotion_020.png', alt: '[OK]' }, { url: 'emotion_020.png', alt: '[OK]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'emotion_021.png', alt: '[]' }, { url: 'emotion_021.png', alt: '[]' },
@ -422,7 +422,7 @@ var emojiData = {
{ url: 'emotion_038.png', alt: '[]' }, { url: 'emotion_038.png', alt: '[]' },
{ url: 'emotion_039.png', alt: '[]' }, { url: 'emotion_039.png', alt: '[]' },
{ url: 'emotion_040.png', alt: '[]' }, { url: 'emotion_040.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'emotion_041.png', alt: '[]' }, { url: 'emotion_041.png', alt: '[]' },
@ -445,7 +445,7 @@ var emojiData = {
{ url: 'emotion_058.png', alt: '[]' }, { url: 'emotion_058.png', alt: '[]' },
{ url: 'emotion_059.png', alt: '[]' }, { url: 'emotion_059.png', alt: '[]' },
{ url: 'emotion_060.png', alt: '[]' }, { url: 'emotion_060.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'emotion_061.png', alt: '[]' }, { url: 'emotion_061.png', alt: '[]' },
@ -468,7 +468,7 @@ var emojiData = {
{ url: 'emotion_078.png', alt: '[]' }, { url: 'emotion_078.png', alt: '[]' },
{ url: 'emotion_079.png', alt: '[]' }, { url: 'emotion_079.png', alt: '[]' },
{ url: 'emotion_080.png', alt: '[]' }, { url: 'emotion_080.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'emotion_081.png', alt: '[]' }, { url: 'emotion_081.png', alt: '[]' },
@ -491,7 +491,7 @@ var emojiData = {
{ url: 'emotion_098.png', alt: '[]' }, { url: 'emotion_098.png', alt: '[]' },
{ url: 'emotion_099.png', alt: '[]' }, { url: 'emotion_099.png', alt: '[]' },
{ url: 'emotion_100.png', alt: '[]' }, { url: 'emotion_100.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'emotion_101.png', alt: '[]' }, { url: 'emotion_101.png', alt: '[]' },
@ -514,7 +514,7 @@ var emojiData = {
{ url: 'emotion_118.png', alt: '[]' }, { url: 'emotion_118.png', alt: '[]' },
{ url: 'emotion_119.png', alt: '[]' }, { url: 'emotion_119.png', alt: '[]' },
{ url: 'emotion_120.png', alt: '[]' }, { url: 'emotion_120.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: 'emotion_121.png', alt: '[]' }, { url: 'emotion_121.png', alt: '[]' },
@ -537,7 +537,7 @@ var emojiData = {
{ url: 'emotion_138.png', alt: '[]' }, { url: 'emotion_138.png', alt: '[]' },
{ url: 'emotion_139.png', alt: '[]' }, { url: 'emotion_139.png', alt: '[]' },
{ url: 'emotion_140.png', alt: '[]' }, { url: 'emotion_140.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
] ]
] ]
}, },
@ -546,7 +546,7 @@ var emojiData = {
emojiName:"douyinList", emojiName:"douyinList",
emojiSort:3, emojiSort:3,
minEmoji:true, minEmoji:true,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/douyin/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/douyin/",
emojiList: [ emojiList: [
[ [
{ url: '0.png', alt: '[抖音1]' }, { url: '0.png', alt: '[抖音1]' },
@ -570,7 +570,7 @@ var emojiData = {
{ url: '18.png', alt: '[]' }, { url: '18.png', alt: '[]' },
{ url: '19.png', alt: '[]' }, { url: '19.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '20.png', alt: '[]' }, { url: '20.png', alt: '[]' },
@ -594,7 +594,7 @@ var emojiData = {
{ url: '38.png', alt: '[]' }, { url: '38.png', alt: '[]' },
{ url: '39.png', alt: '[]' }, { url: '39.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '40.png', alt: '[]' }, { url: '40.png', alt: '[]' },
@ -618,7 +618,7 @@ var emojiData = {
{ url: '58.png', alt: '[]' }, { url: '58.png', alt: '[]' },
{ url: '59.png', alt: '[]' }, { url: '59.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '60.png', alt: '[]' }, { url: '60.png', alt: '[]' },
@ -641,7 +641,7 @@ var emojiData = {
{ url: '77.png', alt: '[]' }, { url: '77.png', alt: '[]' },
{ url: '78.png', alt: '[]' }, { url: '78.png', alt: '[]' },
{ url: '79.png', alt: '[]' }, { url: '79.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '80.png', alt: '[]' }, { url: '80.png', alt: '[]' },
@ -665,7 +665,7 @@ var emojiData = {
{ url: '98.png', alt: '[]' }, { url: '98.png', alt: '[]' },
{ url: '99.png', alt: '[]' }, { url: '99.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '100.png', alt: '[]' }, { url: '100.png', alt: '[]' },
@ -689,7 +689,7 @@ var emojiData = {
{ url: '118.png', alt: '[]' }, { url: '118.png', alt: '[]' },
{ url: '119.png', alt: '[]' }, { url: '119.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '120.png', alt: '[]' }, { url: '120.png', alt: '[]' },
@ -713,12 +713,12 @@ var emojiData = {
{ url: '138.png', alt: '[]' }, { url: '138.png', alt: '[]' },
{ url: '139.png', alt: '[]' }, { url: '139.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
], ],
[ [
{ url: '140.png', alt: '[]' }, { url: '140.png', alt: '[]' },
{ url: '141.png', alt: '[]' }, { url: '141.png', alt: '[]' },
{ url: 'https://static.lancerdt.com/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' } { url: 'https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/tab/delete2.png', alt: '[删除]' }
] ]
] ]
}, },
@ -726,7 +726,7 @@ var emojiData = {
emojiName:"ajmdList", emojiName:"ajmdList",
emojiSort:4, emojiSort:4,
minEmoji:false, minEmoji:false,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/ajmd/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/ajmd/",
emojiList: [ emojiList: [
[ [
{ url: '0.png', alt: '[ajmd1]' }, { url: '0.png', alt: '[ajmd1]' },
@ -794,7 +794,7 @@ var emojiData = {
emojiName:"gongfuhuList", emojiName:"gongfuhuList",
emojiSort:5, emojiSort:5,
minEmoji:false, minEmoji:false,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/gongfuhu/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/gongfuhu/",
emojiList: [ emojiList: [
[ [
{ url: '0.gif', alt: '[]' }, { url: '0.gif', alt: '[]' },
@ -841,7 +841,7 @@ var emojiData = {
emojiName:"xxyList", emojiName:"xxyList",
emojiSort:6, emojiSort:6,
minEmoji: false, minEmoji: false,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/xxy/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/xxy/",
emojiList: [ emojiList: [
[ [
{ url: '0.png', alt: '[]' }, { url: '0.png', alt: '[]' },
@ -899,7 +899,7 @@ var emojiData = {
emojiName:"feineneList", emojiName:"feineneList",
emojiSort:7, emojiSort:7,
minEmoji: false, minEmoji: false,
emojiPath:"https://static.lancerdt.com/xcxfile/appicon/im/img/feinene/", emojiPath:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/im/img/feinene/",
emojiList: [ emojiList: [
[ [
{ url: '0.gif', alt: '[]' }, { url: '0.gif', alt: '[]' },

Binary file not shown.

BIN
static/images/login-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

BIN
static/images/qishou.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -12,6 +12,7 @@ import $cookies from '../helpers/vue-cookies';
import Config from '../config/config' import Config from '../config/config'
import StateCode from '../config/statecode' import StateCode from '../config/statecode'
import Lang from '../config/lang' import Lang from '../config/lang'
import { $loginPopup } from '../helpers/loginPopup.js'
import notice from '../helpers/notice' import notice from '../helpers/notice'
@ -31,7 +32,7 @@ const STATE_KEY = 'STATE_KEY';
var ret = uni.getStorageSync(USERS_KEY); var ret = uni.getStorageSync(USERS_KEY);
let default_user_info = { let default_user_info = {
user_nickname: Lang.__("未注册用户"), user_nickname: Lang.__("未注册用户"),
user_avatar: "https://static.lancerdt.com/demodata/assets/data/avatar.png", user_avatar: "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/demodata/assets/data/avatar.png",
user_is_new: 1 user_is_new: 1
}; };
@ -55,7 +56,7 @@ const store = new Vuex.Store({
cartList: [], cartList: [],
cartMap: {}, cartMap: {},
newMsgNum: 0, newMsgNum: 0,
showLoginPopup:false,
plantformInfo: { plantformInfo: {
return_state_list: [ return_state_list: [
{ {
@ -203,12 +204,13 @@ const store = new Vuex.Store({
Lang: Lang Lang: Lang
}, },
mutations: { mutations: {
setShowLoginPopup(state,showLoginPopup){
state.showLoginPopup = Object.assign(state.showLoginPopup,showLoginPopup);
},
login(state, userInfo) { login(state, userInfo) {
if ('user_avatar' in userInfo) if ('user_avatar' in userInfo){
{ if (userInfo.user_avatar){
if (userInfo.user_avatar)
{
if(state.Config.HTTPS && userInfo.user_avatar.indexOf("https") == 0) if(state.Config.HTTPS && userInfo.user_avatar.indexOf("https") == 0)
{ {
} }
@ -233,44 +235,43 @@ const store = new Vuex.Store({
} }
else else
{ {
userInfo.user_avatar = "https://static.lancerdt.com/demodata/assets/data/avatar.png"; userInfo.user_avatar = "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/demodata/assets/data/avatar.png";
} }
} }
userInfo = Object.assign(state.userInfo, userInfo); userInfo = Object.assign(state.userInfo, userInfo);
state.userInfo = userInfo; state.userInfo = userInfo;
state.userName = userInfo.user_nickname || Lang.__('未注册用户'); state.userName = userInfo.user_nickname || Lang.__('未注册用户');
state.hasLogin = true; state.hasLogin = true;
//保存基本信息 //保存基本信息
uni.setStorageSync(USERS_KEY, JSON.stringify(userInfo)); uni.setStorageSync(USERS_KEY, JSON.stringify(userInfo));
//强制授权读取小程序或者公众号手机号 //强制授权读取小程序或者公众号手机号
if ('as' in userInfo) if ('as' in userInfo){
{ if (userInfo.as)
if (userInfo.as) {
{ }
} else
else {
{ if (Config.FORCE_BIND_MOBILE)
if (Config.FORCE_BIND_MOBILE) {
{ // setTimeout(()=>{
setTimeout(()=>{ // $.confirm(Lang.__('绑定手机号码'),
$.confirm(Lang.__('绑定手机号码'), // function(data) {
function(data) { // if (data.confirm) {
if (data.confirm) { // //绑定手机操作
//绑定手机操作 // $.gopage("/member/member/bindphone");
$.gopage("/member/member/bindphone"); // }
} // },true);
},true); // }, 2000)
}, 2000) }
} }
}
} }
}, },
logout(state, payload) { logout(state, payload) {
if ($.source_data.source_type == StateCode.SOURCE_TYPE_APP) if ($.source_data.source_type == StateCode.SOURCE_TYPE_APP)
@ -306,65 +307,69 @@ const store = new Vuex.Store({
state.chatTolist={};///当前聊天对话的里面是聊天的对象和 state.chatTolist={};///当前聊天对话的里面是聊天的对象和
state.currentChatPuid=''; state.currentChatPuid='';
try { try {
uni.closeSocket(); uni.closeSocket();
} catch (s) {} } catch (s) {}
if (payload) if (payload)
{ {
$.toLogin(state.forcedLoginState); $.toLogin(state.forcedLoginState);
} }
}, },
forceUserInfo(state, callback) { forceUserInfo(state, callback) {
var that = this; var that = this;
//记录来源页面
var pages = getCurrentPages();
var page = pages[pages.length - 1];
//记录来源页面 //page.route != 'pagesub/login/login' && page.route != 'pages/index/member'
var pages = getCurrentPages();
var page = pages[pages.length - 1];
//page.route != 'pagesub/login/login' && page.route != 'pages/index/member' if (page.route.indexOf("/login/") != -1) {
uni.setStorageSync('pre_route', page.route);
if (page.route.indexOf("/login/") != -1) { if (page.options) {
uni.setStorageSync('pre_route', page.route); uni.setStorageSync('pre_options', page.options);
if (page.options) {
uni.setStorageSync('pre_options', page.options);
}
}
if (!state.hasLogin) {
if (state.forcedLoginState)
{
$.toLogin(true);
}
else
{
$.showModal({
title: Lang.__('未登录'),
content: Lang.__('您未登录,需要登录后才能继续'),
/**
* 如果需要强制登录不显示取消按钮
*/
showCancel: !state.forcedLoginState,
success: (res) => {
if (res.confirm) {
/**
* 如果需要强制登录使用reLaunch方式
*/
$.toLogin(state.forcedLoginState);
}
else
{
uni.navigateBack();
}
}
});
}
} }
else }
{
//判断当前用户是否存在,不存在读取? if (!state.hasLogin) {
callback && callback($.isEmptyObject(state.userInfo) ? null : state.userInfo);
if (state.forcedLoginState){
$.toLogin(true);
} }
else{
// #ifdef MP-WEIXIN
// #endif
// $loginPopup({show:true})
// this.commit("setShowLoginPopup",true);
// $.showModal({
// title: Lang.__('未登录'),
// content: Lang.__('您未登录,需要登录后才能继续'),
// /**
// * 如果需要强制登录,不显示取消按钮
// */
// showCancel: !state.forcedLoginState,
// success: (res) => {
// if (res.confirm) {
// /**
// * 如果需要强制登录使用reLaunch方式
// */
// $.toLogin(state.forcedLoginState);
// }
// else{
// uni.navigateBack();
// }
// }
// });
}
}
else{
//判断当前用户是否存在,不存在读取?
callback && callback($.isEmptyObject(state.userInfo) ? null : state.userInfo);
}
}, },
setUserInfo: function (state, payload) { setUserInfo: function (state, payload) {
state.userInfo = Object.assign(state.userInfo, payload); state.userInfo = Object.assign(state.userInfo, payload);
@ -427,7 +432,7 @@ const store = new Vuex.Store({
"RuleEnabled": false, "RuleEnabled": false,
"VendorFeatureSet": '', "VendorFeatureSet": '',
"ShopConfig": { "ShopConfig": {
"AppIconPath": "https://static.lancerdt.com/xcxfile/appicon/" "AppIconPath": "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/"
}, },
"store_star_num": data.analytics.store_evaluation_num ? (data.analytics.store_deliverycredit + data.analytics.store_deliverycredit + data.analytics.store_deliverycredit) / 3 / data.analytics.store_evaluation_num : 5, "store_star_num": data.analytics.store_evaluation_num ? (data.analytics.store_deliverycredit + data.analytics.store_deliverycredit + data.analytics.store_deliverycredit) / 3 / data.analytics.store_evaluation_num : 5,
"analytics": data.analytics, "analytics": data.analytics,
@ -968,9 +973,16 @@ const store = new Vuex.Store({
method: "GET", method: "GET",
data: param, data: param,
loading: false, loading: false,
success: function (data) { success: function (data,status,msg) {
let cartMap = {}; let cartMap = {};
if(status == 250){
uni.showToast({
title: "shop/userCart/lists" + msg,
icon: "error",
duration: 1000,
});
return;
}
//循环所有店铺 //循环所有店铺
if (!$.isNull(data.items) && data.items.length > 0) { if (!$.isNull(data.items) && data.items.length > 0) {
let total = 0; let total = 0;
@ -1021,6 +1033,7 @@ const store = new Vuex.Store({
data: provider.params, data: provider.params,
loading: false, loading: false,
success: (data, status, msg, code) => { success: (data, status, msg, code) => {
console.log(status)
if (status == 200) { if (status == 200) {
commit("setCartNum", { commit("setCartNum", {
type: provider.params.cart_quantity >0 ? 'add' : 'sub', type: provider.params.cart_quantity >0 ? 'add' : 'sub',
@ -1029,7 +1042,8 @@ const store = new Vuex.Store({
provider.callback && provider.callback(data, status, msg, code) provider.callback && provider.callback(data, status, msg, code)
} else { } else {
$.alert(msg); // $.alert(msg);
$.alert("点击太快了")
} }
}, },
fail: (err) => { fail: (err) => {

View File

@ -63,7 +63,7 @@ $brand-danger: #d9534f !default;
//## Settings for some of the most global styles. //## Settings for some of the most global styles.
// //
$body-bg: #f5f5f5 !default; $body-bg: #f4f4f4 !default;
// Global text color on `<body>`. // Global text color on `<body>`.
$text-color: $gray-dark !default; $text-color: $gray-dark !default;

View File

@ -11,6 +11,26 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-weixin:before {
content: "\e600";
}
.icon-dianpu2:before {
content: "\e623";
}
.icon-wancheng:before {
content: "\e606";
}
.icon-yundianxiaochengxu2_tongchengpeisong:before {
content: "\e640";
}
.icon-money-cny-circle-fill:before {
content: "\e7cd";
}
.icon-zengjiatianjiajiahao:before { .icon-zengjiatianjiajiahao:before {
content: "\e62a"; content: "\e62a";
} }
@ -42,4 +62,3 @@
.icon-dingwei:before { .icon-dingwei:before {
content: "\e65f"; content: "\e65f";
} }

Some files were not shown because too many files have changed in this diff Show More