update
This commit is contained in:
parent
789f8bb290
commit
3e26f6d3b4
28
App.vue
28
App.vue
@ -10,7 +10,6 @@ let jyappEvents = uni.requireNativePlugin("JY-FaceBookAppEvents");
|
||||
if (typeof jyappEvents != "undefined") {
|
||||
}
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -37,6 +36,7 @@ export default {
|
||||
}
|
||||
|
||||
let that = this;
|
||||
|
||||
uni.getSystemInfo({
|
||||
success: function (e) {
|
||||
//console.log(e); //获取到的res的值
|
||||
@ -2105,8 +2105,8 @@ form button {
|
||||
position: relative;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background: url(https://static.lancerdt.com/xcxfile/appicon/pc1.png) center
|
||||
no-repeat;
|
||||
background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/pc1.png)
|
||||
center no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
@ -2114,8 +2114,8 @@ form button {
|
||||
position: relative;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
background: url(https://static.lancerdt.com/xcxfile/appicon/pc2.png) center
|
||||
no-repeat;
|
||||
background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/pc2.png)
|
||||
center no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
@ -2129,8 +2129,8 @@ form button {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
line-height: 50rpx;
|
||||
background: url(https://static.lancerdt.com/xcxfile/appicon/pc3.png) center
|
||||
no-repeat;
|
||||
background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/pc3.png)
|
||||
center no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
@ -2526,7 +2526,7 @@ form button {
|
||||
.m-coupon-box-top {
|
||||
width: 600rpx;
|
||||
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;
|
||||
margin-bottom: -80rpx;
|
||||
}
|
||||
@ -2534,7 +2534,7 @@ form button {
|
||||
.m-coupon-box-bottom {
|
||||
width: 600rpx;
|
||||
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;
|
||||
margin-top: -70rpx;
|
||||
}
|
||||
@ -2612,7 +2612,7 @@ form button {
|
||||
.m-coupon-box-top {
|
||||
width: 600rpx;
|
||||
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;
|
||||
background-size: cover;
|
||||
}
|
||||
@ -2620,7 +2620,7 @@ form button {
|
||||
.m-coupon-box-top2 {
|
||||
width: 600rpx;
|
||||
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;
|
||||
background-size: cover;
|
||||
}
|
||||
@ -2628,7 +2628,7 @@ form button {
|
||||
.m-coupon-box-bottom {
|
||||
width: 600rpx;
|
||||
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;
|
||||
background-size: cover;
|
||||
}
|
||||
@ -2636,7 +2636,7 @@ form button {
|
||||
.m-coupon-box-content {
|
||||
width: 600rpx;
|
||||
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;
|
||||
background-size: cover;
|
||||
}
|
||||
@ -2650,7 +2650,7 @@ form button {
|
||||
.m-coupon-box-item {
|
||||
width: 460rpx;
|
||||
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;
|
||||
margin: 10rpx auto;
|
||||
background-size: contain;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -993,7 +993,7 @@ export default {
|
||||
width: 700rpx;
|
||||
height: 192rpx;
|
||||
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;
|
||||
background-size: contain;
|
||||
box-sizing: border-box;
|
||||
@ -1001,7 +1001,7 @@ export default {
|
||||
}
|
||||
|
||||
.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;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
@ -1,247 +1,301 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<scroll-view class="m-scrollBox" scroll-y="true">
|
||||
<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">
|
||||
<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>
|
||||
<view class="page">
|
||||
<scroll-view class="m-scrollBox" scroll-y="true">
|
||||
<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"
|
||||
>
|
||||
<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="item-left-top">{{__('¥')}}<label style="font-size:64rpx">{{item.voucher_price}}</label></view>
|
||||
<view class="item-left-bottom">{{sprintf(__('满(%s)可用'), item.voucher_subtotal)}}</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="coupon-item-left">
|
||||
<view class="item-left-top"
|
||||
>{{ __("¥")
|
||||
}}<label style="font-size: 64rpx">{{
|
||||
item.voucher_price
|
||||
}}</label></view
|
||||
>
|
||||
<view class="item-left-bottom">{{
|
||||
sprintf(__("满(%s)可用"), item.voucher_subtotal)
|
||||
}}</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>
|
||||
<image lazy-load src="/static/images/checked.png" class="image-checked" v-if="(item.user_voucher_id == id_checked)" />
|
||||
</view>
|
||||
<view class="item-desc"></view>
|
||||
</view>
|
||||
<image
|
||||
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>
|
||||
</block>
|
||||
<view class="m-nullcontent" v-else>
|
||||
<view class="m-nullpage-middle">
|
||||
<label class="iconfont icon-meiyougengduo"></label>
|
||||
<view class="m-null-tip">
|
||||
<text>{{__('亲~什么都没有')}}</text>
|
||||
<text>{{__('赶快去领券中心吧')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<button
|
||||
class="u-btn u-btn-default"
|
||||
style="margin-top: 30rpx"
|
||||
@click="uesnothing"
|
||||
>
|
||||
{{ __("不使用优惠券") }}
|
||||
</button>
|
||||
</block>
|
||||
<view class="m-nullcontent" v-else>
|
||||
<view class="m-nullpage-middle">
|
||||
<label class="iconfont icon-meiyougengduo"></label>
|
||||
<view class="m-null-tip">
|
||||
<text>{{ __("亲~什么都没有") }}</text>
|
||||
<text>{{ __("赶快去领券中心吧") }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $ from "../../helpers/util";
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex'
|
||||
import $ from "../../helpers/util";
|
||||
import { 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 {
|
||||
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.__('使用优惠券')
|
||||
});
|
||||
var voucher_items = $.parseJSON(options.val);
|
||||
this.setData({
|
||||
UserCoupon: voucher_items,
|
||||
id_checked: options.user_voucher_id,
|
||||
amount: options.amount,
|
||||
options: options,
|
||||
});
|
||||
|
||||
var voucher_items = $.parseJSON(options.val);
|
||||
this.setData({
|
||||
UserCoupon: voucher_items,
|
||||
id_checked: options.user_voucher_id,
|
||||
amount: options.amount,
|
||||
options: options,
|
||||
})
|
||||
if (options.ifcart) {
|
||||
this.getselect();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations([
|
||||
"login",
|
||||
"logout",
|
||||
"getPlantformInfo",
|
||||
"forceUserInfo",
|
||||
"getUserInfo",
|
||||
]),
|
||||
|
||||
if (options.ifcart) {
|
||||
this.getselect()
|
||||
}
|
||||
getselect: function () {
|
||||
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);
|
||||
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['login', 'logout', 'getPlantformInfo', 'forceUserInfo', 'getUserInfo']),
|
||||
this.setData({
|
||||
IsUseCoupon: 0,
|
||||
id_checked: parseInt(e.currentTarget.dataset.id),
|
||||
});
|
||||
|
||||
getselect: function() {
|
||||
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);
|
||||
that.goback();
|
||||
},
|
||||
uesnothing: function () {
|
||||
var that = this;
|
||||
|
||||
this.setData({
|
||||
IsUseCoupon: 0,
|
||||
id_checked: parseInt(e.currentTarget.dataset.id)
|
||||
});
|
||||
this.setData({
|
||||
IsUseCoupon: 0,
|
||||
id_checked: 0,
|
||||
});
|
||||
|
||||
that.goback();
|
||||
},
|
||||
uesnothing: function() {
|
||||
var that = this;
|
||||
this.goback();
|
||||
},
|
||||
goback: function () {
|
||||
var that = this;
|
||||
$.navigateBack(1, function () {
|
||||
var params = that.options;
|
||||
|
||||
this.setData({
|
||||
IsUseCoupon: 0,
|
||||
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)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
params.user_voucher_id = that.id_checked;
|
||||
that.notice.postNotificationName("RefreshCoupon", params);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
@import "../../styles/_variables";
|
||||
@import "../../styles/_variables";
|
||||
|
||||
.m-scrollBox {
|
||||
padding: 10rpx 10rpx 0rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.m-scrollBox {
|
||||
padding: 10rpx 10rpx 0rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.m-coupon-item {
|
||||
margin: 10rpx 10rpx 20rpx;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 190rpx;
|
||||
}
|
||||
.m-coupon-item {
|
||||
margin: 10rpx 10rpx 20rpx;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 190rpx;
|
||||
}
|
||||
|
||||
.m-coupon-item .item-bg {
|
||||
width: 710rpx;
|
||||
height: 190rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.m-coupon-item .item-bg {
|
||||
width: 710rpx;
|
||||
height: 190rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.coupon-item-left {
|
||||
position: absolute;
|
||||
color: white;
|
||||
text-align: center;
|
||||
width: 250rpx;
|
||||
padding: 25rpx 0rpx;
|
||||
}
|
||||
.coupon-item-left {
|
||||
position: absolute;
|
||||
color: white;
|
||||
text-align: center;
|
||||
width: 250rpx;
|
||||
padding: 25rpx 0rpx;
|
||||
}
|
||||
|
||||
.item-left-top {
|
||||
line-height: 100rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.item-left-top {
|
||||
line-height: 100rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.item-left-top label {
|
||||
font-size: 90rpx;
|
||||
}
|
||||
.item-left-top label {
|
||||
font-size: 90rpx;
|
||||
}
|
||||
|
||||
.item-left-bottom {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.item-left-bottom {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.coupon-item-right {
|
||||
position: absolute;
|
||||
left: 250rpx;
|
||||
top: 0;
|
||||
width: 420rpx;
|
||||
height: 170rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
font-size: 22rpx;
|
||||
color: gray;
|
||||
}
|
||||
.coupon-item-right {
|
||||
position: absolute;
|
||||
left: 250rpx;
|
||||
top: 0;
|
||||
width: 420rpx;
|
||||
height: 170rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
font-size: 22rpx;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
line-height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
height: 80rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
.item-title {
|
||||
line-height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
height: 80rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.item-title-black {
|
||||
color: #333;
|
||||
}
|
||||
.item-title-black {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.item-middle {
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.item-middle {
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.item-usenow {
|
||||
font-size: 24rpx;
|
||||
border: 1px solid $default-skin-bg;
|
||||
float: right;
|
||||
color: $default-skin-bg;
|
||||
border-radius: 40rpx;
|
||||
padding: 0 15rpx;
|
||||
position: relative;
|
||||
top: -8rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.item-usenow {
|
||||
font-size: 24rpx;
|
||||
border: 1px solid $default-skin-bg;
|
||||
float: right;
|
||||
color: $default-skin-bg;
|
||||
border-radius: 40rpx;
|
||||
padding: 0 15rpx;
|
||||
position: relative;
|
||||
top: -8rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.item-desc {
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
margin-top: 5rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
}
|
||||
.item-desc {
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
margin-top: 5rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
}
|
||||
|
||||
.image-checked {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
bottom: 0;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
.image-checked {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
bottom: 0;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,198 +1,240 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="search">
|
||||
<slot></slot>
|
||||
<template>
|
||||
<input maxlength="20" type="text" value="" confirm-type="search" @confirm="searchStart()" :placeholder="__('请输入兑换码')" v-model="code" />
|
||||
</template>
|
||||
<!-- <image src="https://static.lancerdt.com/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>
|
||||
<view class="page">
|
||||
<view class="search">
|
||||
<slot></slot>
|
||||
<template>
|
||||
<input
|
||||
maxlength="20"
|
||||
type="text"
|
||||
value=""
|
||||
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)">
|
||||
<view class="m-cells m-cells-form">
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd" style="width: 140rpx;"><label class="u-label">{{activityInfo.activity_title}}</label></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-product-list">
|
||||
<view v-for="(item, ii) in activityInfo.items" :key="ii" class="m-product-item">
|
||||
<view class="m-product-img">
|
||||
<image :src="item.product_image" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="m-product-info">
|
||||
<view class="m-product-name">
|
||||
<label>{{ item.product_name }}</label>
|
||||
</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>
|
||||
<block v-if="isData">
|
||||
<view class="m-cells m-cells-form">
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd" style="width: 140rpx"
|
||||
><label class="u-label">{{
|
||||
activityInfo.activity_title
|
||||
}}</label></view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-product-list">
|
||||
<view
|
||||
v-for="(item, ii) in activityInfo.items"
|
||||
:key="ii"
|
||||
class="m-product-item"
|
||||
>
|
||||
<view class="m-product-img">
|
||||
<image :src="item.product_image" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="m-product-info">
|
||||
<view class="m-product-name">
|
||||
<label>{{ item.product_name }}</label>
|
||||
</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>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
|
||||
export default {
|
||||
data: function() {
|
||||
return {
|
||||
code: '',
|
||||
activityInfo: {},
|
||||
isData: false,
|
||||
};
|
||||
},
|
||||
computed: mapState(['Config', 'StateCode', 'notice', 'plantformInfo', 'shopInfo', 'userInfo', 'hasLogin']),
|
||||
onLoad: function(options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.__('礼包兑换')
|
||||
});
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
code: "",
|
||||
activityInfo: {},
|
||||
isData: false,
|
||||
};
|
||||
},
|
||||
computed: mapState([
|
||||
"Config",
|
||||
"StateCode",
|
||||
"notice",
|
||||
"plantformInfo",
|
||||
"shopInfo",
|
||||
"userInfo",
|
||||
"hasLogin",
|
||||
]),
|
||||
onLoad: function (options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.__("礼包兑换"),
|
||||
});
|
||||
|
||||
var that = this;
|
||||
this.forceUserInfo(function(user) {
|
||||
console.log(user);
|
||||
that.setData({
|
||||
serial_code: user.serial_code
|
||||
});
|
||||
});
|
||||
},
|
||||
var that = this;
|
||||
this.forceUserInfo(function (user) {
|
||||
console.log(user);
|
||||
that.setData({
|
||||
serial_code: user.serial_code,
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapMutations(['login', 'logout', 'getPlantformInfo', 'forceUserInfo', 'getUserInfo']),
|
||||
searchStart(e) {
|
||||
var that = this;
|
||||
if (!this.code) {
|
||||
that.$.alert("请输入兑换码!");
|
||||
return;
|
||||
}
|
||||
var params = {
|
||||
code: this.code
|
||||
};
|
||||
that.$.request({
|
||||
url: this.Config.URL.store.getActivityCodeList,
|
||||
method: 'post',
|
||||
data: params,
|
||||
success: function(data, status, msg, code) {
|
||||
if (status == 200) {
|
||||
that.setData({
|
||||
activityInfo: data,
|
||||
isData: true,
|
||||
})
|
||||
} else {
|
||||
that.$.alert(msg);
|
||||
that.setData({
|
||||
activityInfo: {},
|
||||
isData: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
...mapMutations([
|
||||
"login",
|
||||
"logout",
|
||||
"getPlantformInfo",
|
||||
"forceUserInfo",
|
||||
"getUserInfo",
|
||||
]),
|
||||
searchStart(e) {
|
||||
var that = this;
|
||||
if (!this.code) {
|
||||
that.$.alert("请输入兑换码!");
|
||||
return;
|
||||
}
|
||||
var params = {
|
||||
code: this.code,
|
||||
};
|
||||
that.$.request({
|
||||
url: this.Config.URL.store.getActivityCodeList,
|
||||
method: "post",
|
||||
data: params,
|
||||
success: function (data, status, msg, code) {
|
||||
if (status == 200) {
|
||||
that.setData({
|
||||
activityInfo: data,
|
||||
isData: true,
|
||||
});
|
||||
} else {
|
||||
that.$.alert(msg);
|
||||
that.setData({
|
||||
activityInfo: {},
|
||||
isData: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
submitInfo: function() {
|
||||
var that = this;
|
||||
var pat = []
|
||||
var items = this.activityInfo.activity_rule.quantity
|
||||
for (var i in items) {
|
||||
if (items[i].quantity > 0) {
|
||||
var t = items[i].item_id + '|' + items[i].quantity
|
||||
pat.push(t)
|
||||
}
|
||||
}
|
||||
submitInfo: function () {
|
||||
var that = this;
|
||||
var pat = [];
|
||||
var items = this.activityInfo.activity_rule.quantity;
|
||||
for (var i in items) {
|
||||
if (items[i].quantity > 0) {
|
||||
var t = items[i].item_id + "|" + items[i].quantity;
|
||||
pat.push(t);
|
||||
}
|
||||
}
|
||||
|
||||
if (pat.length <= 0) {
|
||||
that.$.alert("亲~请选择商品!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (pat.length <= 0) {
|
||||
that.$.alert("亲~请选择商品!");
|
||||
return
|
||||
}
|
||||
|
||||
var str = pat.join(',');
|
||||
that.$.navigateTo({
|
||||
url: "/pages/checkout/checkout?ifcart=0&cart_id=" + str + "&activity_id=" + that.activityInfo.activity_id + "&code=" + that.code
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
var str = pat.join(",");
|
||||
that.$.navigateTo({
|
||||
url:
|
||||
"/pages/checkout/checkout?ifcart=0&cart_id=" +
|
||||
str +
|
||||
"&activity_id=" +
|
||||
that.activityInfo.activity_id +
|
||||
"&code=" +
|
||||
that.code,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
.search {
|
||||
width: 640rpx;
|
||||
margin: 30rpx auto 20rpx;
|
||||
position: relative;
|
||||
.search {
|
||||
width: 640rpx;
|
||||
margin: 30rpx auto 20rpx;
|
||||
position: relative;
|
||||
|
||||
input {
|
||||
background-color: #ffffff;
|
||||
padding: 10rpx 74rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
input {
|
||||
background-color: #ffffff;
|
||||
padding: 10rpx 74rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.voice-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 16rpx 20rpx 16rpx 0;
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
top: 4rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
.voice-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 16rpx 20rpx 16rpx 0;
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
top: 4rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.search-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 16rpx 20rpx 16rpx 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -2rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
.search-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 16rpx 20rpx 16rpx 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -2rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
.m-product-img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
.m-product-img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.m-product-info {
|
||||
height: 120rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.m-product-info {
|
||||
height: 120rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.m-product-item {
|
||||
height: 120rpx;
|
||||
}
|
||||
.m-product-item {
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.m-product-name {
|
||||
height: 120rpx;
|
||||
.m-product-name {
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.m-product-name uni-label {
|
||||
-webkit-line-clamp: 1;
|
||||
}
|
||||
.m-product-name uni-label {
|
||||
-webkit-line-clamp: 1;
|
||||
}
|
||||
</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
@ -148,6 +148,7 @@
|
||||
<text class="iconfontAili icon-zengjiatianjiajiahao"></text>
|
||||
<text>新增收货地址</text>
|
||||
</view>
|
||||
<loginPopup :show="showLoginPopup" @close="closeLoginPopup"></loginPopup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -157,11 +158,12 @@
|
||||
import uMask from "./umask.vue";
|
||||
import BMapLib from "../helpers/GeoUtils.js";
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
|
||||
import loginPopup from "@/components/loginPopup.vue";
|
||||
var bmap = require("../libs/bmap-wx.js");
|
||||
export default {
|
||||
components: {
|
||||
uMask,
|
||||
loginPopup,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -183,6 +185,8 @@ export default {
|
||||
time: 0,
|
||||
searchAddress: [],
|
||||
labelList: ["", "家", "公司", "学校"],
|
||||
options: {},
|
||||
showLoginPopup: false,
|
||||
};
|
||||
},
|
||||
computed: mapState([
|
||||
@ -196,6 +200,9 @@ export default {
|
||||
]),
|
||||
onLoad(options) {
|
||||
console.log("options", options);
|
||||
if (options && options.isShopList) {
|
||||
this.options = options;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (this.userInfo.token) {
|
||||
@ -215,6 +222,17 @@ export default {
|
||||
uni.removeStorageSync("city");
|
||||
},
|
||||
methods: {
|
||||
...mapMutations([
|
||||
"login",
|
||||
"logout",
|
||||
"getPlantformInfo",
|
||||
"forceUserInfo",
|
||||
"getUserInfo",
|
||||
"setCartNum",
|
||||
]),
|
||||
closeLoginPopup() {
|
||||
this.showLoginPopup = false;
|
||||
},
|
||||
lableCalss(number) {
|
||||
if (number == 1) {
|
||||
return "item-lable-1";
|
||||
@ -229,8 +247,6 @@ export default {
|
||||
}
|
||||
},
|
||||
getAddressList() {
|
||||
console.log();
|
||||
|
||||
let that = this;
|
||||
that.$.request({
|
||||
url: that.Config.URL.user.address_lists,
|
||||
@ -253,6 +269,11 @@ export default {
|
||||
});
|
||||
},
|
||||
AddAddress() {
|
||||
if (!this.hasLogin) {
|
||||
this.showLoginPopup = true;
|
||||
return;
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: "/member/address/manage",
|
||||
});
|
||||
@ -265,15 +286,22 @@ export default {
|
||||
lat: item.ud_latitude,
|
||||
lng: item.ud_longitude,
|
||||
},
|
||||
...item,
|
||||
};
|
||||
uni.setStorageSync("currentAddress", group);
|
||||
} else {
|
||||
uni.setStorageSync("currentAddress", item);
|
||||
}
|
||||
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index",
|
||||
});
|
||||
if (this.options && this.options.isShopList) {
|
||||
uni.navigateTo({
|
||||
url: `/member/member/supermarketlList`,
|
||||
});
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index",
|
||||
});
|
||||
}
|
||||
},
|
||||
anewLoction() {
|
||||
uni.removeStorageSync("currentAddress");
|
||||
@ -587,8 +615,8 @@ export default {
|
||||
region: this.originalData.result.addressComponent.city,
|
||||
output: "json",
|
||||
city_limit: true,
|
||||
ak: "vMqiMPVK8i30Q5VOCDI3LWxgZqR2tfKa",
|
||||
ret_coordtype: "gcj02ll",
|
||||
ak: "qWKt2xbrqXsp2yK35YYXVBNZgrbiCG5v",
|
||||
};
|
||||
|
||||
let city = that.originalData.result.addressComponent.city;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,367 +1,454 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<movable-area class="move-area">
|
||||
<movable-view v-if="info.IsRedPacketIcon" inertia class="move-img" direction="all" @tap='IsShowRPK'>
|
||||
<image src="https://static.lancerdt.com/xcxfile/appicon/rpk_min.png"></image>
|
||||
</movable-view>
|
||||
<view style="background:#f8f8f8">
|
||||
<view class="paysuccess"><label>
|
||||
<image src="https://static.lancerdt.com/xcxfile/appicon/images/true.png" style="width:40rpx;height:40rpx;margin-top:8rpx"></image>
|
||||
</label><text style="margin-left:10rpx">{{info.trade_is_paid==StateCode.ORDER_PAID_STATE_YES ? __('已支付') : __('待付款')}}</text></view>
|
||||
<view class="content">
|
||||
<view class="store">{{info.store_name}}
|
||||
</view>
|
||||
<view class="details">
|
||||
<view class="details-left">
|
||||
<view class="charge"><text>{{__('消费金额')}}:<text style="color:red">{{Currency}}{{info.order_payment_amount}}</text></text></view>
|
||||
<view class="pay"><text>{{__('实际支付')}}:<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://static.lancerdt.com/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://static.lancerdt.com/xcxfile/appicon/img/gohome.png'></image>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="page">
|
||||
<movable-area class="move-area">
|
||||
<movable-view
|
||||
v-if="info.IsRedPacketIcon"
|
||||
inertia
|
||||
class="move-img"
|
||||
direction="all"
|
||||
@tap="IsShowRPK"
|
||||
>
|
||||
<image
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/rpk_min.png"
|
||||
></image>
|
||||
</movable-view>
|
||||
<view style="background: #f8f8f8">
|
||||
<view class="paysuccess"
|
||||
><label>
|
||||
<image
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/true.png"
|
||||
style="width: 40rpx; height: 40rpx; margin-top: 8rpx"
|
||||
></image> </label
|
||||
><text style="margin-left: 10rpx">{{
|
||||
info.trade_is_paid == StateCode.ORDER_PAID_STATE_YES
|
||||
? __("已支付")
|
||||
: __("待付款")
|
||||
}}</text></view
|
||||
>
|
||||
<view class="content">
|
||||
<view class="store">{{ info.store_name }} </view>
|
||||
<view class="details">
|
||||
<view class="details-left">
|
||||
<view class="charge"
|
||||
><text
|
||||
>{{ __("消费金额") }}:<text style="color: red"
|
||||
>{{ Currency }}{{ info.order_payment_amount }}</text
|
||||
></text
|
||||
></view
|
||||
>
|
||||
<view class="pay"
|
||||
><text
|
||||
>{{ __("实际支付") }}:<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>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex'
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
|
||||
export default {
|
||||
data: function() {
|
||||
return {
|
||||
info: {},
|
||||
deduction: 0,
|
||||
showRPK: false,
|
||||
ActivityGroupId: 0,
|
||||
maxRPK: 0,
|
||||
order_id: "",
|
||||
isshow1: false,
|
||||
Currency: "¥"
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
computed: mapState(['Config', 'StateCode', 'notice', 'plantformInfo', 'shopInfo', 'userInfo', 'hasLogin']),
|
||||
onLoad(options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.__('优惠买单')
|
||||
});
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
info: {},
|
||||
deduction: 0,
|
||||
showRPK: false,
|
||||
ActivityGroupId: 0,
|
||||
maxRPK: 0,
|
||||
order_id: "",
|
||||
isshow1: false,
|
||||
Currency: "¥",
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
computed: mapState([
|
||||
"Config",
|
||||
"StateCode",
|
||||
"notice",
|
||||
"plantformInfo",
|
||||
"shopInfo",
|
||||
"userInfo",
|
||||
"hasLogin",
|
||||
]),
|
||||
onLoad(options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.__("优惠买单"),
|
||||
});
|
||||
|
||||
var that = this;
|
||||
var that = this;
|
||||
|
||||
that.setData({
|
||||
order_id: options.order_id || ''
|
||||
});
|
||||
that.setData({
|
||||
order_id: options.order_id || "",
|
||||
});
|
||||
|
||||
that.load();
|
||||
},
|
||||
that.load();
|
||||
},
|
||||
|
||||
onUnload() {
|
||||
// 离开页面,注销事件
|
||||
var that = this
|
||||
},
|
||||
/*
|
||||
onUnload() {
|
||||
// 离开页面,注销事件
|
||||
var that = this;
|
||||
},
|
||||
/*
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
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
|
||||
.UserInfo.Id,
|
||||
success: function() {
|
||||
}
|
||||
}
|
||||
},*/
|
||||
methods: {
|
||||
...mapMutations(['login', 'logout', 'getPlantformInfo', 'forceUserInfo', 'getUserInfo']),
|
||||
methods: {
|
||||
...mapMutations([
|
||||
"login",
|
||||
"logout",
|
||||
"getPlantformInfo",
|
||||
"forceUserInfo",
|
||||
"getUserInfo",
|
||||
]),
|
||||
|
||||
load: function() {
|
||||
let that = this;
|
||||
load: function () {
|
||||
let that = this;
|
||||
|
||||
// 初始化页面
|
||||
that.$.request({
|
||||
type: 'post',
|
||||
url: this.Config.URL.pay.consume_trade_detail,
|
||||
data: {
|
||||
order_id: that.order_id
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function(data, status, msg, code) {
|
||||
//console.log("优惠买单:", data);
|
||||
that.setData({
|
||||
info: data,
|
||||
Currency: data.currency_symbol_left
|
||||
});
|
||||
// 初始化页面
|
||||
that.$.request({
|
||||
type: "post",
|
||||
url: this.Config.URL.pay.consume_trade_detail,
|
||||
data: {
|
||||
order_id: that.order_id,
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (data, status, msg, code) {
|
||||
//console.log("优惠买单:", data);
|
||||
that.setData({
|
||||
info: data,
|
||||
Currency: data.currency_symbol_left,
|
||||
});
|
||||
|
||||
false ? that.setData({
|
||||
isshow1: false
|
||||
}) : that.setData({
|
||||
isshow1: true
|
||||
});
|
||||
false
|
||||
? that.setData({
|
||||
isshow1: false,
|
||||
})
|
||||
: that.setData({
|
||||
isshow1: true,
|
||||
});
|
||||
|
||||
that.inputVal()
|
||||
}
|
||||
});
|
||||
},
|
||||
shareQRCode: function(a) {
|
||||
var e = this,
|
||||
t = {
|
||||
store_id: app.globalData.VendorInfo.Id,
|
||||
sponsorId: app.globalData.UserInfo.Id,
|
||||
imageUrl: "https://static.lancerdt.com/xcxfile/appicon/shareImg.png",
|
||||
path: "pages/redpacket/redpacket?g=" + this.data.ActivityGroupId + "&n=" + this.data.maxRPK + "&uid=" + app.globalData
|
||||
.UserInfo.Id,
|
||||
luckyOrder: this.data.maxRPK
|
||||
};
|
||||
$.xsr($.makeUrl(orderapi.ShareLuckyRedPacket, t), function(a) {
|
||||
e.setData({
|
||||
PageQRCodeInfo: {
|
||||
Path: a.Info,
|
||||
IsShare: true,
|
||||
IsShareBox: false,
|
||||
IsJT: true
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
shareBox: function() {
|
||||
this.setData({
|
||||
PageQRCodeInfo: {
|
||||
Path: "",
|
||||
IsShare: true,
|
||||
IsShareBox: true,
|
||||
IsJT: false
|
||||
}
|
||||
})
|
||||
},
|
||||
cancelShare: function() {
|
||||
this.setData({
|
||||
PageQRCodeInfo: {
|
||||
Path: "",
|
||||
IsShare: false,
|
||||
IsShareBox: false,
|
||||
IsJT: false
|
||||
}
|
||||
})
|
||||
},
|
||||
saveImg: function() {
|
||||
var e = this;
|
||||
$.loading(), wx.downloadFile({
|
||||
url: this.data.PageQRCodeInfo.Path,
|
||||
success: function(a) {
|
||||
$.hideloading(), wx.saveImageToPhotosAlbum({
|
||||
filePath: a.tempFilePath,
|
||||
success: function() {
|
||||
e.setData({
|
||||
PageQRCodeInfo: {
|
||||
Path: "",
|
||||
IsShare: false,
|
||||
IsShareBox: false,
|
||||
IsJT: false
|
||||
}
|
||||
}), $.alert("保存图片成功!"), $.xsr1($.makeUrl(orderapi.ShareCount, {
|
||||
sponsorId: app.globalData.UserInfo.Id,
|
||||
audienceType: 3,
|
||||
audienceId: 0,
|
||||
ContentType: 22,
|
||||
contentId: e.data.ActivityGroupId
|
||||
}))
|
||||
},
|
||||
fail: function(a) {
|
||||
$.hideloading(), console.log("保存图片失败:", a)
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: function(a) {
|
||||
$.hideloading()
|
||||
}
|
||||
})
|
||||
},
|
||||
showCodeImg: function() {
|
||||
wx.previewImage({
|
||||
current: this.data.PageQRCodeInfo.Path,
|
||||
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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
that.inputVal();
|
||||
},
|
||||
});
|
||||
},
|
||||
shareQRCode: function (a) {
|
||||
var e = this,
|
||||
t = {
|
||||
store_id: app.globalData.VendorInfo.Id,
|
||||
sponsorId: app.globalData.UserInfo.Id,
|
||||
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.UserInfo.Id,
|
||||
luckyOrder: this.data.maxRPK,
|
||||
};
|
||||
$.xsr($.makeUrl(orderapi.ShareLuckyRedPacket, t), function (a) {
|
||||
e.setData({
|
||||
PageQRCodeInfo: {
|
||||
Path: a.Info,
|
||||
IsShare: true,
|
||||
IsShareBox: false,
|
||||
IsJT: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
shareBox: function () {
|
||||
this.setData({
|
||||
PageQRCodeInfo: {
|
||||
Path: "",
|
||||
IsShare: true,
|
||||
IsShareBox: true,
|
||||
IsJT: false,
|
||||
},
|
||||
});
|
||||
},
|
||||
cancelShare: function () {
|
||||
this.setData({
|
||||
PageQRCodeInfo: {
|
||||
Path: "",
|
||||
IsShare: false,
|
||||
IsShareBox: false,
|
||||
IsJT: false,
|
||||
},
|
||||
});
|
||||
},
|
||||
saveImg: function () {
|
||||
var e = this;
|
||||
$.loading(),
|
||||
wx.downloadFile({
|
||||
url: this.data.PageQRCodeInfo.Path,
|
||||
success: function (a) {
|
||||
$.hideloading(),
|
||||
wx.saveImageToPhotosAlbum({
|
||||
filePath: a.tempFilePath,
|
||||
success: function () {
|
||||
e.setData({
|
||||
PageQRCodeInfo: {
|
||||
Path: "",
|
||||
IsShare: false,
|
||||
IsShareBox: false,
|
||||
IsJT: false,
|
||||
},
|
||||
}),
|
||||
$.alert("保存图片成功!"),
|
||||
$.xsr1(
|
||||
$.makeUrl(orderapi.ShareCount, {
|
||||
sponsorId: app.globalData.UserInfo.Id,
|
||||
audienceType: 3,
|
||||
audienceId: 0,
|
||||
ContentType: 22,
|
||||
contentId: e.data.ActivityGroupId,
|
||||
})
|
||||
);
|
||||
},
|
||||
fail: function (a) {
|
||||
$.hideloading(), console.log("保存图片失败:", a);
|
||||
},
|
||||
});
|
||||
},
|
||||
fail: function (a) {
|
||||
$.hideloading();
|
||||
},
|
||||
});
|
||||
},
|
||||
showCodeImg: function () {
|
||||
wx.previewImage({
|
||||
current: this.data.PageQRCodeInfo.Path,
|
||||
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>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
@import "../../styles/_variables";
|
||||
@import "../../styles/_variables";
|
||||
|
||||
.paysuccess {
|
||||
height: 160rpx;
|
||||
margin-left: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
}
|
||||
.paysuccess {
|
||||
height: 160rpx;
|
||||
margin-left: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 400rpx;
|
||||
background: #fff;
|
||||
padding: 0 30rpx
|
||||
}
|
||||
.content {
|
||||
height: 400rpx;
|
||||
background: #fff;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.store {
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
height: 80rpx;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
.store {
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
height: 80rpx;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.details {
|
||||
display: flex;
|
||||
font-size: 24rpx;
|
||||
color: #000;
|
||||
}
|
||||
.details {
|
||||
display: flex;
|
||||
font-size: 24rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.details-left {
|
||||
width: 35%;
|
||||
}
|
||||
.details-left {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.details-left view {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.details-left view {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.details-right {
|
||||
width: 65%;
|
||||
}
|
||||
.details-right {
|
||||
width: 65%;
|
||||
}
|
||||
|
||||
.details-right view {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.details-right view {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.m-footer-btn {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
text-align: right;
|
||||
border-top: 1rpx solid #d5d5d5;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.m-footer-btn {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
text-align: right;
|
||||
border-top: 1rpx solid #d5d5d5;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.u-link-btn {
|
||||
margin: 0 10rpx;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.u-link-btn {
|
||||
margin: 0 10rpx;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.move-area {
|
||||
position: absolute;
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.move-area {
|
||||
position: absolute;
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.move-img {
|
||||
height: 126rpx;
|
||||
width: 100rpx;
|
||||
z-index: 5;
|
||||
margin-top: 70%;
|
||||
margin-left: 650rpx;
|
||||
}
|
||||
.move-img {
|
||||
height: 126rpx;
|
||||
width: 100rpx;
|
||||
z-index: 5;
|
||||
margin-top: 70%;
|
||||
margin-left: 650rpx;
|
||||
}
|
||||
|
||||
.move-img image {
|
||||
height: 126rpx;
|
||||
width: 100rpx;
|
||||
}
|
||||
.move-img image {
|
||||
height: 126rpx;
|
||||
width: 100rpx;
|
||||
}
|
||||
|
||||
.shareRPK {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 5;
|
||||
}
|
||||
.shareRPK {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.shareRPKBox {
|
||||
width: 640rpx;
|
||||
height: 698rpx;
|
||||
background-color: red;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 50%;
|
||||
margin-left: -320rpx;
|
||||
margin-top: -349rpx;
|
||||
}
|
||||
.shareRPKBox {
|
||||
width: 640rpx;
|
||||
height: 698rpx;
|
||||
background-color: red;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 50%;
|
||||
margin-left: -320rpx;
|
||||
margin-top: -349rpx;
|
||||
}
|
||||
|
||||
.sendRPK {
|
||||
width: 222rpx;
|
||||
height: 70rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -100rpx;
|
||||
top: 50%;
|
||||
margin-top: 140rpx;
|
||||
}
|
||||
.sendRPK {
|
||||
width: 222rpx;
|
||||
height: 70rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -100rpx;
|
||||
top: 50%;
|
||||
margin-top: 140rpx;
|
||||
}
|
||||
|
||||
.closeRPK {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -22rpx;
|
||||
bottom: 25rpx;
|
||||
}
|
||||
.closeRPK {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -22rpx;
|
||||
bottom: 25rpx;
|
||||
}
|
||||
|
||||
.shareCodeImg {
|
||||
height: 800rpx;
|
||||
}
|
||||
.shareCodeImg {
|
||||
height: 800rpx;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
</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
@ -63,9 +63,9 @@
|
||||
<cover-view class="right-text"></cover-view>
|
||||
<!-- #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 -->
|
||||
<text class="right-text">{{item.story_like_count}}</text>
|
||||
@ -75,7 +75,7 @@
|
||||
<!-- #endif -->
|
||||
|
||||
<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 -->
|
||||
<text class="right-text">{{item.story_comment_count}}</text>
|
||||
@ -84,7 +84,7 @@
|
||||
<cover-view class="right-text">{{item.story_comment_count}}</cover-view>
|
||||
<!-- #endif -->
|
||||
<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 -->
|
||||
<text class="right-text">{{__('分享')}}</text>
|
||||
@ -95,7 +95,7 @@
|
||||
</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>
|
||||
</div>
|
||||
|
||||
|
||||
@ -57,9 +57,9 @@
|
||||
<cover-view class="right-text"></cover-view>
|
||||
<!-- #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 -->
|
||||
<text class="right-text">{{item.story_like_count}}</text>
|
||||
@ -69,7 +69,7 @@
|
||||
<!-- #endif -->
|
||||
|
||||
<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 -->
|
||||
<text class="right-text">{{item.story_comment_count}}</text>
|
||||
@ -78,7 +78,7 @@
|
||||
<cover-view class="right-text">{{item.story_comment_count}}</cover-view>
|
||||
<!-- #endif -->
|
||||
<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 -->
|
||||
<text class="right-text">{{__('分享')}}</text>
|
||||
@ -89,7 +89,7 @@
|
||||
</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>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,171 +1,202 @@
|
||||
|
||||
<template>
|
||||
<view>
|
||||
<!-- 新手大礼包 -->
|
||||
<view :class="['msk', (!user_is_new || isClosed)?'hide':'']" @tap="cancel">
|
||||
<view class="msk_box" url="../receivecontent/receivecontent" @tap="innertouch">
|
||||
<image src="https://static.lancerdt.com/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 class="btn_receivenow" @tap="receivenow"></view>
|
||||
<view class="btn_cancel" @tap="cancel">✕</view>
|
||||
</view>
|
||||
<view>
|
||||
<!-- 新手大礼包 -->
|
||||
<view
|
||||
:class="['msk', !user_is_new || isClosed ? 'hide' : '']"
|
||||
@tap="cancel"
|
||||
>
|
||||
<view
|
||||
class="msk_box"
|
||||
url="../receivecontent/receivecontent"
|
||||
@tap="innertouch"
|
||||
>
|
||||
<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 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="m-coupon-box" @tap="innertouch">
|
||||
<view :class="mskType==1?'m-coupon-box-top':'m-coupon-box-top2'"></view>
|
||||
<view class="m-coupon-box-content">
|
||||
<scroll-view scroll-y="true" class="m-coupon-box-list">
|
||||
<view class="m-coupon-box-item" v-for="(item, index) in coupon_rows" :key="index">
|
||||
<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-right'><label>{{sprintf(__('有效日期至:%s'), item.voucher_end_date || item.activity_endtime)}}</label>
|
||||
<text>{{item.activity_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="m-coupon-box-bottom"></view>
|
||||
<view class="close_msk" @tap="cancelsuccess">
|
||||
<image style="width:50rpx;height:50rpx"
|
||||
src="https://static.lancerdt.com/xcxfile/appicon/img/delete.png"></image>
|
||||
</view>
|
||||
<view class="msk1" @tap="cancelsuccess" v-if="isShowSuccessBox">
|
||||
<view class="m-coupon-box" @tap="innertouch">
|
||||
<view
|
||||
:class="mskType == 1 ? 'm-coupon-box-top' : 'm-coupon-box-top2'"
|
||||
></view>
|
||||
<view class="m-coupon-box-content">
|
||||
<scroll-view scroll-y="true" class="m-coupon-box-list">
|
||||
<view
|
||||
class="m-coupon-box-item"
|
||||
v-for="(item, index) in coupon_rows"
|
||||
:key="index"
|
||||
>
|
||||
<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-right"
|
||||
><label>{{
|
||||
sprintf(
|
||||
__("有效日期至:%s"),
|
||||
item.voucher_end_date || item.activity_endtime
|
||||
)
|
||||
}}</label>
|
||||
<text>{{ item.activity_name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="m-coupon-box-bottom"></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>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex'
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
|
||||
import $ from "../../helpers/util";
|
||||
import $ from "../../helpers/util";
|
||||
|
||||
export default{
|
||||
props:{
|
||||
Coupons:{
|
||||
type:Object,
|
||||
default:{}
|
||||
},
|
||||
user_is_new:{
|
||||
type:Number,
|
||||
default:0
|
||||
},
|
||||
CouponAmount:{
|
||||
type:Number,
|
||||
default:0.00
|
||||
},
|
||||
mskType:{
|
||||
type:Number,
|
||||
default:1
|
||||
}
|
||||
},
|
||||
computed: mapState(['Config', 'StateCode', 'notice', 'plantformInfo', 'shopInfo', 'userInfo', 'hasLogin', '__']),
|
||||
data(){
|
||||
return{
|
||||
isShowSuccessBox:false,
|
||||
isClosed:false,
|
||||
coupon_rows:[]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods:{
|
||||
...mapMutations(['login', 'logout', 'getPlantformInfo', 'forceUserInfo', 'getUserInfo', 'showCartNum']),
|
||||
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
|
||||
};
|
||||
export default {
|
||||
props: {
|
||||
Coupons: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
user_is_new: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
CouponAmount: {
|
||||
type: Number,
|
||||
default: 0.0,
|
||||
},
|
||||
mskType: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
},
|
||||
computed: mapState([
|
||||
"Config",
|
||||
"StateCode",
|
||||
"notice",
|
||||
"plantformInfo",
|
||||
"shopInfo",
|
||||
"userInfo",
|
||||
"hasLogin",
|
||||
"__",
|
||||
]),
|
||||
data() {
|
||||
return {
|
||||
isShowSuccessBox: false,
|
||||
isClosed: false,
|
||||
coupon_rows: [],
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
...mapMutations([
|
||||
"login",
|
||||
"logout",
|
||||
"getPlantformInfo",
|
||||
"forceUserInfo",
|
||||
"getUserInfo",
|
||||
"showCartNum",
|
||||
]),
|
||||
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) => {
|
||||
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.login({user_is_new:0});
|
||||
|
||||
that.setData({isShowSuccessBox: true, coupon_rows: data.items})
|
||||
} else {
|
||||
$.alert(msg);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
that.setData({
|
||||
isShowSuccessBox: true,
|
||||
coupon_rows: data.items,
|
||||
});
|
||||
|
||||
}
|
||||
} else {
|
||||
$.alert(msg);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.video{
|
||||
width: 750rpx;
|
||||
}
|
||||
.video {
|
||||
width: 750rpx;
|
||||
}
|
||||
|
||||
.top{
|
||||
position: absolute;
|
||||
top:0;
|
||||
background-image: linear-gradient(to top , rgba(0,0,0,0) , rgba(0,0,0,0.7));
|
||||
width: 750rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
.bottom{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
background-image: linear-gradient(to top , rgba(0,0,0,0.7) , rgba(0,0,0,0));
|
||||
width: 750rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
.progressBar{
|
||||
border-radius: 2rpx;
|
||||
height: 4rpx;
|
||||
background-color: #FFFFFF;
|
||||
z-index: 999999;
|
||||
position: absolute;
|
||||
bottom: 40rpx;
|
||||
//#ifndef APP-PLUS-NVUE
|
||||
animation: flicker 4s linear infinite;
|
||||
animation-direction:alternate;
|
||||
//#endif
|
||||
}
|
||||
//#ifndef APP-PLUS-NVUE
|
||||
@keyframes flicker {
|
||||
0% { box-shadow:0 0 0 #FFFFFF; }
|
||||
/** 暂停效果 */
|
||||
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
|
||||
.top {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
background-image: linear-gradient(
|
||||
to top,
|
||||
rgba(0, 0, 0, 0),
|
||||
rgba(0, 0, 0, 0.7)
|
||||
);
|
||||
width: 750rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
.bottom {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
background-image: linear-gradient(
|
||||
to top,
|
||||
rgba(0, 0, 0, 0.7),
|
||||
rgba(0, 0, 0, 0)
|
||||
);
|
||||
width: 750rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
.progressBar {
|
||||
border-radius: 2rpx;
|
||||
height: 4rpx;
|
||||
background-color: #ffffff;
|
||||
z-index: 999999;
|
||||
position: absolute;
|
||||
bottom: 40rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
203
components/loginPopup.vue
Normal file
203
components/loginPopup.vue
Normal 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>
|
||||
@ -1,131 +1,167 @@
|
||||
<template>
|
||||
<div class="mpvue-picker">
|
||||
<div :class="{'pickerMask':showPicker}" @click="maskClick" catchtouchmove="true"></div>
|
||||
<div class="mpvue-picker-content " :class="{'mpvue-picker-view-show':showPicker}">
|
||||
<div class="mpvue-picker__hd" catchtouchmove="true">
|
||||
<div class="mpvue-picker__action" @click="pickerCancel">{{__('取消')}}</div>
|
||||
<div class="mpvue-picker__action" :style="{color:themeColor}" @click="pickerConfirm">{{__('确定')}}</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>
|
||||
<div class="mpvue-picker">
|
||||
<div
|
||||
:class="{ pickerMask: showPicker }"
|
||||
@click="maskClick"
|
||||
catchtouchmove="true"
|
||||
></div>
|
||||
<div
|
||||
class="mpvue-picker-content"
|
||||
:class="{ 'mpvue-picker-view-show': showPicker }"
|
||||
>
|
||||
<div class="mpvue-picker__hd" catchtouchmove="true">
|
||||
<div class="mpvue-picker__action" @click="pickerCancel">
|
||||
{{ __("取消") }}
|
||||
</div>
|
||||
<div
|
||||
class="mpvue-picker__action"
|
||||
:style="{ color: themeColor }"
|
||||
@click="pickerConfirm"
|
||||
>
|
||||
{{ __("确定") }}
|
||||
</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>
|
||||
|
||||
<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 {
|
||||
data() {
|
||||
return {
|
||||
pickerValue: [0, 0, 0],
|
||||
provinceDataList: [],
|
||||
cityDataList: [],
|
||||
areaDataList: [],
|
||||
/* 是否显示控件 */
|
||||
showPicker: false,
|
||||
setDistrictData(district_data) {
|
||||
this.provinceData = district_data.provinceData;
|
||||
this.cityData = district_data.cityData;
|
||||
this.areaData = district_data.areaData;
|
||||
|
||||
this.handPickValueDefault(); // 对 pickerValueDefault 做兼容处理
|
||||
|
||||
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);
|
||||
}
|
||||
},
|
||||
|
||||
setDistrictData(district_data) {
|
||||
this.provinceData = district_data.provinceData;
|
||||
this.cityData = district_data.cityData;
|
||||
this.areaData = district_data.areaData;
|
||||
|
||||
this.handPickValueDefault(); // 对 pickerValueDefault 做兼容处理
|
||||
|
||||
|
||||
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;
|
||||
},
|
||||
this.provinceDataList = district_data.provinceData;
|
||||
this.cityDataList = district_data.cityData[this.pickerValueDefault[0]];
|
||||
|
||||
handPickValueDefault() {
|
||||
let that = this;
|
||||
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++) {
|
||||
@ -151,141 +187,157 @@
|
||||
}
|
||||
*/
|
||||
|
||||
if (this.pickerValueDefault !== [0, 0, 0]) {
|
||||
if (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) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
},
|
||||
pickerChange(e) {
|
||||
let that = this;
|
||||
let changePickerValue = e.mp.detail.value;
|
||||
if (this.pickerValue[0] !== changePickerValue[0]) {
|
||||
// 第一级发生滚动
|
||||
this.cityDataList = that.cityData[changePickerValue[0]];
|
||||
this.areaDataList = that.areaData[changePickerValue[0]][0];
|
||||
changePickerValue[1] = 0;
|
||||
changePickerValue[2] = 0;
|
||||
} else if (this.pickerValue[1] !== changePickerValue[1]) {
|
||||
// 第二级滚动
|
||||
this.areaDataList =
|
||||
that.areaData[changePickerValue[0]][changePickerValue[1]];
|
||||
changePickerValue[2] = 0;
|
||||
}
|
||||
this.pickerValue = changePickerValue;
|
||||
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
|
||||
];
|
||||
if (this.pickerValueDefault !== [0, 0, 0]) {
|
||||
if (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
|
||||
) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
},
|
||||
pickerChange(e) {
|
||||
let that = this;
|
||||
let changePickerValue = e.mp.detail.value;
|
||||
if (this.pickerValue[0] !== changePickerValue[0]) {
|
||||
// 第一级发生滚动
|
||||
this.cityDataList = that.cityData[changePickerValue[0]];
|
||||
this.areaDataList = that.areaData[changePickerValue[0]][0];
|
||||
changePickerValue[1] = 0;
|
||||
changePickerValue[2] = 0;
|
||||
} else if (this.pickerValue[1] !== changePickerValue[1]) {
|
||||
// 第二级滚动
|
||||
this.areaDataList =
|
||||
that.areaData[changePickerValue[0]][changePickerValue[1]];
|
||||
changePickerValue[2] = 0;
|
||||
}
|
||||
this.pickerValue = changePickerValue;
|
||||
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;
|
||||
},
|
||||
_getVale() {
|
||||
let pcikerValue = [this.provinceDataList[this.pickerValue[0]].value, this.cityDataList[this.pickerValue[1]].value,
|
||||
this.areaDataList[this.pickerValue[2]].value
|
||||
];
|
||||
return pcikerLabel;
|
||||
},
|
||||
_getVale() {
|
||||
let pcikerValue = [
|
||||
this.provinceDataList[this.pickerValue[0]].value,
|
||||
this.cityDataList[this.pickerValue[1]].value,
|
||||
this.areaDataList[this.pickerValue[2]].value,
|
||||
];
|
||||
|
||||
return pcikerValue;
|
||||
},
|
||||
_getCityCode() {
|
||||
return this.areaDataList[this.pickerValue[2]].value;
|
||||
}
|
||||
}
|
||||
};
|
||||
return pcikerValue;
|
||||
},
|
||||
_getCityCode() {
|
||||
return this.areaDataList[this.pickerValue[2]].value;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.pickerMask {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
.pickerMask {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.mpvue-picker-content {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
transition: all 0.3s ease;
|
||||
transform: translateY(100%);
|
||||
z-index: 3000;
|
||||
}
|
||||
.mpvue-picker-content {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
transition: all 0.3s ease;
|
||||
transform: translateY(100%);
|
||||
z-index: 3000;
|
||||
}
|
||||
|
||||
.mpvue-picker-view-show {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.mpvue-picker-view-show {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.mpvue-picker__hd {
|
||||
display: flex;
|
||||
padding: 9px 15px;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
font-size: 17px;
|
||||
}
|
||||
.mpvue-picker__hd {
|
||||
display: flex;
|
||||
padding: 9px 15px;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.mpvue-picker__hd:after {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
color: #e5e5e5;
|
||||
transform-origin: 0 100%;
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
.mpvue-picker__hd:after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
color: #e5e5e5;
|
||||
transform-origin: 0 100%;
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
|
||||
.mpvue-picker__action {
|
||||
display: block;
|
||||
flex: 1;
|
||||
color: #1aad19;
|
||||
}
|
||||
.mpvue-picker__action {
|
||||
display: block;
|
||||
flex: 1;
|
||||
color: #1aad19;
|
||||
}
|
||||
|
||||
.mpvue-picker__action:first-child {
|
||||
text-align: left;
|
||||
color: #888;
|
||||
}
|
||||
.mpvue-picker__action:first-child {
|
||||
text-align: left;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.mpvue-picker__action:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
.mpvue-picker__action:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.picker-item {
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 16px;
|
||||
}
|
||||
.picker-item {
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.mpvue-picker-view {
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 238px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
.mpvue-picker-view {
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 238px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
</view>
|
||||
|
||||
<view class="uni-list">
|
||||
<label
|
||||
<!-- <label
|
||||
class="uni-list-cell uni-list-cell-pd"
|
||||
v-if="
|
||||
defaultUserMoney &&
|
||||
@ -33,8 +33,8 @@
|
||||
<view>
|
||||
<switch @change="switchMoney" />
|
||||
</view>
|
||||
</label>
|
||||
<label
|
||||
</label> -->
|
||||
<!-- <label
|
||||
class="uni-list-cell uni-list-cell-pd"
|
||||
v-if="
|
||||
defaultUserMoney &&
|
||||
@ -50,7 +50,7 @@
|
||||
<view>
|
||||
<switch @change="switchPoints" />
|
||||
</view>
|
||||
</label>
|
||||
</label> -->
|
||||
|
||||
<label
|
||||
class="uni-list-cell uni-list-cell-pd"
|
||||
@ -330,7 +330,7 @@ export default {
|
||||
userRechargeCard: false,
|
||||
userSp: false,
|
||||
password: "", //支付密码
|
||||
paymentIndex: 0,
|
||||
paymentIndex: 1,
|
||||
isWeixin: false,
|
||||
};
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,323 +1,376 @@
|
||||
<template name="quick-nav">
|
||||
<view :class="[animation ? '' : 'zhezhaoceng']" >
|
||||
<movable-area class="movableArea">
|
||||
<movable-view class="movableView" @touchmove.stop.prevent="doNothing" direction="all" :x="initX" :y="initY">
|
||||
<view class="u-top1" v-if="isnav">
|
||||
<image v-if="false" src='https://static.lancerdt.com/xcxfile/appicon/nav/black/nav_icon_nav.png' class="quicknav" @click='nav'></image>
|
||||
<image src='https://static.lancerdt.com/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://static.lancerdt.com/xcxfile/appicon/nav/gray/nav_usercenter.png' class='quicknav'></image>
|
||||
</navigator>
|
||||
|
||||
<navigator :class="[animation ? 'navtext1' : 'navtext']" url='/member/member/favorites'><text>{{__('我的收藏')}}</text>
|
||||
<image src='https://static.lancerdt.com/xcxfile/appicon/nav/gray/nav_my_favor.png' class='quicknav'></image>
|
||||
</navigator>
|
||||
<!-- #ifndef H5 -->
|
||||
<view :class="[animation ? 'navtext1' : 'navtext']" @click='shareBox'><text>{{__('分享')}}</text>
|
||||
<image src='https://static.lancerdt.com/xcxfile/appicon/nav/gray/nav_share.png' class='quicknav'></image>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view :class="[animation ? 'navtext1' : 'navtext']" @click='shareBoxPoster'><text>{{__('生成海报')}}</text>
|
||||
<image src='https://static.lancerdt.com/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://static.lancerdt.com/xcxfile/appicon/nav/gray/nav_home.png' class='quicknav'></image>
|
||||
</navigator>
|
||||
<view class='open-nav'><text></text>
|
||||
<image src='https://static.lancerdt.com/xcxfile/appicon/nav/black/nav_icon_close.png' class='quicknav'></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
</view>
|
||||
<view :class="[animation ? '' : 'zhezhaoceng']">
|
||||
<movable-area class="movableArea">
|
||||
<movable-view
|
||||
class="movableView"
|
||||
@touchmove.stop.prevent="doNothing"
|
||||
direction="all"
|
||||
:x="initX"
|
||||
:y="initY"
|
||||
>
|
||||
<view class="u-top1" v-if="isnav">
|
||||
<image
|
||||
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>
|
||||
<image
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/nav/gray/nav_my_favor.png"
|
||||
class="quicknav"
|
||||
></image>
|
||||
</navigator>
|
||||
<!-- #ifndef H5 -->
|
||||
<view
|
||||
:class="[animation ? 'navtext1' : 'navtext']"
|
||||
@click="shareBox"
|
||||
><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 -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view
|
||||
:class="[animation ? 'navtext1' : 'navtext']"
|
||||
@click="shareBoxPoster"
|
||||
><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>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "quick-nav",
|
||||
props: {
|
||||
isquicknav: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isnav: true,
|
||||
animation: true,
|
||||
initX: '690',
|
||||
initY: '1336',
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
let view = uni.createSelectorQuery().in(this).select(".movableArea");
|
||||
let that = this;
|
||||
|
||||
view.fields({
|
||||
size: true,
|
||||
scrollOffset: true
|
||||
}, data => {
|
||||
if (data) {
|
||||
that.setData({
|
||||
initX: data.width,
|
||||
initY: data.height - 100,
|
||||
});
|
||||
}
|
||||
}).exec();
|
||||
},
|
||||
|
||||
methods: {
|
||||
shareBox: function() {
|
||||
this.$emit('onShareBox', 3);
|
||||
},
|
||||
|
||||
shareBoxPoster: function() {
|
||||
this.$emit('onShareBox', 3);
|
||||
},
|
||||
|
||||
returnTop: function() {
|
||||
this.$emit('onReturnTop');
|
||||
},
|
||||
doNothing: function() {
|
||||
},
|
||||
nav: function() {
|
||||
this.setData({
|
||||
isnav: false,
|
||||
animation: false
|
||||
})
|
||||
},
|
||||
outnav: function() {
|
||||
var that = this;
|
||||
this.setData({
|
||||
animation: true
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
that.setData({
|
||||
isnav: true
|
||||
})
|
||||
}, 250)
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: "quick-nav",
|
||||
props: {
|
||||
isquicknav: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isnav: true,
|
||||
animation: true,
|
||||
initX: "690",
|
||||
initY: "1336",
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
let view = uni.createSelectorQuery().in(this).select(".movableArea");
|
||||
let that = this;
|
||||
|
||||
view
|
||||
.fields(
|
||||
{
|
||||
size: true,
|
||||
scrollOffset: true,
|
||||
},
|
||||
(data) => {
|
||||
if (data) {
|
||||
that.setData({
|
||||
initX: data.width,
|
||||
initY: data.height - 100,
|
||||
});
|
||||
}
|
||||
}
|
||||
)
|
||||
.exec();
|
||||
},
|
||||
|
||||
methods: {
|
||||
shareBox: function () {
|
||||
this.$emit("onShareBox", 3);
|
||||
},
|
||||
|
||||
shareBoxPoster: function () {
|
||||
this.$emit("onShareBox", 3);
|
||||
},
|
||||
|
||||
returnTop: function () {
|
||||
this.$emit("onReturnTop");
|
||||
},
|
||||
doNothing: function () {},
|
||||
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>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
@import "../styles/_variables.scss";
|
||||
@import "../styles/_variables.scss";
|
||||
|
||||
/* 快捷导航 */
|
||||
.u-tap-btn {
|
||||
position: fixed;
|
||||
right: 20rpx;
|
||||
bottom: 100rpx;
|
||||
z-index: 999
|
||||
}
|
||||
/* 快捷导航 */
|
||||
.u-tap-btn {
|
||||
position: fixed;
|
||||
right: 20rpx;
|
||||
bottom: 100rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.u-go-home {
|
||||
border-radius: 100%;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
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: 2;
|
||||
opacity: 0.8;
|
||||
line-height: 80rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.u-go-home {
|
||||
border-radius: 100%;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
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: 2;
|
||||
opacity: 0.8;
|
||||
line-height: 80rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.u-go-home .iconfont {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
.u-go-home .iconfont {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.zhezhaoceng {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 99;
|
||||
animation: opacity 500ms;
|
||||
animation-fill-mode: forwards
|
||||
}
|
||||
.zhezhaoceng {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 99;
|
||||
animation: opacity 500ms;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
||||
@keyframes opacity {
|
||||
from {
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
@keyframes opacity {
|
||||
from {
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
to {
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
}
|
||||
to {
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes opacity1 {
|
||||
from {
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
@keyframes opacity1 {
|
||||
from {
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
to {
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
to {
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.quicknav {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.quicknav {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
@keyframes mymove1 {
|
||||
from {
|
||||
bottom: 0rpx;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@keyframes mymove1 {
|
||||
from {
|
||||
bottom: 0rpx;
|
||||
opacity: 0
|
||||
}
|
||||
to {
|
||||
bottom: 420rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
to {
|
||||
bottom: 420rpx;
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
@keyframes mymove2 {
|
||||
from {
|
||||
bottom: 0rpx;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@keyframes mymove2 {
|
||||
from {
|
||||
bottom: 0rpx;
|
||||
opacity: 0
|
||||
}
|
||||
to {
|
||||
bottom: 320rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
to {
|
||||
bottom: 320rpx;
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
@keyframes mymove3 {
|
||||
from {
|
||||
bottom: 0rpx;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@keyframes mymove3 {
|
||||
from {
|
||||
bottom: 0rpx;
|
||||
opacity: 0
|
||||
}
|
||||
to {
|
||||
bottom: 220rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
to {
|
||||
bottom: 220rpx;
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
@keyframes mymove4 {
|
||||
from {
|
||||
bottom: 0rpx;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@keyframes mymove4 {
|
||||
from {
|
||||
bottom: 0rpx;
|
||||
opacity: 0
|
||||
}
|
||||
to {
|
||||
bottom: 120rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
to {
|
||||
bottom: 120rpx;
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
@keyframes mymove5 {
|
||||
from {
|
||||
bottom: 420rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@keyframes mymove5 {
|
||||
from {
|
||||
bottom: 420rpx;
|
||||
opacity: 1
|
||||
}
|
||||
to {
|
||||
bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
to {
|
||||
bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
@keyframes mymove6 {
|
||||
from {
|
||||
bottom: 320rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@keyframes mymove6 {
|
||||
from {
|
||||
bottom: 320rpx;
|
||||
opacity: 1
|
||||
}
|
||||
to {
|
||||
bottom: 10rpx;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
to {
|
||||
bottom: 10rpx;
|
||||
opacity: 0
|
||||
}
|
||||
}
|
||||
@keyframes mymove7 {
|
||||
from {
|
||||
bottom: 220rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@keyframes mymove7 {
|
||||
from {
|
||||
bottom: 220rpx;
|
||||
opacity: 1
|
||||
}
|
||||
to {
|
||||
bottom: 10rpx;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
to {
|
||||
bottom: 10rpx;
|
||||
opacity: 0
|
||||
}
|
||||
}
|
||||
@keyframes mymove8 {
|
||||
from {
|
||||
bottom: 120rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@keyframes mymove8 {
|
||||
from {
|
||||
bottom: 120rpx;
|
||||
opacity: 1
|
||||
}
|
||||
to {
|
||||
bottom: 10rpx;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
to {
|
||||
bottom: 10rpx;
|
||||
opacity: 0
|
||||
}
|
||||
}
|
||||
.navtext text {
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
text-align: right;
|
||||
min-width: 120rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.navtext text {
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
text-align: right;
|
||||
min-width: 120rpx;
|
||||
margin-right: 20rpx
|
||||
}
|
||||
.navtext1 text {
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
text-align: right;
|
||||
min-width: 120rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.navtext1 text {
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
text-align: right;
|
||||
min-width: 120rpx;
|
||||
margin-right: 20rpx
|
||||
}
|
||||
.u-tuan-label {
|
||||
padding: 5rpx 8rpx;
|
||||
background-color: #db384c;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.u-tuan-label {
|
||||
padding: 5rpx 8rpx;
|
||||
background-color: #DB384C;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.m-product-name2 {
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
padding-right: 20rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.m-product-name2 {
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
padding-right: 20rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-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;
|
||||
}
|
||||
.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>
|
||||
@ -1,239 +1,258 @@
|
||||
<template name="share-box-mp">
|
||||
<view :class="['shareMsk', isShare?'':'hide']">
|
||||
<view :class="['sharebox', isShareBox?'bounceInUp animated':'bounceOutDown animated']">
|
||||
<view class='shareList g-flex '>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class='shareItem g-flex-item'>
|
||||
<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>
|
||||
</button>
|
||||
<label>{{__('分享给朋友')}}</label>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class='shareItem g-flex-item'>
|
||||
<view class='shareBtn' @click='shareQRCode'>
|
||||
<image src='https://static.lancerdt.com/xcxfile/appicon/images/allfriend.png' style='width:100rpx;height:100rpx'></image>
|
||||
<label>{{__('生成海报')}}</label>
|
||||
</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>
|
||||
<view :class="['shareMsk', isShare ? '' : 'hide']">
|
||||
<view
|
||||
:class="[
|
||||
'sharebox',
|
||||
isShareBox ? 'bounceInUp animated' : 'bounceOutDown animated',
|
||||
]"
|
||||
>
|
||||
<view class="shareList g-flex">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="shareItem g-flex-item">
|
||||
<view class="shareBtn">
|
||||
<button open-type="share" style="line-height: 0" hover-class="none">
|
||||
<image
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/friend.png"
|
||||
style="width: 100rpx; height: 100rpx; margin-bottom: 6rpx"
|
||||
></image>
|
||||
</button>
|
||||
<label>{{ __("分享给朋友") }}</label>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="shareItem g-flex-item">
|
||||
<view class="shareBtn" @click="shareQRCode">
|
||||
<image
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/allfriend.png"
|
||||
style="width: 100rpx; height: 100rpx"
|
||||
></image>
|
||||
<label>{{ __("生成海报") }}</label>
|
||||
</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>
|
||||
|
||||
|
||||
<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 {
|
||||
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;
|
||||
},
|
||||
cancelShare: function () {
|
||||
this.isShareBox = false;
|
||||
this.isShare = false;
|
||||
this.IsJT = false;
|
||||
|
||||
cancelShare: function() {
|
||||
this.isShareBox = false;
|
||||
this.isShare = false;
|
||||
this.IsJT = false;
|
||||
this.$emit("cancelShare");
|
||||
},
|
||||
shareQRCode: function (e) {
|
||||
var that = this;
|
||||
var params = {
|
||||
MainPrice: this.shareDataDefault.price,
|
||||
|
||||
this.$emit('cancelShare')
|
||||
},
|
||||
shareQRCode: function(e) {
|
||||
var that = this;
|
||||
var params = {
|
||||
MainPrice: this.shareDataDefault.price,
|
||||
summary: this.shareDataDefault.shareText,
|
||||
MainImg: this.shareDataDefault.image,
|
||||
MainTitle: this.shareDataDefault.shareTitle,
|
||||
Path: this.shareDataDefault.href,
|
||||
source_from: "wxminiapp",
|
||||
|
||||
summary : this.shareDataDefault.shareText,
|
||||
MainImg : this.shareDataDefault.image,
|
||||
MainTitle : this.shareDataDefault.shareTitle,
|
||||
Path : this.shareDataDefault.href,
|
||||
source_from: 'wxminiapp',
|
||||
poster_name: this.shareDataDefault.shareText,
|
||||
path: this.shareDataDefault.href,
|
||||
};
|
||||
|
||||
poster_name:this.shareDataDefault.shareText,
|
||||
path : this.shareDataDefault.href,
|
||||
};
|
||||
let url = that.cf.URL.wx.getMiniAppQRCodeUnlimitPoster;
|
||||
|
||||
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
|
||||
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;
|
||||
// #ifdef H5
|
||||
params["poster_type"] = 1;
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
params["poster_type"] = 2;
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
params["poster_type"] = 1;
|
||||
// #endif
|
||||
}
|
||||
|
||||
// #ifdef H5
|
||||
params['poster_type'] = 1;
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
params['poster_type'] = 2
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
params['poster_type'] = 1
|
||||
// #endif
|
||||
}
|
||||
//生成二维码并返回地址。 - 需要修改调整为小程序地址
|
||||
that.$.request({
|
||||
url: url,
|
||||
data: params,
|
||||
method: "POST",
|
||||
success: function (data, status, msg, code) {
|
||||
that.setData({
|
||||
Path: data.url || data.poster_url,
|
||||
isShare: true,
|
||||
isShareBox: false,
|
||||
IsJT: true,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
//生成二维码并返回地址。 - 需要修改调整为小程序地址
|
||||
that.$.request({
|
||||
url: url,
|
||||
data: params,
|
||||
method:"POST",
|
||||
success: function(data, status, msg, code) {
|
||||
that.setData({
|
||||
Path: data.url || data.poster_url,
|
||||
isShare: true,
|
||||
isShareBox: false,
|
||||
IsJT: true
|
||||
})
|
||||
}
|
||||
});
|
||||
this.$emit("shareQRCode");
|
||||
},
|
||||
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();
|
||||
},
|
||||
});
|
||||
|
||||
this.$emit('shareQRCode')
|
||||
},
|
||||
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();
|
||||
|
||||
that.$.hideLoading()
|
||||
this.$emit("saveImg");
|
||||
},
|
||||
showCodeImg: function () {
|
||||
let that = this;
|
||||
that.$.previewImage({
|
||||
current: that.Path,
|
||||
urls: [that.Path],
|
||||
});
|
||||
|
||||
this.$emit('saveImg')
|
||||
},
|
||||
showCodeImg: function() {
|
||||
let that = this;
|
||||
that.$.previewImage({
|
||||
current: that.Path,
|
||||
urls: [that.Path]
|
||||
})
|
||||
|
||||
this.$emit('showCodeImg')
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$emit("showCodeImg");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
.mp-clean-icon{
|
||||
position: absolute;
|
||||
right: 8rpx;
|
||||
top: 8rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.mp-clean-icon {
|
||||
position: absolute;
|
||||
right: 8rpx;
|
||||
top: 8rpx;
|
||||
color: #999999;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,396 +1,436 @@
|
||||
<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"
|
||||
@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"
|
||||
<cover-image
|
||||
v-if="!is_like"
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/bed.png"
|
||||
class="img-left"
|
||||
@click.stop="onLike"
|
||||
:data-story_id="video_id"
|
||||
></cover-image>
|
||||
|
||||
@click.stop="clickVideo"
|
||||
>
|
||||
</video>
|
||||
<cover-image class="play" v-if="show_play" src="https://static.lancerdt.com/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://static.lancerdt.com/xcxfile/appicon/video/img/axc.png" class="img-left" @click.stop="onUnLike" :data-story_id="video_id"></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>
|
||||
|
||||
|
||||
<text class="right-text">{{ story_like_count }}</text>
|
||||
<cover-image src="https://static.lancerdt.com/xcxfile/appicon/video/img/ay2.png" style="height: 80rpx;" class="img-left" @click.stop="tapMsg"></cover-image>
|
||||
<text class="right-text">{{ pinglun }}</text>
|
||||
<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>
|
||||
<text class="right-text">{{ story_like_count }}</text>
|
||||
<cover-image
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/video/img/ay2.png"
|
||||
style="height: 80rpx"
|
||||
class="img-left"
|
||||
@click.stop="tapMsg"
|
||||
></cover-image>
|
||||
<text class="right-text">{{ pinglun }}</text>
|
||||
<cover-image
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/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://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/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>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex'
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
video_id: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
user_id: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
nickname: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
video_describe: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
cover_url: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
video_url: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
dianzan: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
is_dianzan: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
pinglun: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
zhuanfa: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
play: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
cur_index: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
time: 0,
|
||||
duration: 10,
|
||||
barWidth:0,
|
||||
animationData: {},
|
||||
times:null,
|
||||
show_play:false,
|
||||
props: {
|
||||
video_id: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
user_id: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
nickname: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
video_describe: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
cover_url: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
video_url: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
dianzan: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
is_dianzan: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
pinglun: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
zhuanfa: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
play: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
cur_index: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
time: 0,
|
||||
duration: 10,
|
||||
barWidth: 0,
|
||||
animationData: {},
|
||||
times: null,
|
||||
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,
|
||||
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);
|
||||
},
|
||||
timeupdate(event) {
|
||||
let t_w = parseInt(this.width);
|
||||
this.duration = event.detail.duration;
|
||||
this.time = event.detail.currentTime;
|
||||
let width = (this.time / this.duration) * t_w;
|
||||
let w = 0;
|
||||
// //console.log(t_w);
|
||||
// //console.log(width);
|
||||
// //console.log(this.barWidth);
|
||||
// if(width > this.barWidth){
|
||||
// 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;
|
||||
}
|
||||
},
|
||||
|
||||
timeupdate(event) {
|
||||
let t_w = parseInt(this.width);
|
||||
this.duration = event.detail.duration;
|
||||
this.time = event.detail.currentTime;
|
||||
let width = (this.time / this.duration) * t_w;
|
||||
let w = 0;
|
||||
// //console.log(t_w);
|
||||
// //console.log(width);
|
||||
// //console.log(this.barWidth);
|
||||
// if(width > this.barWidth){
|
||||
// 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;
|
||||
}
|
||||
},
|
||||
onLike: function (a) {
|
||||
let that = this;
|
||||
that.forceUserInfo(function (user) {
|
||||
that.doLike(a.currentTarget.dataset.story_id);
|
||||
});
|
||||
},
|
||||
doLike: function (story_id) {
|
||||
var that = this,
|
||||
params = {
|
||||
story_id: story_id,
|
||||
};
|
||||
|
||||
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) {
|
||||
let that = this;
|
||||
that.forceUserInfo(function(user) {
|
||||
that.doLike(a.currentTarget.dataset.story_id)
|
||||
});
|
||||
},
|
||||
doLike: function (story_id) {
|
||||
var that = this, params = {
|
||||
story_id: story_id
|
||||
};
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
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>
|
||||
|
||||
<style lang="scss">
|
||||
.video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.play{
|
||||
position: absolute;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
left: 300rpx;
|
||||
top: 510rpx;
|
||||
opacity: 0.5;
|
||||
.play {
|
||||
position: absolute;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
left: 300rpx;
|
||||
top: 510rpx;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.progressBar {
|
||||
border-radius: 2rpx;
|
||||
height: 4rpx;
|
||||
background-color: #FF4500;
|
||||
z-index: 999999;
|
||||
position: absolute;
|
||||
bottom: 68rpx;
|
||||
/* #ifndef APP-PLUS-NVUE */
|
||||
bottom: 0rpx;
|
||||
/* #endif */
|
||||
border-radius: 2rpx;
|
||||
height: 4rpx;
|
||||
background-color: #ff4500;
|
||||
z-index: 999999;
|
||||
position: absolute;
|
||||
bottom: 68rpx;
|
||||
/* #ifndef APP-PLUS-NVUE */
|
||||
bottom: 0rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.cover-view-left {
|
||||
position: absolute;
|
||||
margin-left: 20rpx;
|
||||
width: 580rpx;
|
||||
bottom: 100rpx;
|
||||
z-index: 9999;
|
||||
font-size: 14px;
|
||||
color: #ffffff;
|
||||
/* #ifndef APP-PLUS-NVUE */
|
||||
bottom: 30rpx;
|
||||
/* #endif */
|
||||
position: absolute;
|
||||
margin-left: 20rpx;
|
||||
width: 580rpx;
|
||||
bottom: 100rpx;
|
||||
z-index: 9999;
|
||||
font-size: 14px;
|
||||
color: #ffffff;
|
||||
/* #ifndef APP-PLUS-NVUE */
|
||||
bottom: 30rpx;
|
||||
/* #endif */
|
||||
}
|
||||
.left-text {
|
||||
font-size: 14px;
|
||||
color: #ffffff;
|
||||
font-size: 14px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.cover-view-right {
|
||||
position: absolute;
|
||||
bottom: 40px;
|
||||
right: 30rpx;
|
||||
z-index: 9999;
|
||||
text-align: center;
|
||||
/* #ifndef APP-PLUS-NVUE */
|
||||
bottom: 0rpx;
|
||||
/* #endif */
|
||||
position: absolute;
|
||||
bottom: 40px;
|
||||
right: 30rpx;
|
||||
z-index: 9999;
|
||||
text-align: center;
|
||||
/* #ifndef APP-PLUS-NVUE */
|
||||
bottom: 0rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.avater {
|
||||
border-radius: 50%;
|
||||
border-width: 2px;
|
||||
border-style: solid;
|
||||
border-color: #ffffff;
|
||||
border-radius: 50%;
|
||||
border-width: 2px;
|
||||
border-style: solid;
|
||||
border-color: #ffffff;
|
||||
}
|
||||
|
||||
.cimg {
|
||||
height: 90rpx;
|
||||
width: 90rpx;
|
||||
margin-bottom: 50rpx;
|
||||
height: 90rpx;
|
||||
width: 90rpx;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.img-left {
|
||||
width: 80rpx;
|
||||
height: 66rpx;
|
||||
padding-left: 4px;
|
||||
width: 80rpx;
|
||||
height: 66rpx;
|
||||
padding-left: 4px;
|
||||
}
|
||||
.right-follow {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
top: 75rpx;
|
||||
left: 28rpx;
|
||||
color: #ffffff;
|
||||
font-size: 16px;
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
background-color: #f12f5b;
|
||||
text-align: center;
|
||||
line-height: 34rpx;
|
||||
border-radius: 17rpx;
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
top: 75rpx;
|
||||
left: 28rpx;
|
||||
color: #ffffff;
|
||||
font-size: 16px;
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
background-color: #f12f5b;
|
||||
text-align: center;
|
||||
line-height: 34rpx;
|
||||
border-radius: 17rpx;
|
||||
}
|
||||
|
||||
.right-text {
|
||||
color: #ffffff;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
color: #ffffff;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.musicIcon {
|
||||
margin-top: 40rpx;
|
||||
/* #ifndef APP-PLUS-NVUE */
|
||||
animation: rotating 3s linear infinite;
|
||||
/* #endif */
|
||||
margin-top: 40rpx;
|
||||
/* #ifndef APP-PLUS-NVUE */
|
||||
animation: rotating 3s linear infinite;
|
||||
/* #endif */
|
||||
}
|
||||
@keyframes rotating {
|
||||
from {
|
||||
transform: rotate(0);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
from {
|
||||
transform: rotate(0);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
.view-left-text-content {
|
||||
flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
.view-left-text {
|
||||
color: #ffffff;
|
||||
font-size: 18px;
|
||||
margin-bottom: 10rpx;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
font-size: 18px;
|
||||
margin-bottom: 10rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.text-content-text {
|
||||
color: #ffffff;
|
||||
font-size: 16px;
|
||||
line-height: 50rpx;
|
||||
height: 100rpx;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
font-size: 16px;
|
||||
line-height: 50rpx;
|
||||
height: 100rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,323 +1,368 @@
|
||||
<template name="zy-search">
|
||||
<view>
|
||||
<view class="search">
|
||||
<slot></slot>
|
||||
<!-- 使用$emit触发实例上(父组件)的自定义方法并传入参数 -->
|
||||
<!-- <button type="primary" @click="$emit('test','block')">方形</button> -->
|
||||
<!-- sync双向数据绑定语法糖 -->
|
||||
<!-- <button type="primary" @click="changeStyle">双向数据绑定改变style</button> -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<image src="https://static.lancerdt.com/xcxfile/appicon/zy-search/voice.svg" mode="aspectFit" @click="startRecognize()" class="voice-icon"></image>
|
||||
<!-- #endif -->
|
||||
<template v-if="isFocus">
|
||||
<input maxlength="20" focus type="text" value="" confirm-type="search" @confirm="searchStart()" :placeholder="__('请输入关键词搜索')" v-model.trim="searchText"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<input maxlength="20" type="text" value="" confirm-type="search" @confirm="searchStart()" :placeholder="__('请输入关键词搜索')" v-model.trim="searchText"/>
|
||||
</template>
|
||||
<image src="https://static.lancerdt.com/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://static.lancerdt.com/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>
|
||||
<view>
|
||||
<view class="search">
|
||||
<slot></slot>
|
||||
<!-- 使用$emit触发实例上(父组件)的自定义方法并传入参数 -->
|
||||
<!-- <button type="primary" @click="$emit('test','block')">方形</button> -->
|
||||
<!-- sync双向数据绑定语法糖 -->
|
||||
<!-- <button type="primary" @click="changeStyle">双向数据绑定改变style</button> -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<image
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/zy-search/voice.svg"
|
||||
mode="aspectFit"
|
||||
@click="startRecognize()"
|
||||
class="voice-icon"
|
||||
></image>
|
||||
<!-- #endif -->
|
||||
<template v-if="isFocus">
|
||||
<input
|
||||
maxlength="20"
|
||||
focus
|
||||
type="text"
|
||||
value=""
|
||||
confirm-type="search"
|
||||
@confirm="searchStart()"
|
||||
:placeholder="__('请输入关键词搜索')"
|
||||
v-model.trim="searchText"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<input
|
||||
maxlength="20"
|
||||
type="text"
|
||||
value=""
|
||||
confirm-type="search"
|
||||
@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>
|
||||
|
||||
<script>
|
||||
export default{
|
||||
name:"zy-search",
|
||||
props:{
|
||||
isFocus:{ //是否自动获取焦点
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
theme:{ //选择块级显示还是圆形显示
|
||||
type: String,
|
||||
default: 'block'
|
||||
},
|
||||
showWant:{ //是否展示推荐菜单
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
hotList: { //推荐列表数据
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
searchHisList: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
suggestText: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
export default {
|
||||
name: "zy-search",
|
||||
props: {
|
||||
isFocus: {
|
||||
//是否自动获取焦点
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
theme: {
|
||||
//选择块级显示还是圆形显示
|
||||
type: String,
|
||||
default: "block",
|
||||
},
|
||||
showWant: {
|
||||
//是否展示推荐菜单
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
hotList: {
|
||||
//推荐列表数据
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
searchHisList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
suggestText: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
|
||||
speechEngine: { //语音引擎=>讯飞:iFly,百度:'baidu'
|
||||
type: String,
|
||||
default: 'baidu'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchText:'', //搜索关键词
|
||||
hList:[] //历史记录
|
||||
};
|
||||
},
|
||||
created() {
|
||||
var that = this;
|
||||
setTimeout(()=>{
|
||||
this.setData({
|
||||
searchText: this.suggestText
|
||||
});
|
||||
speechEngine: {
|
||||
//语音引擎=>讯飞:iFly,百度:'baidu'
|
||||
type: String,
|
||||
default: "baidu",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchText: "", //搜索关键词
|
||||
hList: [], //历史记录
|
||||
};
|
||||
},
|
||||
created() {
|
||||
var that = this;
|
||||
setTimeout(() => {
|
||||
|
||||
if (this.searchHisList.length > 0)
|
||||
{
|
||||
//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({
|
||||
key:'search_cache',
|
||||
success(res){
|
||||
let list = res.data;
|
||||
let t = true;
|
||||
if(list.length > 5){
|
||||
for(let item of list){
|
||||
if(item == _this.searchText){
|
||||
return;
|
||||
}
|
||||
}
|
||||
list.pop();
|
||||
list.unshift(_this.searchText);
|
||||
}else{
|
||||
for(let item of list){
|
||||
if(item == _this.searchText){
|
||||
t = false;
|
||||
}
|
||||
}
|
||||
if(t)
|
||||
{
|
||||
list.unshift(_this.searchText);
|
||||
}
|
||||
|
||||
}
|
||||
_this.hList = list;
|
||||
uni.setStorage({
|
||||
key: 'search_cache',
|
||||
data: _this.hList
|
||||
});
|
||||
_this.$emit('getSearchText', _this.searchText);
|
||||
},
|
||||
fail() {
|
||||
_this.hList = [];
|
||||
_this.hList.push(_this.searchText);
|
||||
uni.setStorage({
|
||||
key: 'search_cache',
|
||||
data: _this.hList
|
||||
});
|
||||
_this.$emit('getSearchText', _this.searchText);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
keywordsClick (item) { //推荐搜索
|
||||
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;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// this.setData({
|
||||
// searchText: this.suggestText,
|
||||
// });
|
||||
|
||||
if (this.searchHisList.length > 0) {
|
||||
//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({
|
||||
key: "search_cache",
|
||||
success(res) {
|
||||
let list = res.data;
|
||||
let t = true;
|
||||
if (list.length > 5) {
|
||||
for (let item of list) {
|
||||
if (item == _this.searchText) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
list.pop();
|
||||
list.unshift(_this.searchText);
|
||||
} else {
|
||||
for (let item of list) {
|
||||
if (item == _this.searchText) {
|
||||
t = false;
|
||||
}
|
||||
}
|
||||
if (t) {
|
||||
list.unshift(_this.searchText);
|
||||
}
|
||||
}
|
||||
_this.hList = list;
|
||||
uni.setStorage({
|
||||
key: "search_cache",
|
||||
data: _this.hList,
|
||||
});
|
||||
_this.$emit("getSearchText", _this.searchText);
|
||||
},
|
||||
fail() {
|
||||
_this.hList = [];
|
||||
_this.hList.push(_this.searchText);
|
||||
uni.setStorage({
|
||||
key: "search_cache",
|
||||
data: _this.hList,
|
||||
});
|
||||
_this.$emit("getSearchText", _this.searchText);
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
keywordsClick(item) {
|
||||
//推荐搜索
|
||||
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>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.search{
|
||||
width: 640rpx;
|
||||
margin: 30rpx auto 0;
|
||||
position: relative;
|
||||
input{
|
||||
background-color: #F7F7F7;
|
||||
padding: 10rpx 74rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
.voice-icon{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 16rpx 20rpx 16rpx 0;
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
top: 4rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
.search-icon{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 16rpx 20rpx 16rpx 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -2rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
.s-block{
|
||||
margin-top: 30rpx;
|
||||
.header{
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
image{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 10rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 24rpx;
|
||||
}
|
||||
}
|
||||
.list{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
view{
|
||||
width: 50%;
|
||||
color: #8A8A8A;
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
border-top: 2rpx solid #FFF;
|
||||
border-left: 2rpx solid #FFF;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
background-color: #F7F7F7;
|
||||
}
|
||||
}
|
||||
}
|
||||
.s-circle{
|
||||
margin-top: 30rpx;
|
||||
.header{
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
border-bottom: 2rpx solid #F9F9F9;
|
||||
position: relative;
|
||||
image{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 10rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 24rpx;
|
||||
}
|
||||
}
|
||||
.list{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 30rpx 20rpx;
|
||||
view{
|
||||
padding: 8rpx 30rpx;
|
||||
margin: 20rpx 30rpx 0 0;
|
||||
font-size: 28rpx;
|
||||
color: #8A8A8A;
|
||||
background-color: #F7F7F7;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.wanted-block{
|
||||
margin-top: 30rpx;
|
||||
.header{
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.list{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
view{
|
||||
width: 50%;
|
||||
color: #8A8A8A;
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
border-top: 2rpx solid #FFF;
|
||||
border-left: 2rpx solid #FFF;
|
||||
background-color: #F7F7F7;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
.wanted-circle{
|
||||
margin-top: 30rpx;
|
||||
.header{
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.list{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 30rpx 20rpx;
|
||||
view{
|
||||
padding: 8rpx 30rpx;
|
||||
margin: 20rpx 30rpx 0 0;
|
||||
font-size: 28rpx;
|
||||
color: #8A8A8A;
|
||||
background-color: #F7F7F7;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.search {
|
||||
width: 640rpx;
|
||||
margin: 30rpx auto 0;
|
||||
position: relative;
|
||||
input {
|
||||
background-color: #f7f7f7;
|
||||
padding: 10rpx 74rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
.voice-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 16rpx 20rpx 16rpx 0;
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
top: 4rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
.search-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 16rpx 20rpx 16rpx 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -2rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
.s-block {
|
||||
margin-top: 30rpx;
|
||||
.header {
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 10rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 24rpx;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
view {
|
||||
width: 50%;
|
||||
color: #8a8a8a;
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
border-top: 2rpx solid #fff;
|
||||
border-left: 2rpx solid #fff;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
}
|
||||
}
|
||||
.s-circle {
|
||||
margin-top: 30rpx;
|
||||
.header {
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
border-bottom: 2rpx solid #f9f9f9;
|
||||
position: relative;
|
||||
image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 10rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 24rpx;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 30rpx 20rpx;
|
||||
view {
|
||||
padding: 8rpx 30rpx;
|
||||
margin: 20rpx 30rpx 0 0;
|
||||
font-size: 28rpx;
|
||||
color: #8a8a8a;
|
||||
background-color: #f7f7f7;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.wanted-block {
|
||||
margin-top: 30rpx;
|
||||
.header {
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
view {
|
||||
width: 50%;
|
||||
color: #8a8a8a;
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
border-top: 2rpx solid #fff;
|
||||
border-left: 2rpx solid #fff;
|
||||
background-color: #f7f7f7;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
.wanted-circle {
|
||||
margin-top: 30rpx;
|
||||
.header {
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 30rpx 20rpx;
|
||||
view {
|
||||
padding: 8rpx 30rpx;
|
||||
margin: 20rpx 30rpx 0 0;
|
||||
font-size: 28rpx;
|
||||
color: #8a8a8a;
|
||||
background-color: #f7f7f7;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -284,7 +284,8 @@ export default {
|
||||
"menu": iu + "?ctl=Store&met=menu&typ=json",
|
||||
// "lists":iu + "?ctl=Store&met=lists&typ=json",
|
||||
"lists": ip + "shop/store/lists",
|
||||
|
||||
// 附近门店列表
|
||||
"nearList": ip + 'shop/store/near/list',
|
||||
"listsChain": iu + "?ctl=Chain&met=lists&typ=json",
|
||||
// "getChain":iu + "?ctl=Chain&met=getChainInfo&typ=json",
|
||||
"getChain": ip + "shop/shop-chain-base/getChainInfo",
|
||||
@ -1086,7 +1087,17 @@ export default {
|
||||
"card": {
|
||||
"card_list": mu + "/card/pay/pay-card-info/getListByUserid",
|
||||
"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": {
|
||||
"color": "#7A7E83",
|
||||
|
||||
@ -7,7 +7,7 @@ var data = {
|
||||
symbol_right:'CNY',
|
||||
label:'中文',
|
||||
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:[
|
||||
{
|
||||
lang:'zh-CN',
|
||||
@ -16,7 +16,7 @@ var data = {
|
||||
symbol_right:'CNY',
|
||||
label:'中文',
|
||||
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',
|
||||
@ -25,7 +25,7 @@ var data = {
|
||||
symbol_right:'CNY',
|
||||
label:'中国香港',
|
||||
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',
|
||||
@ -34,7 +34,7 @@ var data = {
|
||||
symbol_right:'TWD',
|
||||
label:'中国台湾',
|
||||
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',
|
||||
@ -43,7 +43,7 @@ var data = {
|
||||
symbol_right:'USD',
|
||||
label:'English',
|
||||
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',
|
||||
@ -52,7 +52,7 @@ var data = {
|
||||
standard:false,
|
||||
symbol:'J.¥',
|
||||
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',
|
||||
@ -61,7 +61,7 @@ var data = {
|
||||
symbol_right:'THB',
|
||||
label:'ภาษาไทย',
|
||||
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',
|
||||
@ -70,7 +70,7 @@ var data = {
|
||||
symbol_right:'MXP',
|
||||
label:'México',
|
||||
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',
|
||||
@ -79,7 +79,7 @@ var data = {
|
||||
symbol_right:'SAR',
|
||||
standard:true,
|
||||
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',
|
||||
@ -88,7 +88,7 @@ var data = {
|
||||
symbol_right:'THB',
|
||||
label:'ViệtName',
|
||||
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',
|
||||
@ -97,7 +97,7 @@ var data = {
|
||||
symbol_right:'TRL',
|
||||
label:'Türkçe',
|
||||
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',
|
||||
@ -106,7 +106,7 @@ var data = {
|
||||
symbol_right:'IDR',
|
||||
label:'IndonesiaName',
|
||||
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',
|
||||
@ -115,7 +115,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'Britain',
|
||||
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',
|
||||
@ -124,7 +124,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'España',
|
||||
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',
|
||||
@ -133,7 +133,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'Deutsch',
|
||||
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',
|
||||
@ -142,7 +142,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'Français',
|
||||
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',
|
||||
@ -151,7 +151,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'Português',
|
||||
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',
|
||||
@ -160,7 +160,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'Italiano',
|
||||
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',
|
||||
@ -169,7 +169,7 @@ var data = {
|
||||
symbol_right:'RUB',
|
||||
label:'Русский язык',
|
||||
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',
|
||||
@ -178,7 +178,7 @@ var data = {
|
||||
symbol_right:'RON',
|
||||
label:'România',
|
||||
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',
|
||||
@ -187,7 +187,7 @@ var data = {
|
||||
symbol_right:'AZN',
|
||||
label:'AzerbayjanlıName',
|
||||
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',
|
||||
@ -196,7 +196,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'Ελληνικά',
|
||||
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',
|
||||
@ -205,7 +205,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'Suomi',
|
||||
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',
|
||||
@ -214,7 +214,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'Latvijas',
|
||||
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',
|
||||
@ -223,7 +223,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'Nederlands',
|
||||
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',
|
||||
@ -232,7 +232,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'Denmark',
|
||||
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',
|
||||
@ -241,7 +241,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'Република Србија',
|
||||
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',
|
||||
@ -250,7 +250,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'Polski',
|
||||
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',
|
||||
@ -259,7 +259,7 @@ var data = {
|
||||
symbol_right:'EUR',
|
||||
label:'УкраїнськаName',
|
||||
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',
|
||||
@ -268,7 +268,7 @@ var data = {
|
||||
symbol_right:'KZT',
|
||||
label:'ҚазақстанName',
|
||||
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',
|
||||
@ -277,7 +277,7 @@ var data = {
|
||||
symbol_right:'BUK',
|
||||
label:'မြန်မာ',
|
||||
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',
|
||||
@ -286,7 +286,7 @@ var data = {
|
||||
symbol_right:'KRW',
|
||||
label:'한국.',
|
||||
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',
|
||||
@ -295,7 +295,7 @@ var data = {
|
||||
symbol_right:'MYR',
|
||||
label:'Malay',
|
||||
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',
|
||||
@ -304,7 +304,7 @@ var data = {
|
||||
symbol_right:'LAK',
|
||||
label:'ເມືອງລາວ',
|
||||
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'
|
||||
}*/
|
||||
]
|
||||
}
|
||||
|
||||
1293
hall/purchase/my.vue
1293
hall/purchase/my.vue
File diff suppressed because it is too large
Load Diff
@ -226,7 +226,7 @@
|
||||
<view class="alert" v-if="show">
|
||||
<image
|
||||
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>
|
||||
<text style="margin-left: 20rpx">{{ Info }}</text>
|
||||
</view>
|
||||
|
||||
@ -40,7 +40,7 @@ class apiconfig {
|
||||
let arr = {};
|
||||
|
||||
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
15
helpers/loginPopup.js
Normal 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)
|
||||
}
|
||||
@ -33,9 +33,9 @@
|
||||
</style>
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://static.lancerdt.com/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://static.lancerdt.com/js/qrcode.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://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/js/qrcode.lib.min.js"></script>
|
||||
<script type="text/javascript" src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/js/qrcode.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="sstouch-main-layout" style="margin-bottom: 14rem!important">
|
||||
|
||||
3361
im/chat/chat.vue
3361
im/chat/chat.vue
File diff suppressed because it is too large
Load Diff
3330
im/chat/chat_nn.vue
3330
im/chat/chat_nn.vue
File diff suppressed because it is too large
Load Diff
@ -94,7 +94,7 @@
|
||||
</view>
|
||||
|
||||
<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">
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<view class="toast" v-show="toastShow">
|
||||
@ -114,301 +114,312 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import emojiData from "@/im/static/emoji/emojiData.js"
|
||||
var windowWidth = 0
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
windowWidth = res.windowWidth
|
||||
}
|
||||
});
|
||||
import emojiData from "@/im/static/emoji/emojiData.js";
|
||||
var windowWidth = 0;
|
||||
uni.getSystemInfo({
|
||||
success: function (res) {
|
||||
windowWidth = res.windowWidth;
|
||||
},
|
||||
});
|
||||
|
||||
export default {
|
||||
// 接受父组件参数,单向数据流
|
||||
props: {
|
||||
export default {
|
||||
// 接受父组件参数,单向数据流
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
scrollTop: 0,
|
||||
old: {
|
||||
scrollTop: 0,
|
||||
},
|
||||
emojiWidth: windowWidth * 8,
|
||||
emojiMarginLeft: -windowWidth,
|
||||
transition: "transform 0 ease-in 0",
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
scrollTop: 0,
|
||||
old: {
|
||||
scrollTop: 0
|
||||
},
|
||||
emojiWidth: windowWidth * 8,
|
||||
emojiMarginLeft: -windowWidth,
|
||||
transition: 'transform 0 ease-in 0',
|
||||
toastShow: false,
|
||||
toastText: "",
|
||||
beginX: 0,
|
||||
beforeList: [{}],
|
||||
nextList: [{}],
|
||||
nowX: 0,
|
||||
endX: 0,
|
||||
activeEmojiTab: 1,
|
||||
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'
|
||||
|
||||
toastShow: false,
|
||||
toastText: '',
|
||||
beginX: 0,
|
||||
beforeList: [{}],
|
||||
nextList: [{}],
|
||||
nowX: 0,
|
||||
endX: 0,
|
||||
activeEmojiTab: 1,
|
||||
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'
|
||||
// // 初始化
|
||||
this.pointItemList = this.items[this.groupIndex].emojiList.length;
|
||||
// console.log(this.pointItemList)
|
||||
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
|
||||
// console.log(this.pointItemList)
|
||||
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]
|
||||
},
|
||||
onLoad: function () {
|
||||
const res = uni.getSystemInfoSync();
|
||||
this.style.pageHeight = res.windowHeight;
|
||||
// console.log(uni.getSystemInfoSync().screenWidth)
|
||||
this.style.contentViewHeight =
|
||||
res.windowHeight - (uni.getSystemInfoSync().screenWidth / 750) * 100; //像素
|
||||
},
|
||||
methods: {
|
||||
selectTab: function (activeIndex, index) {
|
||||
// this.toast("选择表情包:" + index + "激活索引:"+activeIndex)
|
||||
|
||||
onLoad: function() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
this.style.pageHeight = res.windowHeight;
|
||||
// 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.groupIndex = index;
|
||||
this.activeEmojiTab = index;
|
||||
|
||||
this.activeIndex = activeIndex
|
||||
this.groupIndex = index
|
||||
this.activeEmojiTab = index
|
||||
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
|
||||
];
|
||||
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]
|
||||
this.nextList = this.items[this.groupIndex + 1].emojiList[0]
|
||||
this.pointItemList = this.items[this.groupIndex].emojiList.length
|
||||
/**
|
||||
* 计算偏移量
|
||||
*/
|
||||
judgeMove: function () {
|
||||
var deltaX = this.endX - this.beginX;
|
||||
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);
|
||||
}
|
||||
|
||||
},
|
||||
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.beforeList =
|
||||
this.items[this.groupIndex - 1].emojiList[
|
||||
this.items[this.groupIndex - 1].emojiList.length - 1
|
||||
];
|
||||
this.nextList = this.items[this.groupIndex + 1].emojiList[0];
|
||||
|
||||
/**
|
||||
* 计算偏移量
|
||||
*/
|
||||
judgeMove: function() {
|
||||
var deltaX = this.endX - this.beginX
|
||||
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.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 if (deltaX <= (-windowWidth * 3) / 5) {
|
||||
// 左移
|
||||
// this.toast('下一张')
|
||||
// [1]小点指示器 加 1
|
||||
++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.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();
|
||||
}
|
||||
},
|
||||
|
||||
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)
|
||||
this.emojiMarginLeft = -windowWidth * this.activeIndex
|
||||
// this.transition='none'
|
||||
|
||||
}
|
||||
} else if (deltaX <= -windowWidth * 3 / 5) { // 左移
|
||||
// this.toast('下一张')
|
||||
// [1]小点指示器 加 1
|
||||
++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">`
|
||||
// }
|
||||
}
|
||||
}
|
||||
// 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>
|
||||
|
||||
<style scoped>
|
||||
@import url("@/static/css/vue-emoji.css");
|
||||
@import url("@/static/css/vue-emoji.css");
|
||||
|
||||
.scroll-view_H {
|
||||
/* border:2px solid red; */
|
||||
white-space: nowrap;
|
||||
width: 76%;
|
||||
margin-top: -128rpx;
|
||||
margin-left: 96rpx;
|
||||
}
|
||||
.scroll-view_H {
|
||||
/* border:2px solid red; */
|
||||
white-space: nowrap;
|
||||
width: 76%;
|
||||
margin-top: -128rpx;
|
||||
margin-left: 96rpx;
|
||||
}
|
||||
|
||||
.scroll-view-item_H {
|
||||
display: inline-block;
|
||||
width: 20%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
font-size: 16rpx;
|
||||
}
|
||||
.scroll-view-item_H {
|
||||
display: inline-block;
|
||||
width: 20%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
font-size: 16rpx;
|
||||
}
|
||||
|
||||
.activeEmojiTab {
|
||||
background-color: gray;
|
||||
opacity: 0.8;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.activeEmojiTab {
|
||||
background-color: gray;
|
||||
opacity: 0.8;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@ -51,7 +51,7 @@ var emojiData = {
|
||||
{ url: '18.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: '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: '[擦汗]' },
|
||||
@ -100,7 +100,7 @@ var emojiData = {
|
||||
{ url: '58.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: '[咖啡]' },
|
||||
@ -124,7 +124,7 @@ var emojiData = {
|
||||
{ url: '78.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: '[弱]' },
|
||||
@ -148,7 +148,7 @@ var emojiData = {
|
||||
{ url: '98.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: '[激动]' },
|
||||
@ -157,7 +157,7 @@ var emojiData = {
|
||||
{ url: '103.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",
|
||||
emojiSort:2,
|
||||
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: [
|
||||
[
|
||||
{ url: 'q_000.png', alt: '[测试1]' },
|
||||
@ -190,7 +190,7 @@ var emojiData = {
|
||||
{ url: 'q_018.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: '[]' },
|
||||
@ -214,7 +214,7 @@ var emojiData = {
|
||||
{ url: 'q_038.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: '[]' },
|
||||
@ -238,7 +238,7 @@ var emojiData = {
|
||||
{ url: 'q_058.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: '[]' },
|
||||
@ -262,7 +262,7 @@ var emojiData = {
|
||||
{ url: 'q_078.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: '[]' },
|
||||
@ -285,7 +285,7 @@ var emojiData = {
|
||||
{ url: 'q_097.png', alt: '[]' },
|
||||
{ url: 'q_098.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: '[]' },
|
||||
@ -308,7 +308,7 @@ var emojiData = {
|
||||
{ url: 'q_118.png', alt: '[]' },
|
||||
{ url: 'q_119.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: '[]' },
|
||||
@ -331,7 +331,7 @@ var emojiData = {
|
||||
{ url: 'q_138.png', alt: '[]' },
|
||||
{ url: 'q_139.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: '[]' },
|
||||
@ -354,7 +354,7 @@ var emojiData = {
|
||||
{ url: 'q_158.png', alt: '[]' },
|
||||
{ url: 'q_159.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: '[]' },
|
||||
@ -367,7 +367,7 @@ var emojiData = {
|
||||
{ url: 'q_168.png', alt: '[]' },
|
||||
{ url: 'q_169.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",
|
||||
emojiSort:2,
|
||||
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: [
|
||||
[
|
||||
{ url: 'emotion_001.png', alt: '[微笑]' },
|
||||
@ -399,7 +399,7 @@ var emojiData = {
|
||||
{ url: 'emotion_018.png', alt: '[抱拳]' },
|
||||
{ url: 'emotion_019.png', alt: '[握手]' },
|
||||
{ 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: '[]' },
|
||||
@ -422,7 +422,7 @@ var emojiData = {
|
||||
{ url: 'emotion_038.png', alt: '[]' },
|
||||
{ url: 'emotion_039.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: '[]' },
|
||||
@ -445,7 +445,7 @@ var emojiData = {
|
||||
{ url: 'emotion_058.png', alt: '[]' },
|
||||
{ url: 'emotion_059.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: '[]' },
|
||||
@ -468,7 +468,7 @@ var emojiData = {
|
||||
{ url: 'emotion_078.png', alt: '[]' },
|
||||
{ url: 'emotion_079.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: '[]' },
|
||||
@ -491,7 +491,7 @@ var emojiData = {
|
||||
{ url: 'emotion_098.png', alt: '[]' },
|
||||
{ url: 'emotion_099.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: '[]' },
|
||||
@ -514,7 +514,7 @@ var emojiData = {
|
||||
{ url: 'emotion_118.png', alt: '[]' },
|
||||
{ url: 'emotion_119.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: '[]' },
|
||||
@ -537,7 +537,7 @@ var emojiData = {
|
||||
{ url: 'emotion_138.png', alt: '[]' },
|
||||
{ url: 'emotion_139.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",
|
||||
emojiSort:3,
|
||||
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: [
|
||||
[
|
||||
{ url: '0.png', alt: '[抖音1]' },
|
||||
@ -570,7 +570,7 @@ var emojiData = {
|
||||
{ url: '18.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: '[]' },
|
||||
@ -594,7 +594,7 @@ var emojiData = {
|
||||
{ url: '38.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: '[]' },
|
||||
@ -618,7 +618,7 @@ var emojiData = {
|
||||
{ url: '58.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: '[]' },
|
||||
@ -641,7 +641,7 @@ var emojiData = {
|
||||
{ url: '77.png', alt: '[]' },
|
||||
{ url: '78.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: '[]' },
|
||||
@ -665,7 +665,7 @@ var emojiData = {
|
||||
{ url: '98.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: '[]' },
|
||||
@ -689,7 +689,7 @@ var emojiData = {
|
||||
{ url: '118.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: '[]' },
|
||||
@ -713,12 +713,12 @@ var emojiData = {
|
||||
{ url: '138.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: '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",
|
||||
emojiSort:4,
|
||||
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: [
|
||||
[
|
||||
{ url: '0.png', alt: '[ajmd1]' },
|
||||
@ -794,7 +794,7 @@ var emojiData = {
|
||||
emojiName:"gongfuhuList",
|
||||
emojiSort:5,
|
||||
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: [
|
||||
[
|
||||
{ url: '0.gif', alt: '[]' },
|
||||
@ -841,7 +841,7 @@ var emojiData = {
|
||||
emojiName:"xxyList",
|
||||
emojiSort:6,
|
||||
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: [
|
||||
[
|
||||
{ url: '0.png', alt: '[]' },
|
||||
@ -899,7 +899,7 @@ var emojiData = {
|
||||
emojiName:"feineneList",
|
||||
emojiSort:7,
|
||||
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: [
|
||||
[
|
||||
{ url: '0.gif', alt: '[]' },
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
</view>
|
||||
<view class="u-top-default">
|
||||
<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>
|
||||
</view>
|
||||
|
||||
@ -46,253 +46,438 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex'
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
|
||||
export default {
|
||||
data: function() {
|
||||
return {
|
||||
money: "",
|
||||
nodiscount: "",
|
||||
discount: "",
|
||||
isshow: false,
|
||||
deliveryNum: "",
|
||||
isshow1: false,
|
||||
shop_discount: 10,
|
||||
totalMoney: "",
|
||||
payment: 0,
|
||||
info: [],
|
||||
orderNum: "",
|
||||
formId: "",
|
||||
time: "",
|
||||
Description: "",
|
||||
MoneyLimit: "",
|
||||
CouponEnabeld: "",
|
||||
discountvalue: "",
|
||||
nodiscountvalue: "",
|
||||
DiscountMoney: "0.00",
|
||||
couponItemId: 0,
|
||||
IsUseCoupon: 1,
|
||||
MaxUsableCash: 0,
|
||||
MaxUsableECardCash: 0,
|
||||
MaxUsableExtraCash: 0,
|
||||
balance: 0,
|
||||
realMoney: 0,
|
||||
isBalance: true,
|
||||
eCardCash: 0,
|
||||
extraCash: 0,
|
||||
realPayMoney: 0,
|
||||
isECashCard: true,
|
||||
isCoupon: true,
|
||||
isSubmit: true,
|
||||
Currency: __('¥'),
|
||||
store_id: 0,
|
||||
title: "",
|
||||
exchange_type: 1 //1:money->积分 2:积分->money
|
||||
}
|
||||
},
|
||||
computed: mapState(['Config', 'StateCode', 'notice', 'plantformInfo', 'shopInfo', 'userInfo', 'hasLogin']),
|
||||
onLoad(options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title:this.__('积分兑换')
|
||||
});
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
money: "",
|
||||
nodiscount: "",
|
||||
discount: "",
|
||||
isshow: false,
|
||||
deliveryNum: "",
|
||||
isshow1: false,
|
||||
shop_discount: 10,
|
||||
totalMoney: "",
|
||||
payment: 0,
|
||||
info: [],
|
||||
orderNum: "",
|
||||
formId: "",
|
||||
time: "",
|
||||
Description: "",
|
||||
MoneyLimit: "",
|
||||
CouponEnabeld: "",
|
||||
discountvalue: "",
|
||||
nodiscountvalue: "",
|
||||
DiscountMoney: "0.00",
|
||||
couponItemId: 0,
|
||||
IsUseCoupon: 1,
|
||||
MaxUsableCash: 0,
|
||||
MaxUsableECardCash: 0,
|
||||
MaxUsableExtraCash: 0,
|
||||
balance: 0,
|
||||
realMoney: 0,
|
||||
isBalance: true,
|
||||
eCardCash: 0,
|
||||
extraCash: 0,
|
||||
realPayMoney: 0,
|
||||
isECashCard: true,
|
||||
isCoupon: true,
|
||||
isSubmit: true,
|
||||
Currency: __("¥"),
|
||||
store_id: 0,
|
||||
title: "",
|
||||
exchange_type: 1, //1:money->积分 2:积分->money
|
||||
};
|
||||
},
|
||||
computed: mapState([
|
||||
"Config",
|
||||
"StateCode",
|
||||
"notice",
|
||||
"plantformInfo",
|
||||
"shopInfo",
|
||||
"userInfo",
|
||||
"hasLogin",
|
||||
]),
|
||||
onLoad(options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.__("积分兑换"),
|
||||
});
|
||||
|
||||
var that = this;
|
||||
that.setData({
|
||||
exchange_type: options.type ? options.type : 1
|
||||
});
|
||||
var that = this;
|
||||
that.setData({
|
||||
exchange_type: options.type ? options.type : 1,
|
||||
});
|
||||
|
||||
if (that.exchange_type == 1)
|
||||
{
|
||||
that.title = '余额兑换积分';
|
||||
}
|
||||
else
|
||||
{
|
||||
that.title = '积分转余额';
|
||||
}
|
||||
if (that.exchange_type == 1) {
|
||||
that.title = "余额兑换积分";
|
||||
} else {
|
||||
that.title = "积分转余额";
|
||||
}
|
||||
|
||||
that.$.setNavigationBarTitle({
|
||||
title: that.title
|
||||
});
|
||||
that.$.setNavigationBarTitle({
|
||||
title: that.title,
|
||||
});
|
||||
|
||||
that.getPlantformInfo(function(plantform) {
|
||||
that.forceUserInfo(function (user) {
|
||||
that.setData({
|
||||
Currency: ' ',
|
||||
store_id: 1001
|
||||
});
|
||||
that.getPlantformInfo(function (plantform) {
|
||||
that.forceUserInfo(function (user) {
|
||||
that.setData({
|
||||
Currency: " ",
|
||||
store_id: 1001,
|
||||
});
|
||||
|
||||
that.load(options);
|
||||
});
|
||||
})
|
||||
},
|
||||
that.load(options);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
onUnload(){
|
||||
// 离开页面,注销事件
|
||||
var that = this
|
||||
this.notice.removeNotification("RefreshCoupon1", that);
|
||||
},
|
||||
methods: {
|
||||
onUnload() {
|
||||
// 离开页面,注销事件
|
||||
var that = this;
|
||||
this.notice.removeNotification("RefreshCoupon1", that);
|
||||
},
|
||||
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 store_id = 1001;
|
||||
var a = {
|
||||
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 = {
|
||||
store_id: store_id
|
||||
};
|
||||
//console.log("val+++++", a);
|
||||
var that = this;
|
||||
let num = e.detail.value;
|
||||
|
||||
},
|
||||
clearnum: function(a) {
|
||||
//console.info(111)
|
||||
this.setData({
|
||||
deliveryNum: "",
|
||||
realPayMoney: ""
|
||||
})
|
||||
},
|
||||
inputnum: function(e) {
|
||||
let that = this;
|
||||
//购买积分
|
||||
if (that.exchange_type == 1) {
|
||||
let need_money = num * that.Config.POINTS_VAUE_RATE;
|
||||
|
||||
let num = e.detail.value;
|
||||
if (need_money > that.userInfo.user_money) {
|
||||
num = Math.ceil(
|
||||
that.userInfo.user_money / that.Config.POINTS_VAUE_RATE
|
||||
);
|
||||
|
||||
//购买积分
|
||||
if (that.exchange_type == 1)
|
||||
{
|
||||
let need_money = num * that.Config.POINTS_VAUE_RATE;
|
||||
that.$.alert(that.$.sprintf("最多兑换 %d 积分", num));
|
||||
|
||||
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));
|
||||
|
||||
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({
|
||||
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,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@import "../../styles/_variables";
|
||||
.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 }
|
||||
@import "../../styles/_variables";
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -394,13 +394,14 @@ export default {
|
||||
// that.notice.postNotificationName("RefreshOrder", options);
|
||||
// });
|
||||
// }
|
||||
|
||||
if (item) {
|
||||
var that = this;
|
||||
var options = that.options;
|
||||
if (options.issub != "true") return;
|
||||
options.ud_id = item.ud_id;
|
||||
options.address = item.ud_address;
|
||||
that.$.navigateBack(1, function () {
|
||||
//console.info('SelectAddress')
|
||||
that.notice.postNotificationName("RefreshOrder", options);
|
||||
});
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
/>
|
||||
<view class="con-bd-sex-box" @click="chooseSex(1)">
|
||||
<image
|
||||
class="choose-sex-icon"
|
||||
:class="['choose-sex-icon', formData.sexType == 1]"
|
||||
:src="formData.sexType == 1 ? sele2Icon : noseleIcon"
|
||||
mode=""
|
||||
></image>
|
||||
@ -290,6 +290,9 @@ export default {
|
||||
cityData: [],
|
||||
provinceData: [],
|
||||
isFound: false,
|
||||
issub: false,
|
||||
options: {},
|
||||
spid: "",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -312,7 +315,7 @@ export default {
|
||||
if (city) {
|
||||
this.originalData.result.addressComponent.city = city;
|
||||
} else {
|
||||
if (this.ud_id) {
|
||||
if (this.ud_id && this.ud_id != "-1") {
|
||||
this.getCurrAddress();
|
||||
} else {
|
||||
this.getLocation();
|
||||
@ -323,6 +326,13 @@ export default {
|
||||
if (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: {
|
||||
getAppDistrict() {
|
||||
@ -370,14 +380,13 @@ export default {
|
||||
that.formData.userPhone = data.ud_mobile;
|
||||
that.formData.lableName = data.ud_label - 1;
|
||||
that.formData.sexType = data.ud_gender;
|
||||
|
||||
let item = {
|
||||
name: data.ud_marker,
|
||||
location: {
|
||||
lat: data.ud_latitude,
|
||||
lng: data.ud_longitude,
|
||||
},
|
||||
addr: data.ud_address,
|
||||
addr: data.ud_street_addr,
|
||||
};
|
||||
that.handerSetAddress(item);
|
||||
|
||||
@ -590,19 +599,19 @@ export default {
|
||||
}
|
||||
},
|
||||
//数据回显时使用此方法
|
||||
setData(obj) {
|
||||
this.oldObj = obj;
|
||||
this.formData.detailAddress = obj.detailAddress;
|
||||
this.formData.userName = obj.userName;
|
||||
this.formData.userPhone = obj.userPhone;
|
||||
this.formData.lableName = obj.lableName;
|
||||
this.formData.sexType = obj.sexType;
|
||||
this.addressInfo.title = obj.title;
|
||||
this.addressInfo.address = obj.address;
|
||||
this.addressInfo.latitude = obj.latitude;
|
||||
this.addressInfo.longitude = obj.longitude;
|
||||
this.agreeState = obj.agreeState;
|
||||
},
|
||||
// setData(obj) {
|
||||
// this.oldObj = obj;
|
||||
// this.formData.detailAddress = obj.detailAddress;
|
||||
// this.formData.userName = obj.userName;
|
||||
// this.formData.userPhone = obj.userPhone;
|
||||
// this.formData.lableName = obj.lableName;
|
||||
// this.formData.sexType = obj.sexType;
|
||||
// this.addressInfo.title = obj.title;
|
||||
// this.addressInfo.address = obj.address;
|
||||
// this.addressInfo.latitude = obj.latitude;
|
||||
// this.addressInfo.longitude = obj.longitude;
|
||||
// this.agreeState = obj.agreeState;
|
||||
// },
|
||||
//获取当前的地理位置
|
||||
getLocation(type) {
|
||||
let that = this;
|
||||
@ -658,7 +667,7 @@ export default {
|
||||
const lowerShortStr = shortStr.toLowerCase();
|
||||
const lowerLongStr = longStr.toLowerCase();
|
||||
|
||||
return lowerLongStr.includes(lowerShortStr);
|
||||
return lowerShortStr.includes(lowerLongStr);
|
||||
},
|
||||
//保存地址
|
||||
submitAddress() {
|
||||
@ -703,6 +712,7 @@ export default {
|
||||
}
|
||||
|
||||
let item = this.originalData;
|
||||
|
||||
let province = {
|
||||
label: "",
|
||||
value: 0,
|
||||
@ -720,8 +730,8 @@ export default {
|
||||
|
||||
this.provinceData.forEach((group) => {
|
||||
let isFind = this.fuzzyMatch(
|
||||
group.label,
|
||||
item.result.addressComponent.province
|
||||
item.result.addressComponent.province,
|
||||
group.label
|
||||
);
|
||||
if (isFind) {
|
||||
province = group;
|
||||
@ -773,17 +783,20 @@ export default {
|
||||
ud_street_no: this.formData.detailAddress,
|
||||
ud_latitude: this.latitude,
|
||||
ud_longitude: this.longitude,
|
||||
ud_label: lableName,
|
||||
ud_label: lableName || "",
|
||||
ud_province_id: province.value, // 省份ID
|
||||
ud_province: province.label, // 省份名称
|
||||
ud_city_id: city.value, // ud_city_id 城市ID
|
||||
ud_city: city.label, // 城市名称
|
||||
ud_county_id: county.value, // 区ID
|
||||
ud_county: county.label, // 区名字
|
||||
ud_address: this.currRoadAddress,
|
||||
ud_is_default: 0,
|
||||
ud_address: this.currAddress + this.formData.detailAddress,
|
||||
ud_is_default: 1,
|
||||
};
|
||||
|
||||
let that = this;
|
||||
var options = that.options;
|
||||
|
||||
this.$.request({
|
||||
url: this.Config.URL.user.address_edit,
|
||||
method: "post",
|
||||
@ -795,7 +808,16 @@ export default {
|
||||
icon: "success",
|
||||
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;
|
||||
});
|
||||
|
||||
console.log("that.searchAddress", that.searchAddress);
|
||||
|
||||
that.searchAddress.forEach((item) => {
|
||||
@ -1001,7 +1022,7 @@ export default {
|
||||
region: this.originalData.result.addressComponent.city,
|
||||
output: "json",
|
||||
city_limit: true,
|
||||
ak: "vMqiMPVK8i30Q5VOCDI3LWxgZqR2tfKa",
|
||||
ak: "qWKt2xbrqXsp2yK35YYXVBNZgrbiCG5v",
|
||||
ret_coordtype: "gcj02ll",
|
||||
};
|
||||
|
||||
|
||||
@ -1,187 +1,203 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="sign_conent_box">
|
||||
<view class="sign_conent">
|
||||
<view class="sign_conent_title">
|
||||
本月你已连续签到
|
||||
<span class="sign_conent_title_span">{{ signDays || 0 }}</span>
|
||||
天
|
||||
</view>
|
||||
<view class="sign_list_aligns">
|
||||
<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_itemsv">
|
||||
<view class="scroll_view_item">
|
||||
<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_item_top">{{ item.value_str }}</view>
|
||||
<!-- <view class="scroll_view_item_bottom">一张</view> -->
|
||||
</view>
|
||||
<view class="scroll_view_item_tips">签到{{ item.days }}天</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>
|
||||
<view>
|
||||
<view class="sign_conent_box">
|
||||
<view class="sign_conent">
|
||||
<view class="sign_conent_title">
|
||||
本月你已连续签到
|
||||
<span class="sign_conent_title_span">{{ signDays || 0 }}</span>
|
||||
天
|
||||
</view>
|
||||
<view class="sign_list_aligns">
|
||||
<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_itemsv">
|
||||
<view class="scroll_view_item">
|
||||
<view class="scroll_view_item_img_box">
|
||||
<image
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/sign_bg.png"
|
||||
class="scroll_view_item_img"
|
||||
mode=""
|
||||
></image>
|
||||
<view class="scroll_view_item_top">{{
|
||||
item.value_str
|
||||
}}</view>
|
||||
<!-- <view class="scroll_view_item_bottom">一张</view> -->
|
||||
</view>
|
||||
<view class="scroll_view_item_tips"
|
||||
>签到{{ item.days }}天</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>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
is_sign: 0,
|
||||
continue_sign_days: 0,
|
||||
sign_list: [],
|
||||
},
|
||||
watch: {
|
||||
is_sign: function(val, oldVal) {
|
||||
this.isSign = val
|
||||
},
|
||||
continue_sign_days: function(val) {
|
||||
this.signDays = val
|
||||
},
|
||||
sign_list: function(val) {
|
||||
this.signList = val;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
signDays :0,
|
||||
isSign :0,
|
||||
signList : [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
cksigin() {
|
||||
this.$emit('click', '');
|
||||
}
|
||||
}
|
||||
};
|
||||
export default {
|
||||
props: {
|
||||
is_sign: 0,
|
||||
continue_sign_days: 0,
|
||||
sign_list: [],
|
||||
},
|
||||
watch: {
|
||||
is_sign: function (val, oldVal) {
|
||||
this.isSign = val;
|
||||
},
|
||||
continue_sign_days: function (val) {
|
||||
this.signDays = val;
|
||||
},
|
||||
sign_list: function (val) {
|
||||
this.signList = val;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
signDays: 0,
|
||||
isSign: 0,
|
||||
signList: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
cksigin() {
|
||||
this.$emit("click", "");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.sign_conent_box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 50rpx;
|
||||
.sign_conent_box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 50rpx;
|
||||
|
||||
.sign_conent {
|
||||
width: 686rpx;
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
.sign_conent {
|
||||
width: 686rpx;
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.sign_conent_title {
|
||||
width: 100%;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
.sign_conent_title {
|
||||
width: 100%;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
|
||||
.sign_conent_title_span {
|
||||
color: #ff6526 !important;
|
||||
}
|
||||
}
|
||||
.sign_conent_title_span {
|
||||
color: #ff6526 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.sign_list_aligns {
|
||||
width: 100%;
|
||||
padding: 48rpx 0 64rpx 0;
|
||||
box-sizing: border-box;
|
||||
.sign_list_aligns {
|
||||
width: 100%;
|
||||
padding: 48rpx 0 64rpx 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
.scroll-view_H {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
.scroll-view_H {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
|
||||
.scroll_view_items {
|
||||
display: inline-block;
|
||||
}
|
||||
.scroll_view_items {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.scroll_view_itemsv {
|
||||
display: flex;
|
||||
}
|
||||
.scroll_view_itemsv {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.scroll_view_item {
|
||||
.scroll_view_item_img_box {
|
||||
width: 108rpx;
|
||||
height: 108rpx;
|
||||
position: relative;
|
||||
.scroll_view_item {
|
||||
.scroll_view_item_img_box {
|
||||
width: 108rpx;
|
||||
height: 108rpx;
|
||||
position: relative;
|
||||
|
||||
.scroll_view_item_top {
|
||||
font-size: 20rpx;
|
||||
color: #bf8d46;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
top: 32rpx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
}
|
||||
.scroll_view_item_top {
|
||||
font-size: 20rpx;
|
||||
color: #bf8d46;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
top: 32rpx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.scroll_view_item_bottom {
|
||||
font-size: 12rpx;
|
||||
color: #ffe29d;
|
||||
position: absolute;
|
||||
bottom: 18rpx;
|
||||
left: 42rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
.scroll_view_item_bottom {
|
||||
font-size: 12rpx;
|
||||
color: #ffe29d;
|
||||
position: absolute;
|
||||
bottom: 18rpx;
|
||||
left: 42rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll_view_item_tips {
|
||||
width: 108rpx;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
padding-top: 16rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.scroll_view_item_tips {
|
||||
width: 108rpx;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
padding-top: 16rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.scroll_view_item_img {
|
||||
width: 108rpx;
|
||||
height: 108rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
.scroll_view_item_img {
|
||||
width: 108rpx;
|
||||
height: 108rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll_xian {
|
||||
width: 64rpx;
|
||||
height: 2rpx;
|
||||
background: #ffe4d9;
|
||||
margin-top: 52rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scroll_xian {
|
||||
width: 64rpx;
|
||||
height: 2rpx;
|
||||
background: #ffe4d9;
|
||||
margin-top: 52rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sign_conent_btn {
|
||||
width: 100%;
|
||||
border-radius: 45rpx;
|
||||
background: linear-gradient(270deg, #fcae3a 0%, #f15d25 100%);
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
padding: 22rpx 0;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.sign_conent_btn {
|
||||
width: 100%;
|
||||
border-radius: 45rpx;
|
||||
background: linear-gradient(270deg, #fcae3a 0%, #f15d25 100%);
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
padding: 22rpx 0;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.is_sign_conent_btn {
|
||||
width: 100%;
|
||||
border-radius: 45rpx;
|
||||
background: #666;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
padding: 22rpx 0;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.is_sign_conent_btn {
|
||||
width: 100%;
|
||||
border-radius: 45rpx;
|
||||
background: #666;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
padding: 22rpx 0;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</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
863
member/member/supermarketlList.vue
Normal file
863
member/member/supermarketlList.vue
Normal 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) {
|
||||
// 手机GPS定位已开启则判断微信APP是否已获取访问定位信息的权限
|
||||
_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
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="page order-list-container">
|
||||
<view :class="show ? 'cover' : ''"></view>
|
||||
<view class="m-product-all">
|
||||
<view class="m-tab">
|
||||
@ -8,54 +8,56 @@
|
||||
scroll-x
|
||||
style="width: 100%"
|
||||
>
|
||||
<view
|
||||
:class="[
|
||||
'm-navbar-item ellipsis',
|
||||
tapindex == 1 ? 'm-navbar-item-on' : '',
|
||||
]"
|
||||
@click="allOrders"
|
||||
>
|
||||
{{ __("全部订单") }}
|
||||
</view>
|
||||
<view
|
||||
:class="[
|
||||
'm-navbar-item ellipsis',
|
||||
tapindex == 2 ? 'm-navbar-item-on' : '',
|
||||
]"
|
||||
@click="toBePaid"
|
||||
>
|
||||
{{ __("待支付") }}
|
||||
</view>
|
||||
<view
|
||||
v-if="!card_kind_id"
|
||||
:class="[
|
||||
'm-navbar-item ellipsis',
|
||||
tapindex == 5 ? 'm-navbar-item-on' : '',
|
||||
]"
|
||||
@click="toBeShipping"
|
||||
>
|
||||
<label v-if="kind_id == 1201">{{ __("待发货") }}</label>
|
||||
<label v-else>{{ __("待服务") }}</label>
|
||||
</view>
|
||||
<view
|
||||
:class="[
|
||||
'm-navbar-item ellipsis',
|
||||
tapindex == 3 ? 'm-navbar-item-on' : '',
|
||||
]"
|
||||
@click="receiptOfGoods"
|
||||
>
|
||||
<label v-if="kind_id == 1201">{{ __("待收货") }}</label>
|
||||
<label v-else>{{ __("待确认") }}</label>
|
||||
</view>
|
||||
<view
|
||||
:class="[
|
||||
'm-navbar-item ellipsis',
|
||||
tapindex == 4 ? 'm-navbar-item-on' : '',
|
||||
]"
|
||||
@click="toBeEvaluated"
|
||||
>
|
||||
<label v-if="kind_id == 1201">{{ __("已完成") }}</label>
|
||||
<label v-else>{{ __("已服务") }}</label>
|
||||
<view class="tab-list">
|
||||
<view
|
||||
:class="[
|
||||
'm-navbar-item ellipsis',
|
||||
tapindex == 1 ? 'm-navbar-item-on' : '',
|
||||
]"
|
||||
@click="allOrders"
|
||||
>
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
:class="[
|
||||
'm-navbar-item ellipsis',
|
||||
tapindex == 2 ? 'm-navbar-item-on' : '',
|
||||
]"
|
||||
@click="toBePaid"
|
||||
>
|
||||
{{ __("待支付") }}
|
||||
</view>
|
||||
<view
|
||||
v-if="!card_kind_id"
|
||||
:class="[
|
||||
'm-navbar-item ellipsis',
|
||||
tapindex == 5 ? 'm-navbar-item-on' : '',
|
||||
]"
|
||||
@click="toBeShipping"
|
||||
>
|
||||
<label v-if="kind_id == 1201">{{ __("待发货") }}</label>
|
||||
<label v-else>{{ __("待服务") }}</label>
|
||||
</view>
|
||||
<view
|
||||
:class="[
|
||||
'm-navbar-item ellipsis',
|
||||
tapindex == 3 ? 'm-navbar-item-on' : '',
|
||||
]"
|
||||
@click="receiptOfGoods"
|
||||
>
|
||||
<label v-if="kind_id == 1201">{{ __("待收货") }}</label>
|
||||
<label v-else>{{ __("待确认") }}</label>
|
||||
</view>
|
||||
<view
|
||||
:class="[
|
||||
'm-navbar-item ellipsis',
|
||||
tapindex == 4 ? 'm-navbar-item-on' : '',
|
||||
]"
|
||||
@click="toBeEvaluated"
|
||||
>
|
||||
<label v-if="kind_id == 1201">{{ __("已完成") }}</label>
|
||||
<label v-else>{{ __("已服务") }}</label>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@ -78,7 +80,8 @@
|
||||
style=""
|
||||
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">
|
||||
{{ items.store_name }}
|
||||
</p>
|
||||
@ -94,63 +97,135 @@
|
||||
? __("货到付款")
|
||||
: __("在线支付")
|
||||
}}</text>
|
||||
<label>{{ items.order_state_name }}</label>
|
||||
<label>{{ formatOrderName(items.order_state_name) }}</label>
|
||||
</view>
|
||||
|
||||
<view class="m-product-list">
|
||||
<view class="m-product-list" v-if="items.item.length == 1">
|
||||
<navigator
|
||||
:url="'/member/order/detail?on=' + items.order_id"
|
||||
v-for="(item, ii) in items.item"
|
||||
:key="ii"
|
||||
class="m-product-item"
|
||||
>
|
||||
<view class="m-product-img">
|
||||
<image :src="item.order_item_image" mode="aspectFill" />
|
||||
</view>
|
||||
<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 class="m-product-item-1">
|
||||
<view class="m-product-img">
|
||||
<image :src="item.order_item_image" mode="aspectFill" />
|
||||
</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">
|
||||
<block v-if="item.order_item_unit_price">
|
||||
<label>{{ __("¥") }}</label
|
||||
>{{ item.order_item_unit_price }}
|
||||
</block>
|
||||
<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>
|
||||
|
||||
<block v-if="item.item_unit_points">
|
||||
<label style="margin: auto 10rpx">+</label
|
||||
>{{ item.item_unit_points }}{{ __("积分") }}
|
||||
</block>
|
||||
<!-- <view class="m-product-price">
|
||||
<block v-if="item.order_item_unit_price">
|
||||
<label>{{ __("¥") }}</label
|
||||
>{{ item.order_item_unit_price }}
|
||||
</block>
|
||||
|
||||
<block v-if="item.item_unit_sp">
|
||||
<label style="margin: auto 10rpx">+</label
|
||||
>{{ item.item_unit_sp }}{{ __("众宝") }}
|
||||
</block>
|
||||
<block v-if="item.item_unit_points">
|
||||
<label style="margin: auto 10rpx">+</label
|
||||
>{{ item.item_unit_points }}{{ __("积分") }}
|
||||
</block>
|
||||
|
||||
<text style="float: right; margin-right: 60rpx"
|
||||
>x{{ item.order_item_quantity }}</text
|
||||
<block v-if="item.item_unit_sp">
|
||||
<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>
|
||||
@ -175,7 +250,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-total-info">
|
||||
<!-- <view class="m-total-info">
|
||||
<view>
|
||||
{{ __("总金额") }}:
|
||||
<block v-if="items.order_payment_amount">
|
||||
@ -215,7 +290,7 @@
|
||||
>
|
||||
+ {{ items.order_resource_ext2 }}{{ __("众宝") }}</label
|
||||
>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="m-total-btn">
|
||||
<form report-submit="true">
|
||||
<button
|
||||
@ -283,12 +358,12 @@
|
||||
>{{ __("确认收货") }}</view
|
||||
>
|
||||
<view
|
||||
class="u-link-btn"
|
||||
:data-on="items.order_id"
|
||||
v-if="
|
||||
items.kind_id == 1201 &&
|
||||
items.order_state_id == StateCode.ORDER_STATE_FINISH
|
||||
"
|
||||
class="u-link-btn"
|
||||
@click="placeAnOrder"
|
||||
>{{ __("再下一单") }}</view
|
||||
>
|
||||
@ -478,6 +553,19 @@ export default {
|
||||
"forceUserInfo",
|
||||
"getUserInfo",
|
||||
]),
|
||||
formatOrderName(name) {
|
||||
switch (name) {
|
||||
case "已取消/已作废":
|
||||
return "已取消";
|
||||
break;
|
||||
case "已完成/已签收":
|
||||
return "已完成";
|
||||
break;
|
||||
default:
|
||||
return name;
|
||||
}
|
||||
},
|
||||
formatAmout(amout) {},
|
||||
RefreshMessage: function (e) {
|
||||
this.setData({
|
||||
tapindex: 1,
|
||||
@ -595,7 +683,8 @@ export default {
|
||||
url: this.Config.URL.user.order_lists,
|
||||
data: params,
|
||||
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) {
|
||||
that.setData({
|
||||
flag: false,
|
||||
@ -825,206 +914,345 @@ export default {
|
||||
<style lang="scss">
|
||||
@import "../../styles/_variables";
|
||||
|
||||
.m-navbar-item {
|
||||
padding: 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.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;
|
||||
.order-list-container {
|
||||
.tab-list {
|
||||
display: flex;
|
||||
margin: 8px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.m-product-item {
|
||||
margin-top: 0rpx;
|
||||
}
|
||||
/* 隐藏滚动条 */
|
||||
.scroll-view {
|
||||
scrollbar-width: none; /* Firefox */
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
.scroll-view::-webkit-scrollbar {
|
||||
display: none; /* Chrome, Safari */
|
||||
}
|
||||
|
||||
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 {
|
||||
display: inline-block;
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
// padding: 20rpx 0;
|
||||
padding: 0;
|
||||
font-size: 28rpx;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
color: #999ca7;
|
||||
}
|
||||
|
||||
/*min-width:110rpx;*/
|
||||
min-width: 150rpx;
|
||||
min-width: 108rpx;
|
||||
.m-navbar-item:after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.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>
|
||||
@ -168,7 +168,6 @@ export default {
|
||||
success: function (n) {
|
||||
that.$.hideLoading();
|
||||
var up_res = that.$.parseJSON(n.data);
|
||||
debugger;
|
||||
var s = up_res.data.url;
|
||||
dataInfo.comment_image.push(s);
|
||||
that.setData({ data_info: dataInfo });
|
||||
|
||||
49
pages.json
49
pages.json
@ -107,7 +107,7 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "购物车",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom",
|
||||
// "navigationStyle": "custom",
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"type": "transparent"
|
||||
@ -269,6 +269,14 @@
|
||||
"navigationBarTitleText": "成长值"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "member/supermarketlList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "超市列表",
|
||||
"enablePullDownRefresh":true,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "member/options",
|
||||
"style": {
|
||||
@ -511,7 +519,7 @@
|
||||
{
|
||||
"path": "order/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -1488,24 +1496,25 @@
|
||||
"backgroundColor": "#ffffff",
|
||||
|
||||
"selectedColor": "#DB384C",
|
||||
"list": [{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/images/tabBar1.png",
|
||||
"selectedIconPath": "static/images/tabBar_sel1.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/category/category",
|
||||
"iconPath": "static/images/tabBar2.png",
|
||||
"selectedIconPath": "static/images/tabBar_sel2.png",
|
||||
"text": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/index/image",
|
||||
"iconPath": "static/images/tabBarSns.png",
|
||||
"selectedIconPath": "static/images/tabBarSns_sel.png",
|
||||
"text": "发现"
|
||||
},
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/images/tabBar1.png",
|
||||
"selectedIconPath": "static/images/tabBar_sel1.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/category/category",
|
||||
"iconPath": "static/images/tabBar2.png",
|
||||
"selectedIconPath": "static/images/tabBar_sel2.png",
|
||||
"text": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/index/image",
|
||||
"iconPath": "static/images/tabBarSns.png",
|
||||
"selectedIconPath": "static/images/tabBarSns_sel.png",
|
||||
"text": "发现"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/cart/cart",
|
||||
"iconPath": "static/images/tabBar3.png",
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<status-bar></status-bar>
|
||||
<!-- <status-bar :backgroundColor="'#fff'"></status-bar> -->
|
||||
<!-- <uni-nav-bar title="购物车"></uni-nav-bar> -->
|
||||
<view v-if="loadComplete">
|
||||
<block v-if="isdata">
|
||||
<view class="manage" @click="showDelBtn">{{
|
||||
!showDelList ? "管理" : "退出管理"
|
||||
}}</view>
|
||||
<view class="m-product-all" style="padding-bottom: 10rpx">
|
||||
<view class="m-product-list">
|
||||
<block
|
||||
@ -24,7 +28,7 @@
|
||||
store_items.cart_select ? 'circle-filled' : 'circle'
|
||||
"
|
||||
:color="store_items.cart_select ? theme_bg : '#e3e3e3'"
|
||||
size="20"
|
||||
size="28"
|
||||
/>
|
||||
</view>
|
||||
<navigator
|
||||
@ -50,7 +54,7 @@
|
||||
class="m-product-item"
|
||||
>
|
||||
<view
|
||||
:class="{ 'm-item-c': 1, del: item.cart_id == T_Id }"
|
||||
:class="{ 'm-item-c': 1 }"
|
||||
@touchstart="removestart"
|
||||
@touchmove="removeload"
|
||||
@touchend="removeend"
|
||||
@ -77,7 +81,7 @@
|
||||
<uni-icons
|
||||
:type="item.cart_select ? 'circle-filled' : 'circle'"
|
||||
:color="item.cart_select ? theme_bg : '#e3e3e3'"
|
||||
size="20"
|
||||
size="28"
|
||||
/>
|
||||
</view>
|
||||
<view class="m-product-img">
|
||||
@ -362,7 +366,7 @@
|
||||
<uni-icons
|
||||
:type="pluse.cart_select ? 'circle-filled' : 'circle'"
|
||||
:color="pluse.cart_select ? theme_bg : '#e3e3e3'"
|
||||
size="20"
|
||||
size="28"
|
||||
/>
|
||||
</view>
|
||||
<navigator
|
||||
@ -477,7 +481,7 @@
|
||||
<uni-icons
|
||||
:type="isckall ? 'circle-filled' : 'circle'"
|
||||
:color="isckall ? theme_bg : '#e3e3e3'"
|
||||
size="20"
|
||||
size="28"
|
||||
/>
|
||||
</view>
|
||||
|
||||
@ -558,7 +562,7 @@
|
||||
<uni-icons
|
||||
:type="isckall ? 'circle-filled' : 'circle'"
|
||||
:color="isckall ? theme_bg : '#e3e3e3'"
|
||||
size="20"
|
||||
size="28"
|
||||
/>
|
||||
</view>
|
||||
|
||||
@ -749,7 +753,7 @@
|
||||
<uni-icons
|
||||
:type="isckall ? 'circle-filled' : 'circle'"
|
||||
:color="isckall ? theme_bg : '#e3e3e3'"
|
||||
size="20"
|
||||
size="28"
|
||||
/>
|
||||
</view>
|
||||
<view
|
||||
@ -760,11 +764,13 @@
|
||||
"
|
||||
>{{ __("全选") }}</view
|
||||
>
|
||||
<view class="m-cart-del" @click="delAll">
|
||||
<label class="iconfont icon-delete"></label>
|
||||
</view>
|
||||
<!-- <view class="m-cart-del" @click="delAll" v-show="showDelList">
|
||||
<view class="btn-del">
|
||||
删除
|
||||
</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"
|
||||
>{{ __("合计:") }}
|
||||
<block v-if="cartlist.orderSelMoneyAmount">
|
||||
@ -797,9 +803,16 @@
|
||||
</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) }}
|
||||
</view>
|
||||
<view class="m-footer-btn-main" v-show="showDelList" @click="delAll">
|
||||
删除
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
@ -925,6 +938,7 @@ export default {
|
||||
theme_bg: theme_bg,
|
||||
loadComplete: false, // 没有加载数据前不显示的对应内容
|
||||
isGuessFlag: false,
|
||||
showDelList: false,
|
||||
};
|
||||
},
|
||||
computed: mapState([
|
||||
@ -1004,6 +1018,9 @@ export default {
|
||||
"setCartNum",
|
||||
"showCartNum",
|
||||
]),
|
||||
showDelBtn() {
|
||||
this.showDelList = !this.showDelList;
|
||||
},
|
||||
//获取平台信息
|
||||
getPlatType: function () {
|
||||
let platStr = null;
|
||||
@ -1681,6 +1698,18 @@ export default {
|
||||
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 .uni-icons {
|
||||
// position: absolute;
|
||||
@ -1694,7 +1723,8 @@ export default {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
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;}*/
|
||||
@ -1795,6 +1825,12 @@ export default {
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.manage {
|
||||
margin: 20rpx 60rpx;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.m-panel-sp-pname .m-pprice {
|
||||
color: $default-skin-bg;
|
||||
font-size: 32rpx;
|
||||
@ -1808,6 +1844,12 @@ export default {
|
||||
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-item {
|
||||
height: 130rpx;
|
||||
@ -1846,7 +1888,7 @@ export default {
|
||||
// position: absolute;
|
||||
// top: 50%;
|
||||
// left: 50%;
|
||||
margin-top: -20rpx;
|
||||
// margin-top: -20rpx;
|
||||
// margin-left: -20rpx;
|
||||
}
|
||||
|
||||
@ -1858,7 +1900,7 @@ export default {
|
||||
width: 60%;
|
||||
max-width: 60%;
|
||||
height: auto;
|
||||
padding: 0px 10px 5px 5px;
|
||||
padding: 0px 18px 14px 5px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 320px) {
|
||||
@ -1954,7 +1996,7 @@ export default {
|
||||
flex: 1;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 0 10px;
|
||||
margin: 0 8px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@ -1972,9 +2014,9 @@ export default {
|
||||
}
|
||||
|
||||
.m-footer-btn-main {
|
||||
width: 25%;
|
||||
width: 23%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
float: right;
|
||||
background: $default-skin-bg;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
@ -2057,12 +2099,12 @@ view {
|
||||
}
|
||||
|
||||
.m-product-img {
|
||||
width: 59px;
|
||||
height: 59px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
image {
|
||||
// padding: 14rpx;
|
||||
width: 59px;
|
||||
height: 59px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
@ -2083,7 +2125,7 @@ view {
|
||||
}
|
||||
|
||||
.m-product-price {
|
||||
line-height: 30px !important;
|
||||
line-height: 40px !important;
|
||||
flex: 1;
|
||||
font-size: 12px;
|
||||
}
|
||||
@ -2117,9 +2159,10 @@ view {
|
||||
}
|
||||
|
||||
.u-num-btn {
|
||||
width: 52rpx;
|
||||
width: 60rpx;
|
||||
line-height: 56rpx;
|
||||
height: 56rpx;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.u-cart-num {
|
||||
@ -2128,16 +2171,19 @@ view {
|
||||
left: -20px;
|
||||
|
||||
.u-num-btn {
|
||||
width: 25px;
|
||||
line-height: 25px;
|
||||
height: 25px;
|
||||
width: 29px;
|
||||
line-height: 28px;
|
||||
height: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
input {
|
||||
font-size: 13px !important;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
font-size: 15px !important;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
border-top: 1px solid #dddddd;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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 class="m-ad-name">
|
||||
<text>{{submitinfo.delivery_address_row.ud_name}}</text>
|
||||
@ -28,24 +28,32 @@
|
||||
</view>
|
||||
|
||||
|
||||
<block v-if="canSelfpick && !isVirtual" >
|
||||
<block v-if=" !isVirtual" >
|
||||
<view class="distribution" v-if="(true)">
|
||||
<view style="width:30%">{{__('配送方式')}}</view>
|
||||
<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%"
|
||||
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)" 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">
|
||||
<image v-if="(storeServeFlag)" style="width:32rpx;height:32rpx;border-radius:50%"
|
||||
src="/static/images/ziti.png" />
|
||||
@ -741,12 +749,13 @@
|
||||
|
||||
<payment-box :paymentDataDefault="paymentData" :order_id="order_id" ref="paymentBox" @onCancel="onCancel"
|
||||
@onPaid="onPaid" @onFail="onFail"></payment-box>
|
||||
<loginPopup></loginPopup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import paymentBox from "../../components/payment-box.vue";
|
||||
|
||||
import loginPopup from "../../components/loginPopup.vue";
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
|
||||
export default {
|
||||
@ -855,6 +864,7 @@ export default {
|
||||
},
|
||||
components: {
|
||||
paymentBox,
|
||||
loginPopup,
|
||||
},
|
||||
computed: mapState([
|
||||
"Config",
|
||||
@ -1039,7 +1049,7 @@ export default {
|
||||
},
|
||||
RefreshOrder: function (e) {
|
||||
this.setData({
|
||||
ud_id: e.ud_id,
|
||||
ud_id: e.ud_id || e || 0,
|
||||
chain_id: this.chain_id,
|
||||
spinfo: e.spid,
|
||||
addInfo1: this.addInfo,
|
||||
@ -1047,7 +1057,6 @@ export default {
|
||||
|
||||
// 修正urlArgs的ud_id参数
|
||||
this.editUrlArgs("ud_id", e.ud_id);
|
||||
|
||||
this.getCartList();
|
||||
},
|
||||
RefreshOrderChain: function (e) {
|
||||
@ -1250,7 +1259,6 @@ export default {
|
||||
}
|
||||
// params.delivery_type_id = that.selfpickFlag ? 5 : 10; //是否自提; //DELIVERY_TYPE_SELF_PICK_UP = 5
|
||||
params.is_delivery = that.selfpickFlag ? 0 : 1; //是否自提
|
||||
|
||||
that.$.request({
|
||||
url: this.Config.URL.cart.checkout,
|
||||
data: params,
|
||||
@ -1264,6 +1272,7 @@ export default {
|
||||
that.deliverys = true;
|
||||
}
|
||||
}
|
||||
console.log("deliverys", that.deliverys);
|
||||
that.transportIds = data.transportIds;
|
||||
|
||||
var ud_id = 0;
|
||||
@ -1299,7 +1308,6 @@ export default {
|
||||
});
|
||||
} else {
|
||||
var item_row = data.items[0].items[0];
|
||||
|
||||
if (that.chain_id) {
|
||||
that.drawSelf(item_row.store_id);
|
||||
}
|
||||
@ -1510,7 +1518,6 @@ export default {
|
||||
) || null
|
||||
);
|
||||
},
|
||||
|
||||
submitorder: function (e) {
|
||||
let that = this;
|
||||
if (that.$.isNull(that.order_id)) {
|
||||
@ -1922,7 +1929,6 @@ export default {
|
||||
onPaid: function (e) {
|
||||
//重新加载用户资源数据
|
||||
let that = this;
|
||||
|
||||
that.reloadUserResource(function (user_info) {
|
||||
that.returnUrl(that.order_id);
|
||||
});
|
||||
@ -1933,7 +1939,6 @@ export default {
|
||||
},
|
||||
returnUrl: function (e) {
|
||||
var that = this;
|
||||
|
||||
if (that.isFightGroup) {
|
||||
that.$.gotopage(
|
||||
"/activity/fightgroup/detail?gb_id=" + that.isFightGroup + "&on=" + e
|
||||
@ -2114,6 +2119,7 @@ export default {
|
||||
storeServeFlag: 0,
|
||||
ud_name: "",
|
||||
phone: "",
|
||||
intraCityService: 0,
|
||||
});
|
||||
|
||||
this.addressFlag
|
||||
@ -2126,7 +2132,12 @@ export default {
|
||||
|
||||
this.getCartList();
|
||||
},
|
||||
|
||||
handerIntraCityService() {
|
||||
this.intraCityService = 1;
|
||||
this.addressFlag = 0;
|
||||
this.selfpickFlag = 0;
|
||||
this.getCartList();
|
||||
},
|
||||
//自提操作,需要用到 - 虚拟商品暂时共用
|
||||
|
||||
draw: function (e) {
|
||||
@ -2136,6 +2147,7 @@ export default {
|
||||
addressFlag: 0,
|
||||
selfpickFlag: 1,
|
||||
storeServeFlag: 0,
|
||||
intraCityService: 0,
|
||||
});
|
||||
|
||||
this.drawSelf(store_id);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -389,7 +389,7 @@ export default {
|
||||
current_currency: 86,
|
||||
current_lang: "zh-CN",
|
||||
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: "中文",
|
||||
};
|
||||
},
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
:style="{
|
||||
background: PageNav.window.navigationBarBackgroundColor,
|
||||
}"
|
||||
@click="handerSkipu"
|
||||
@click="handerSkipuSelectShippingAddress"
|
||||
>
|
||||
<text class="iconfontAili icon-dingwei"></text>
|
||||
<text class="address-block">{{ address }}</text>
|
||||
@ -52,6 +52,7 @@
|
||||
:rightWidth="rightWidth"
|
||||
>
|
||||
<block slot="left">
|
||||
<!--
|
||||
<view
|
||||
class="city"
|
||||
v-if="
|
||||
@ -95,6 +96,15 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
-->
|
||||
<view class="supermarket-block" @click="handerSkipu">
|
||||
<uni-icons
|
||||
type="location"
|
||||
:color="PageNav.window.navigationBarTextStyle"
|
||||
size="18"
|
||||
/>
|
||||
<view class="supermarket-name">超市入口</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="input-view">
|
||||
<uni-icons
|
||||
@ -108,6 +118,7 @@
|
||||
class="input"
|
||||
type="text"
|
||||
:placeholder="__('输入关键词')"
|
||||
readonly="readonly"
|
||||
@click="onSearch"
|
||||
/>
|
||||
</view>
|
||||
@ -402,7 +413,7 @@
|
||||
:y="initY"
|
||||
>
|
||||
<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'"
|
||||
@tap="returnTop"
|
||||
></image>
|
||||
@ -497,7 +508,7 @@ export default {
|
||||
current_lang: "zh-CN",
|
||||
current_standard: true,
|
||||
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: "中文",
|
||||
|
||||
initX: "690",
|
||||
@ -519,6 +530,9 @@ export default {
|
||||
borderColor: "#dfdfdf",
|
||||
fontColor: "#fff",
|
||||
backgroundColor: "transparent",
|
||||
provinceData: [],
|
||||
cityData: [],
|
||||
areaData: [],
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
@ -627,6 +641,7 @@ export default {
|
||||
*/
|
||||
onShow: function () {
|
||||
let that = this;
|
||||
this.getAppDistrict();
|
||||
//that.$.isNull(that.plantformInfo) || uni.setNavigationBarTitle({title: that.plantformInfo.name});
|
||||
//this.refresh || this.setData({refresh: true})
|
||||
|
||||
@ -642,7 +657,7 @@ export default {
|
||||
if (currentAddress) {
|
||||
this.address = currentAddress.name;
|
||||
} else {
|
||||
// that.isPhoneLocationEnabled();
|
||||
that.isPhoneLocationEnabled();
|
||||
}
|
||||
|
||||
that.resetLang();
|
||||
@ -725,11 +740,39 @@ export default {
|
||||
"getUserInfo",
|
||||
"showCartNum",
|
||||
]),
|
||||
handerSkipu() {
|
||||
handerSkipuSelectShippingAddress() {
|
||||
uni.navigateTo({
|
||||
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() {
|
||||
let _this = this;
|
||||
// 获取用户手机系统信息
|
||||
@ -752,6 +795,7 @@ export default {
|
||||
},
|
||||
fail: (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() {
|
||||
var that = this;
|
||||
|
||||
@ -915,16 +970,34 @@ export default {
|
||||
location = res.latitude + "," + res.longitude;
|
||||
|
||||
let BMap = new bmap.BMapWX({
|
||||
ak: "rr77afHlUOgaGEtp7z5sVdnjy0CIaIa1",
|
||||
ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
|
||||
});
|
||||
|
||||
let fail = function (res) {
|
||||
console.log("fail", res);
|
||||
};
|
||||
|
||||
var city = {
|
||||
label: "",
|
||||
value: 0,
|
||||
};
|
||||
|
||||
let success = function (res) {
|
||||
console.log("结果地址", res);
|
||||
let data = res.originalData.result.addressComponent;
|
||||
|
||||
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({
|
||||
@ -1149,7 +1222,17 @@ export default {
|
||||
ajaxCache: {
|
||||
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;
|
||||
tmp.unshift({
|
||||
id: 0,
|
||||
@ -1350,8 +1433,15 @@ export default {
|
||||
forceRefresh: force_refresh,
|
||||
},
|
||||
success: function (data, status, msg, code) {
|
||||
if (status == 250) {
|
||||
uni.showToast({
|
||||
title: "shop/mobile/app" + msg,
|
||||
icon: "error",
|
||||
duration: 1000,
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
|
||||
let tmp = that.swiperTabItems[index];
|
||||
tmp = {
|
||||
pageId: data.page_id,
|
||||
@ -1947,6 +2037,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
handerSkipu() {
|
||||
uni.navigateTo({
|
||||
url: `/member/member/supermarketlList`,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -2009,6 +2104,26 @@ export default {
|
||||
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 {
|
||||
width: 92%;
|
||||
display: flex;
|
||||
@ -2080,6 +2195,12 @@ export default {
|
||||
transform: translate(40%, -20%);
|
||||
}
|
||||
|
||||
.supermarket-block {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* 弹出层形式的广告 */
|
||||
.uni-banner {
|
||||
width: 80%;
|
||||
|
||||
2389
pages/index/list.vue
2389
pages/index/list.vue
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -5,26 +5,26 @@
|
||||
<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>
|
||||
<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 class="userInfo">
|
||||
<image class="userAvatar cimg" :src="item.cover_url"></image>
|
||||
<text class="right-follow">+</text>
|
||||
|
||||
<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>
|
||||
</view>
|
||||
<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>
|
||||
</view>
|
||||
<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>
|
||||
</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 class="content">
|
||||
<text class="userName">@{{item.user_nickname}}-{{i}}++{{k-i}}</text>
|
||||
|
||||
1834
pages/index/vip.vue
1834
pages/index/vip.vue
File diff suppressed because it is too large
Load Diff
@ -35,14 +35,14 @@
|
||||
<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"></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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</swiper-item>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1615,7 +1615,8 @@
|
||||
<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>
|
||||
</view>
|
||||
<loginPopup :show="showLoginPopup" @close="closeLoginPopup"></loginPopup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<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 loading from "@/components/loading.vue";
|
||||
import { mapMutations, mapState } from "vuex";
|
||||
|
||||
import loginPopup from "../../components/loginPopup.vue";
|
||||
var intervalDate;
|
||||
var intervalPt;
|
||||
var intervalCt;
|
||||
@ -1774,7 +1775,7 @@ export default {
|
||||
Id: 0,
|
||||
needed_point: 0,
|
||||
|
||||
cityPickerValueDefault: [0, 0, 0],
|
||||
cityPickerValueDefault: [1, 2, 3],
|
||||
themeColor: "#007AFF",
|
||||
product_freight_info: {
|
||||
content: "无货",
|
||||
@ -1787,6 +1788,7 @@ export default {
|
||||
url: "",
|
||||
is_chain: 0,
|
||||
currentSwipperImageIndex: 1,
|
||||
showLoginPopup: false,
|
||||
};
|
||||
},
|
||||
metaInfo() {
|
||||
@ -1837,6 +1839,7 @@ export default {
|
||||
loading,
|
||||
headerNavMenu,
|
||||
uniPopup,
|
||||
loginPopup,
|
||||
},
|
||||
computed: {
|
||||
...mapState([
|
||||
@ -1885,7 +1888,6 @@ export default {
|
||||
|
||||
await this.$onLaunched;
|
||||
var that = this;
|
||||
|
||||
if (options.scene) {
|
||||
var scene = decodeURIComponent(options.scene);
|
||||
var opts = {};
|
||||
@ -1989,6 +1991,8 @@ export default {
|
||||
clearInterval(intervalCt);
|
||||
clearInterval(intervalTimeAct);
|
||||
|
||||
this.showLoginPopup = false;
|
||||
|
||||
if (this.$refs.mpvueCityPicker.showPicker) {
|
||||
this.$refs.mpvueCityPicker.pickerCancel();
|
||||
}
|
||||
@ -2040,7 +2044,6 @@ export default {
|
||||
"getUserInfo",
|
||||
"setCartNum",
|
||||
]),
|
||||
|
||||
//生成的海报图片
|
||||
createPoster(e) {
|
||||
this.productPoster = e;
|
||||
@ -2210,7 +2213,6 @@ export default {
|
||||
that.setData({
|
||||
product_freight_info: data.product_freight_info,
|
||||
});
|
||||
|
||||
data.item_row.ProductName = data.item_row.product_item_name;
|
||||
data.item_row.ProductTips = data.item_row.product_tips;
|
||||
data.item_row.MarketPrice = Math.max(
|
||||
@ -2711,6 +2713,12 @@ export default {
|
||||
});
|
||||
},
|
||||
ckselectsp1: function (e) {
|
||||
if (!this.hasLogin) {
|
||||
this.showLoginPopup = true;
|
||||
return;
|
||||
}
|
||||
// console.log(this)
|
||||
|
||||
this.setData({
|
||||
//change: e.currentTarget.offsetLeft,
|
||||
selectsp: 1,
|
||||
@ -3939,7 +3947,6 @@ export default {
|
||||
|
||||
onConfirm(e) {
|
||||
let that = this;
|
||||
|
||||
let district_info = that.$.isNull(e.label.toString())
|
||||
? that.__("请选择地址")
|
||||
: e.label.toString();
|
||||
@ -3993,6 +4000,9 @@ export default {
|
||||
url: "/activity/giftbag/detail?aid=" + that.ProductInfo.activity_id,
|
||||
});
|
||||
},
|
||||
closeLoginPopup() {
|
||||
this.showLoginPopup = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -125,7 +125,7 @@
|
||||
:y="returnPos.initY"
|
||||
>
|
||||
<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'"
|
||||
@tap="returnTop"
|
||||
></image>
|
||||
|
||||
@ -56,9 +56,9 @@
|
||||
<cover-view class="right-text"></cover-view>
|
||||
<!-- #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 -->
|
||||
<text class="right-text">{{item.story_like_count}}</text>
|
||||
@ -68,7 +68,7 @@
|
||||
<!-- #endif -->
|
||||
|
||||
<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 -->
|
||||
<text class="right-text">{{item.story_comment_count}}</text>
|
||||
@ -77,7 +77,7 @@
|
||||
<cover-view class="right-text">{{item.story_comment_count}}</cover-view>
|
||||
<!-- #endif -->
|
||||
<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 -->
|
||||
<text class="right-text">{{__('分享')}}</text>
|
||||
@ -88,7 +88,7 @@
|
||||
</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>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,324 +1,368 @@
|
||||
<template name="zy-search">
|
||||
<view>
|
||||
<view class="search">
|
||||
<slot></slot>
|
||||
<!-- 使用$emit触发实例上(父组件)的自定义方法并传入参数 -->
|
||||
<!-- <button type="primary" @click="$emit('test','block')">方形</button> -->
|
||||
<!-- sync双向数据绑定语法糖 -->
|
||||
<!-- <button type="primary" @click="changeStyle">双向数据绑定改变style</button> -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<image src="https://static.lancerdt.com/xcxfile/appicon/zy-search/voice.svg" mode="aspectFit" @click="startRecognize()" class="voice-icon"></image>
|
||||
<!-- #endif -->
|
||||
<template v-if="isFocus">
|
||||
<input maxlength="20" focus type="text" value="" confirm-type="search" @confirm="searchStart()" :placeholder="__('请输入关键词搜索')" v-model.trim="searchText"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<input maxlength="20" type="text" value="" confirm-type="search" @confirm="searchStart()" :placeholder="__('请输入关键词搜索')" v-model.trim="searchText"/>
|
||||
</template>
|
||||
<image src="https://static.lancerdt.com/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://static.lancerdt.com/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>
|
||||
<view>
|
||||
<view class="search">
|
||||
<slot></slot>
|
||||
<!-- 使用$emit触发实例上(父组件)的自定义方法并传入参数 -->
|
||||
<!-- <button type="primary" @click="$emit('test','block')">方形</button> -->
|
||||
<!-- sync双向数据绑定语法糖 -->
|
||||
<!-- <button type="primary" @click="changeStyle">双向数据绑定改变style</button> -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<image
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/zy-search/voice.svg"
|
||||
mode="aspectFit"
|
||||
@click="startRecognize()"
|
||||
class="voice-icon"
|
||||
></image>
|
||||
<!-- #endif -->
|
||||
<template v-if="isFocus">
|
||||
<input
|
||||
maxlength="20"
|
||||
focus
|
||||
type="text"
|
||||
value=""
|
||||
confirm-type="search"
|
||||
@confirm="searchStart()"
|
||||
:placeholder="__('请输入关键词搜索')"
|
||||
v-model.trim="searchText"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<input
|
||||
maxlength="20"
|
||||
type="text"
|
||||
value=""
|
||||
confirm-type="search"
|
||||
@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>
|
||||
|
||||
<script>
|
||||
export default{
|
||||
name:"zy-search",
|
||||
props:{
|
||||
isFocus:{ //是否自动获取焦点
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
theme:{ //选择块级显示还是圆形显示
|
||||
type: String,
|
||||
default: 'block'
|
||||
},
|
||||
showWant:{ //是否展示推荐菜单
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
hotList: { //推荐列表数据
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
searchHisList: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
suggestText: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
export default {
|
||||
name: "zy-search",
|
||||
props: {
|
||||
isFocus: {
|
||||
//是否自动获取焦点
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
theme: {
|
||||
//选择块级显示还是圆形显示
|
||||
type: String,
|
||||
default: "block",
|
||||
},
|
||||
showWant: {
|
||||
//是否展示推荐菜单
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
hotList: {
|
||||
//推荐列表数据
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
searchHisList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
suggestText: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
|
||||
speechEngine: { //语音引擎=>讯飞:iFly,百度:'baidu'
|
||||
type: String,
|
||||
default: 'baidu'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchText:'', //搜索关键词
|
||||
hList:[] //历史记录
|
||||
};
|
||||
},
|
||||
created() {
|
||||
var that = this;
|
||||
setTimeout(()=>{
|
||||
this.setData({
|
||||
searchText: this.suggestText
|
||||
});
|
||||
speechEngine: {
|
||||
//语音引擎=>讯飞:iFly,百度:'baidu'
|
||||
type: String,
|
||||
default: "baidu",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchText: "", //搜索关键词
|
||||
hList: [], //历史记录
|
||||
};
|
||||
},
|
||||
created() {
|
||||
var that = this;
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
searchText: this.suggestText,
|
||||
});
|
||||
|
||||
if (this.searchHisList.length > 0)
|
||||
{
|
||||
//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({
|
||||
key:'search_cache',
|
||||
success(res){
|
||||
let list = res.data;
|
||||
let t = true;
|
||||
if(list.length > 5){
|
||||
for(let item of list){
|
||||
if(item == _this.searchText){
|
||||
return;
|
||||
}
|
||||
}
|
||||
list.pop();
|
||||
list.unshift(_this.searchText);
|
||||
}else{
|
||||
for(let item of list){
|
||||
if(item == _this.searchText){
|
||||
t = false;
|
||||
}
|
||||
}
|
||||
if(t)
|
||||
{
|
||||
list.unshift(_this.searchText);
|
||||
}
|
||||
|
||||
}
|
||||
_this.hList = list;
|
||||
uni.setStorage({
|
||||
key: 'search_cache',
|
||||
data: _this.hList
|
||||
});
|
||||
_this.$emit('getSearchText', _this.searchText);
|
||||
},
|
||||
fail() {
|
||||
_this.hList = [];
|
||||
_this.hList.push(_this.searchText);
|
||||
uni.setStorage({
|
||||
key: 'search_cache',
|
||||
data: _this.hList
|
||||
});
|
||||
_this.$emit('getSearchText', _this.searchText);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
keywordsClick (item) { //推荐搜索
|
||||
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;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.searchHisList.length > 0) {
|
||||
//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({
|
||||
key: "search_cache",
|
||||
success(res) {
|
||||
let list = res.data;
|
||||
let t = true;
|
||||
if (list.length > 5) {
|
||||
for (let item of list) {
|
||||
if (item == _this.searchText) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
list.pop();
|
||||
list.unshift(_this.searchText);
|
||||
} else {
|
||||
for (let item of list) {
|
||||
if (item == _this.searchText) {
|
||||
t = false;
|
||||
}
|
||||
}
|
||||
if (t) {
|
||||
list.unshift(_this.searchText);
|
||||
}
|
||||
}
|
||||
_this.hList = list;
|
||||
uni.setStorage({
|
||||
key: "search_cache",
|
||||
data: _this.hList,
|
||||
});
|
||||
_this.$emit("getSearchText", _this.searchText);
|
||||
},
|
||||
fail() {
|
||||
_this.hList = [];
|
||||
_this.hList.push(_this.searchText);
|
||||
uni.setStorage({
|
||||
key: "search_cache",
|
||||
data: _this.hList,
|
||||
});
|
||||
_this.$emit("getSearchText", _this.searchText);
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
keywordsClick(item) {
|
||||
//推荐搜索
|
||||
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>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.search{
|
||||
width: 640rpx;
|
||||
margin: 30rpx auto 0;
|
||||
position: relative;
|
||||
input{
|
||||
background-color: #F7F7F7;
|
||||
padding: 10rpx 74rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 50rpx;
|
||||
height: 88rpx;
|
||||
}
|
||||
.voice-icon{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 16rpx 20rpx 16rpx 0;
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
top: 4rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
.search-icon{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 16rpx 20rpx 16rpx 0;
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
top: 20rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
.s-block{
|
||||
margin-top: 30rpx;
|
||||
.header{
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
image{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 10rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 24rpx;
|
||||
}
|
||||
}
|
||||
.list{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
view{
|
||||
width: 50%;
|
||||
color: #8A8A8A;
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
border-top: 2rpx solid #FFF;
|
||||
border-left: 2rpx solid #FFF;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
background-color: #F7F7F7;
|
||||
}
|
||||
}
|
||||
}
|
||||
.s-circle{
|
||||
margin-top: 30rpx;
|
||||
.header{
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
border-bottom: 2rpx solid #F9F9F9;
|
||||
position: relative;
|
||||
image{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 10rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 24rpx;
|
||||
}
|
||||
}
|
||||
.list{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 30rpx 20rpx;
|
||||
view{
|
||||
padding: 8rpx 30rpx;
|
||||
margin: 20rpx 30rpx 0 0;
|
||||
font-size: 28rpx;
|
||||
color: #8A8A8A;
|
||||
background-color: #F7F7F7;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.wanted-block{
|
||||
margin-top: 30rpx;
|
||||
.header{
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.list{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
view{
|
||||
width: 50%;
|
||||
color: #8A8A8A;
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
border-top: 2rpx solid #FFF;
|
||||
border-left: 2rpx solid #FFF;
|
||||
background-color: #F7F7F7;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
.wanted-circle{
|
||||
margin-top: 30rpx;
|
||||
.header{
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.list{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 30rpx 20rpx;
|
||||
view{
|
||||
padding: 8rpx 30rpx;
|
||||
margin: 20rpx 30rpx 0 0;
|
||||
font-size: 28rpx;
|
||||
color: #8A8A8A;
|
||||
background-color: #F7F7F7;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.search {
|
||||
width: 640rpx;
|
||||
margin: 30rpx auto 0;
|
||||
position: relative;
|
||||
input {
|
||||
background-color: #f7f7f7;
|
||||
padding: 10rpx 74rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 50rpx;
|
||||
height: 88rpx;
|
||||
}
|
||||
.voice-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 16rpx 20rpx 16rpx 0;
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
top: 4rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
.search-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 16rpx 20rpx 16rpx 0;
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
top: 20rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
.s-block {
|
||||
margin-top: 30rpx;
|
||||
.header {
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 10rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 24rpx;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
view {
|
||||
width: 50%;
|
||||
color: #8a8a8a;
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
border-top: 2rpx solid #fff;
|
||||
border-left: 2rpx solid #fff;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
}
|
||||
}
|
||||
.s-circle {
|
||||
margin-top: 30rpx;
|
||||
.header {
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
border-bottom: 2rpx solid #f9f9f9;
|
||||
position: relative;
|
||||
image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
padding: 10rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 24rpx;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 30rpx 20rpx;
|
||||
view {
|
||||
padding: 8rpx 30rpx;
|
||||
margin: 20rpx 30rpx 0 0;
|
||||
font-size: 28rpx;
|
||||
color: #8a8a8a;
|
||||
background-color: #f7f7f7;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.wanted-block {
|
||||
margin-top: 30rpx;
|
||||
.header {
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
view {
|
||||
width: 50%;
|
||||
color: #8a8a8a;
|
||||
font-size: 28rpx;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
border-top: 2rpx solid #fff;
|
||||
border-left: 2rpx solid #fff;
|
||||
background-color: #f7f7f7;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
.wanted-circle {
|
||||
margin-top: 30rpx;
|
||||
.header {
|
||||
font-size: 32rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 30rpx 20rpx;
|
||||
view {
|
||||
padding: 8rpx 30rpx;
|
||||
margin: 20rpx 30rpx 0 0;
|
||||
font-size: 28rpx;
|
||||
color: #8a8a8a;
|
||||
background-color: #f7f7f7;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -3,7 +3,11 @@
|
||||
<view class="header member-top">
|
||||
<view class="header-top hide">
|
||||
<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 class="header-bottom">
|
||||
<text>{{ plantformInfo.site_name }}</text>
|
||||
@ -12,59 +16,60 @@
|
||||
<image :src="plantformInfo.site_mobile_logo"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 10px;">
|
||||
<view style="padding: 10px">
|
||||
<view class="introduce">
|
||||
<!--<view class="title">店铺介绍</view>-->
|
||||
<view class="text">{{ plantformInfo.site_meta_description || "" }}</view>
|
||||
<view class="text">{{
|
||||
plantformInfo.site_meta_description || ""
|
||||
}}</view>
|
||||
</view>
|
||||
<view class="message">
|
||||
<view class="peoplename aboutUs">
|
||||
<view>{{ __('公司名称') }}:</view>
|
||||
<view>{{ __("公司名称") }}:</view>
|
||||
<label>{{ plantformInfo.site_company_name }}</label>
|
||||
</view>
|
||||
<view class="tel aboutUs" bindtap="call">
|
||||
<view>{{ __('联系方式') }}:</view>
|
||||
<image src="https://static.lancerdt.com/xcxfile/appicon/images/call.png"
|
||||
style="width:30rpx;height:30rpx;margin-right:10rpx"></image>
|
||||
<label
|
||||
style="color:#17abe3">{{ plantformInfo.site_tel }}</label>
|
||||
<view>{{ __("联系方式") }}:</view>
|
||||
<image
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/images/call.png"
|
||||
style="width: 30rpx; height: 30rpx; margin-right: 10rpx"
|
||||
></image>
|
||||
<label style="color: #17abe3">{{ plantformInfo.site_tel }}</label>
|
||||
</view>
|
||||
<view class="address aboutUs">
|
||||
<view>{{ __('公司地址') }}:</view>
|
||||
<view>{{ __("公司地址") }}:</view>
|
||||
<label>{{ plantformInfo.site_address }}</label>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapMutations, mapState} from 'vuex';
|
||||
import { mapMutations, mapState } from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: mapState([
|
||||
'Config',
|
||||
'StateCode',
|
||||
'notice',
|
||||
'plantformInfo',
|
||||
'shopInfo',
|
||||
'userInfo',
|
||||
'hasLogin'
|
||||
"Config",
|
||||
"StateCode",
|
||||
"notice",
|
||||
"plantformInfo",
|
||||
"shopInfo",
|
||||
"userInfo",
|
||||
"hasLogin",
|
||||
]),
|
||||
async onLoad(options) {
|
||||
await this.$onLaunched;
|
||||
let that = this;
|
||||
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.__('关于我们')
|
||||
title: this.__("关于我们"),
|
||||
});
|
||||
|
||||
this.getPlantformInfo(function (plantformInfo) {
|
||||
});
|
||||
this.getPlantformInfo(function (plantformInfo) {});
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
var that = this;
|
||||
@ -79,24 +84,30 @@ export default {
|
||||
*/
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '你点了收藏按钮',
|
||||
icon: 'none'
|
||||
title: "你点了收藏按钮",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['login', 'logout', 'getPlantformInfo', 'forceUserInfo', 'getUserInfo']),
|
||||
...mapMutations([
|
||||
"login",
|
||||
"logout",
|
||||
"getPlantformInfo",
|
||||
"forceUserInfo",
|
||||
"getUserInfo",
|
||||
]),
|
||||
call: function () {
|
||||
this.$.makePhoneCall({
|
||||
phoneNumber: this.data.plantformInfo.LegalNumber
|
||||
phoneNumber: this.data.plantformInfo.LegalNumber,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '../../styles/_variables.scss';
|
||||
@import "../../styles/_variables.scss";
|
||||
|
||||
.body {
|
||||
background: #f8f8f8;
|
||||
@ -186,15 +197,14 @@ export default {
|
||||
|
||||
.message .aboutUs label {
|
||||
color: #717171;
|
||||
flex:1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
|
||||
.member-top {
|
||||
-webkit-animation: changeBg 20s infinite;
|
||||
animation: changeBg 20s infinite;
|
||||
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;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
@ -291,5 +301,4 @@ export default {
|
||||
background-color: #ec87bf;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,467 +1,507 @@
|
||||
<template>
|
||||
<view class="news-edit">
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">内容:</view>
|
||||
<view class="m-cell-bd">
|
||||
<textarea
|
||||
class="input"
|
||||
name="text"
|
||||
v-model="formData.category_content"
|
||||
placeholder-class="placeholder"
|
||||
></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">关键字:</view>
|
||||
<view class="m-cell-bd">
|
||||
<input
|
||||
class="input input-1"
|
||||
placeholder-class="placeholder"
|
||||
type="text"
|
||||
v-model="formData.message_keywords"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">分类:</view>
|
||||
<view class="m-cell-bd">
|
||||
<select name="public-choice" class="input input-1" v-model="formData.category_id" @change="getCouponSelected">
|
||||
<option value="">请选择</option>
|
||||
<option :value="item.category_id" v-for="item in category" >{{item.category_name}}</option>
|
||||
</select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">区域:</view>
|
||||
<view class="m-cell-bd">
|
||||
<select name="public-choice" class="input input-1" v-model="formData.message_area" @change="getCouponSelected">
|
||||
<option value="">请选择</option>
|
||||
<option :value="item.id" v-for="item in area" >{{item.category_name}}</option>
|
||||
</select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell m-cell-select-before" @click="showbox">
|
||||
<view class="m-cell-hd">省/市/区:</view>
|
||||
<view class="m-cell-bd">
|
||||
<label>{{seladstr}}</label>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">详细地址:</view>
|
||||
<view class="m-cell-bd">
|
||||
<input
|
||||
class="input input-1"
|
||||
placeholder-class="placeholder"
|
||||
type="text"
|
||||
v-model="formData.message_address"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">联系人:</view>
|
||||
<view class="m-cell-bd">
|
||||
<input
|
||||
class="input input-1"
|
||||
placeholder-class="placeholder"
|
||||
type="text"
|
||||
v-model="formData.message_username"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">手机号:</view>
|
||||
<view class="m-cell-bd">
|
||||
<input
|
||||
class="input input-1"
|
||||
placeholder-class="placeholder"
|
||||
type="number"
|
||||
v-model="formData.message_mobile"
|
||||
/>
|
||||
</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">
|
||||
<view class="hjs-select-img">
|
||||
<image class='pic_box_image' :src='item.Url' :data-src="item.Url" @click="previewImage" mode="scaleToFill"></image>
|
||||
<view class='shanchu' style=''><label @tap='delImg' class="iconfont icon-delete"
|
||||
:data-id="item.SkuId" :data-index="index"
|
||||
style='color:#fff'></label>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view @click='chooseVideoImage' class="hjs-select-img">
|
||||
<image class='pic_box_image' src='https://static.lancerdt.com/xcxfile/appicon/img/pic_11.png'></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>
|
||||
<view class="news-edit">
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">内容:</view>
|
||||
<view class="m-cell-bd">
|
||||
<textarea
|
||||
class="input"
|
||||
name="text"
|
||||
v-model="formData.category_content"
|
||||
placeholder-class="placeholder"
|
||||
></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">关键字:</view>
|
||||
<view class="m-cell-bd">
|
||||
<input
|
||||
class="input input-1"
|
||||
placeholder-class="placeholder"
|
||||
type="text"
|
||||
v-model="formData.message_keywords"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">分类:</view>
|
||||
<view class="m-cell-bd">
|
||||
<select
|
||||
name="public-choice"
|
||||
class="input input-1"
|
||||
v-model="formData.category_id"
|
||||
@change="getCouponSelected"
|
||||
>
|
||||
<option value="">请选择</option>
|
||||
<option :value="item.category_id" v-for="item in category">
|
||||
{{ item.category_name }}
|
||||
</option>
|
||||
</select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">区域:</view>
|
||||
<view class="m-cell-bd">
|
||||
<select
|
||||
name="public-choice"
|
||||
class="input input-1"
|
||||
v-model="formData.message_area"
|
||||
@change="getCouponSelected"
|
||||
>
|
||||
<option value="">请选择</option>
|
||||
<option :value="item.id" v-for="item in area">
|
||||
{{ item.category_name }}
|
||||
</option>
|
||||
</select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell m-cell-select-before" @click="showbox">
|
||||
<view class="m-cell-hd">省/市/区:</view>
|
||||
<view class="m-cell-bd">
|
||||
<label>{{ seladstr }}</label>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">详细地址:</view>
|
||||
<view class="m-cell-bd">
|
||||
<input
|
||||
class="input input-1"
|
||||
placeholder-class="placeholder"
|
||||
type="text"
|
||||
v-model="formData.message_address"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">联系人:</view>
|
||||
<view class="m-cell-bd">
|
||||
<input
|
||||
class="input input-1"
|
||||
placeholder-class="placeholder"
|
||||
type="text"
|
||||
v-model="formData.message_username"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-cell">
|
||||
<view class="m-cell-hd">手机号:</view>
|
||||
<view class="m-cell-bd">
|
||||
<input
|
||||
class="input input-1"
|
||||
placeholder-class="placeholder"
|
||||
type="number"
|
||||
v-model="formData.message_mobile"
|
||||
/>
|
||||
</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">
|
||||
<view class="hjs-select-img">
|
||||
<image
|
||||
class="pic_box_image"
|
||||
:src="item.Url"
|
||||
:data-src="item.Url"
|
||||
@click="previewImage"
|
||||
mode="scaleToFill"
|
||||
></image>
|
||||
<view class="shanchu" style=""
|
||||
><label
|
||||
@tap="delImg"
|
||||
class="iconfont icon-delete"
|
||||
:data-id="item.SkuId"
|
||||
:data-index="index"
|
||||
style="color: #fff"
|
||||
></label>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view @click="chooseVideoImage" class="hjs-select-img">
|
||||
<image
|
||||
class="pic_box_image"
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/img/pic_11.png"
|
||||
></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>
|
||||
|
||||
<script>
|
||||
import mpvueCityPicker from '../../components/mpvue-citypicker/mpvueCityPicker.vue'
|
||||
import {mapMutations, mapState} from 'vuex'
|
||||
var picPath = [];
|
||||
export default {
|
||||
components: {
|
||||
mpvueCityPicker
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
category_content: '',
|
||||
message_keywords: '',
|
||||
category_id: '',
|
||||
message_area: '',
|
||||
message_full_area: '',
|
||||
message_address: '',
|
||||
message_username: '',
|
||||
message_mobile: '',
|
||||
},
|
||||
themeColor: '#007AFF',
|
||||
cityPickerValueDefault: [0, 0, 0],
|
||||
form: {},
|
||||
story_video:"",
|
||||
ImgList: [],
|
||||
Pindex: 0,
|
||||
selectedProId: 0,
|
||||
selectedCityId: 0,
|
||||
selectedCountyId: 0,
|
||||
selectedPro: '',
|
||||
selectedCity: '',
|
||||
selectedCounty: '',
|
||||
seladstr: "请选择所属地区",
|
||||
'category' : [],
|
||||
'area' :[],
|
||||
isShow: false,
|
||||
}
|
||||
},
|
||||
computed: mapState(['Config']),
|
||||
onLoad: function(options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title:this.__('发布信息')
|
||||
});
|
||||
|
||||
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(){
|
||||
that.$.navigateBack(1)
|
||||
},2000)
|
||||
} else {
|
||||
that.$.confirm(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
chooseVideoImage(){
|
||||
let that = this;
|
||||
uni.showActionSheet({
|
||||
title:that.__("选择上传类型"),
|
||||
itemList: [that.__('图片')],
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
if(res.tapIndex == 0){
|
||||
this.chooseImages()
|
||||
} else {
|
||||
this.chooseVideo()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
UploadImg() {
|
||||
var that = this, max_num = 9;
|
||||
|
||||
if (that.$.isNull(that.ImgList) || (max_num = 9 - that.ImgList.length), 0 != max_num){
|
||||
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) {
|
||||
this.VideoOfImagesShow = false
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 三级联动选择
|
||||
showbox() {
|
||||
/*
|
||||
import mpvueCityPicker from "../../components/mpvue-citypicker/mpvueCityPicker.vue";
|
||||
import { mapMutations, mapState } from "vuex";
|
||||
var picPath = [];
|
||||
export default {
|
||||
components: {
|
||||
mpvueCityPicker,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
category_content: "",
|
||||
message_keywords: "",
|
||||
category_id: "",
|
||||
message_area: "",
|
||||
message_full_area: "",
|
||||
message_address: "",
|
||||
message_username: "",
|
||||
message_mobile: "",
|
||||
},
|
||||
themeColor: "#007AFF",
|
||||
cityPickerValueDefault: [0, 0, 0],
|
||||
form: {},
|
||||
story_video: "",
|
||||
ImgList: [],
|
||||
Pindex: 0,
|
||||
selectedProId: 0,
|
||||
selectedCityId: 0,
|
||||
selectedCountyId: 0,
|
||||
selectedPro: "",
|
||||
selectedCity: "",
|
||||
selectedCounty: "",
|
||||
seladstr: "请选择所属地区",
|
||||
category: [],
|
||||
area: [],
|
||||
isShow: false,
|
||||
};
|
||||
},
|
||||
computed: mapState(["Config"]),
|
||||
onLoad: function (options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.__("发布信息"),
|
||||
});
|
||||
|
||||
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 () {
|
||||
that.$.navigateBack(1);
|
||||
}, 2000);
|
||||
} else {
|
||||
that.$.confirm(msg);
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
chooseVideoImage() {
|
||||
let that = this;
|
||||
uni.showActionSheet({
|
||||
title: that.__("选择上传类型"),
|
||||
itemList: [that.__("图片")],
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
if (res.tapIndex == 0) {
|
||||
this.chooseImages();
|
||||
} else {
|
||||
this.chooseVideo();
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
UploadImg() {
|
||||
var that = this,
|
||||
max_num = 9;
|
||||
|
||||
if (
|
||||
(that.$.isNull(that.ImgList) || (max_num = 9 - that.ImgList.length),
|
||||
0 != max_num)
|
||||
) {
|
||||
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) {
|
||||
this.VideoOfImagesShow = false;
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
// 三级联动选择
|
||||
showbox() {
|
||||
/*
|
||||
this.setData({
|
||||
isShow: true
|
||||
})
|
||||
*/
|
||||
this.$refs.mpvueCityPicker.show()
|
||||
},
|
||||
}
|
||||
}
|
||||
this.$refs.mpvueCityPicker.show();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '../../styles/_variables.scss';
|
||||
.input{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
line-height: 34rpx;
|
||||
border: 1rpx dashed #666;
|
||||
width: auto;
|
||||
height: 100px;
|
||||
border-radius: 5px;
|
||||
padding: 20rpx;
|
||||
&.input-1{
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
border-style: solid;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
@import "../../styles/_variables.scss";
|
||||
.input {
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
line-height: 34rpx;
|
||||
border: 1rpx dashed #666;
|
||||
width: auto;
|
||||
height: 100px;
|
||||
border-radius: 5px;
|
||||
padding: 20rpx;
|
||||
&.input-1 {
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
border-style: solid;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
}
|
||||
.placeholder{
|
||||
line-height: 40rpx;
|
||||
font-size: 30rpx;
|
||||
color: #CCCCCC;
|
||||
.placeholder {
|
||||
line-height: 40rpx;
|
||||
font-size: 30rpx;
|
||||
color: #cccccc;
|
||||
}
|
||||
.m-cell-hd{
|
||||
width: 120rpx;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
.m-cell-hd {
|
||||
width: 120rpx;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.m-cell{
|
||||
padding: 30rpx;
|
||||
.m-cell {
|
||||
padding: 30rpx;
|
||||
}
|
||||
.m-cell-hd{
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
.m-cell-hd {
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
.bk_box{
|
||||
display: flex;
|
||||
.pic_box_image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.pic_box_img{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.hjs-select-img{
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin: 0 20rpx 20rpx;
|
||||
}
|
||||
.bk_box {
|
||||
display: flex;
|
||||
.pic_box_image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.pic_box_img {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.hjs-select-img {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin: 0 20rpx 20rpx;
|
||||
}
|
||||
}
|
||||
.m-select-box-msk {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 3;
|
||||
}
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.m-select-box {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
background-color: #fff;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.m-select-box {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
background-color: #fff;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.u-select {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
text-align: center;
|
||||
}
|
||||
.u-select {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.u-select .m-cell-bd {
|
||||
width: 100%;
|
||||
line-height: 50px;
|
||||
font-size: 28rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.u-select .m-cell-bd {
|
||||
width: 100%;
|
||||
line-height: 50px;
|
||||
font-size: 28rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.u-select .m-cell-bd label {
|
||||
width: 100%;
|
||||
}
|
||||
.u-select .m-cell-bd label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.m-select-content {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.m-select-content {
|
||||
position: relative;
|
||||
}
|
||||
</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
@ -1,287 +1,293 @@
|
||||
<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">
|
||||
<!-- 头部logo -->
|
||||
<view class="header">
|
||||
<image :src="logo"></image>
|
||||
</view>
|
||||
<!-- 主体 -->
|
||||
<view class="main">
|
||||
<wInput
|
||||
v-model="user_mobile"
|
||||
type="text"
|
||||
isShowIntl
|
||||
@intl="intlChange"
|
||||
:placeholder="__('请输入手机号码')"
|
||||
></wInput>
|
||||
<wInput
|
||||
v-model="mobile_code"
|
||||
type="number"
|
||||
maxlength="4"
|
||||
:placeholder="__('请输入验证码')"
|
||||
isShowCode
|
||||
:codeText="__('获取验证码')"
|
||||
ref="runCode"
|
||||
@setCode="getSmsCode()"
|
||||
></wInput>
|
||||
</view>
|
||||
|
||||
<wInput
|
||||
v-model="mobile_code"
|
||||
type="number"
|
||||
maxlength="4"
|
||||
:placeholder="__('请输入验证码')"
|
||||
isShowCode
|
||||
:codeText="__('获取验证码')"
|
||||
ref="runCode"
|
||||
@setCode="getSmsCode()"
|
||||
></wInput>
|
||||
|
||||
</view>
|
||||
|
||||
<wButton
|
||||
:text="__('登 录')"
|
||||
:rotate="isRotate"
|
||||
@click.native="startReg()" style="margin-top: 30rpx;"
|
||||
></wButton>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<wButton
|
||||
:text="__('登 录')"
|
||||
:rotate="isRotate"
|
||||
@click.native="startReg()"
|
||||
style="margin-top: 30rpx"
|
||||
></wButton>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
import wInput from '../../components/watch-login/watch-input.vue' //input
|
||||
import wButton from '../../components/watch-login/watch-button.vue' //button
|
||||
import imgcode from '@/components/verify-code/imgcode.vue';
|
||||
import wInput from "../../components/watch-login/watch-input.vue"; //input
|
||||
import wButton from "../../components/watch-login/watch-button.vue"; //button
|
||||
import imgcode from "@/components/verify-code/imgcode.vue";
|
||||
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex'
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
|
||||
export default {
|
||||
data: function() {
|
||||
return {
|
||||
logo: "",
|
||||
user_intl: "",
|
||||
user_mobile: "",
|
||||
user_avatar: "https://static.lancerdt.com/demodata/assets/data/avatar.png",
|
||||
user_password: "",
|
||||
mobile_code: "",
|
||||
btntext: "发送",
|
||||
isUserMobile: true,
|
||||
isUserEmail: true,
|
||||
isNickname: true,
|
||||
isPassword: true,
|
||||
isSend: true,
|
||||
sendTime: 120,
|
||||
isCode: true,
|
||||
isImgCode: false,
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
logo: "",
|
||||
user_intl: "",
|
||||
user_mobile: "",
|
||||
user_avatar:
|
||||
"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/demodata/assets/data/avatar.png",
|
||||
user_password: "",
|
||||
mobile_code: "",
|
||||
btntext: "发送",
|
||||
isUserMobile: true,
|
||||
isUserEmail: true,
|
||||
isNickname: true,
|
||||
isPassword: true,
|
||||
isSend: true,
|
||||
sendTime: 120,
|
||||
isCode: true,
|
||||
isImgCode: false,
|
||||
|
||||
client_info: "{}",
|
||||
|
||||
client_info: '{}',
|
||||
|
||||
countdown: 6,
|
||||
cTimer: null,
|
||||
countdown: 6,
|
||||
cTimer: null,
|
||||
|
||||
isRotate: false //是否加载旋转
|
||||
}
|
||||
},
|
||||
computed: mapState(['Config', 'StateCode', 'notice', 'plantformInfo', 'shopInfo', 'userInfo', 'hasLogin']),
|
||||
components: {
|
||||
wInput,
|
||||
wButton,
|
||||
imgcode
|
||||
},
|
||||
onLoad: function(options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title:this.__('手机验证码登录')
|
||||
});
|
||||
isRotate: false, //是否加载旋转
|
||||
};
|
||||
},
|
||||
computed: mapState([
|
||||
"Config",
|
||||
"StateCode",
|
||||
"notice",
|
||||
"plantformInfo",
|
||||
"shopInfo",
|
||||
"userInfo",
|
||||
"hasLogin",
|
||||
]),
|
||||
components: {
|
||||
wInput,
|
||||
wButton,
|
||||
imgcode,
|
||||
},
|
||||
onLoad: function (options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.__("手机验证码登录"),
|
||||
});
|
||||
|
||||
this.setData({
|
||||
options: options
|
||||
})
|
||||
this.setData({
|
||||
options: options,
|
||||
});
|
||||
|
||||
this.btntext = this.__('发送')
|
||||
|
||||
setTimeout(()=>{
|
||||
this.getPlantformInfo((plantformInfo)=> {
|
||||
this.logo = plantformInfo.logo;
|
||||
});
|
||||
}, 200);
|
||||
this.btntext = this.__("发送");
|
||||
|
||||
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;
|
||||
},
|
||||
setTimeout(() => {
|
||||
this.getPlantformInfo((plantformInfo) => {
|
||||
this.logo = plantformInfo.logo;
|
||||
});
|
||||
}, 200);
|
||||
|
||||
/* 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})
|
||||
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 图形验证码 */
|
||||
|
||||
inputuser_email: function (e) {
|
||||
let that = this;
|
||||
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;
|
||||
|
||||
//注册
|
||||
if (this.isRotate) {
|
||||
//判断是否加载中,避免重复点击请求
|
||||
return false;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setData({isImgCode: false})
|
||||
}
|
||||
},
|
||||
/* end 图形验证码 */
|
||||
|
||||
inputuser_email: function (e) {
|
||||
let that = this;
|
||||
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;
|
||||
setTimeout(() => {
|
||||
var prePage = getCurrentPages()[getCurrentPages().length - 2];
|
||||
|
||||
//注册
|
||||
if(this.isRotate){
|
||||
//判断是否加载中,避免重复点击请求
|
||||
return false;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
try {
|
||||
if (prePage.refreshData) {
|
||||
prePage.refreshData(prePage.options);
|
||||
} else if (prePage.onLoad) {
|
||||
prePage.onLoad(prePage.options);
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
});
|
||||
},
|
||||
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})
|
||||
},
|
||||
that.$.navigateBack(2);
|
||||
}, 200);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
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) {
|
||||
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;
|
||||
if (!that.$.tel(this.user_mobile, this.user_intl)) {
|
||||
this.setData({ isUserMobile: false });
|
||||
|
||||
if (!that.$.tel(this.user_mobile, this.user_intl))
|
||||
{
|
||||
this.setData({isUserMobile: false});
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
position: "bottom",
|
||||
title: that.__("手机号不正确"),
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
position: 'bottom',
|
||||
title: that.__('手机号不正确')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
//获取验证码
|
||||
this.$refs.runCode.$emit("runCode"); //触发倒计时(一般用于请求成功验证码后调用)
|
||||
|
||||
//获取验证码
|
||||
this.$refs.runCode.$emit('runCode'); //触发倒计时(一般用于请求成功验证码后调用)
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
if (!this.isImgCode)
|
||||
{
|
||||
uni.showToast({
|
||||
@ -292,67 +298,66 @@
|
||||
}
|
||||
*/
|
||||
|
||||
setTimeout(function(){
|
||||
that.$refs.runCode.$emit('runCode',0); //假装模拟下需要 终止倒计时
|
||||
},60000)
|
||||
setTimeout(function () {
|
||||
that.$refs.runCode.$emit("runCode", 0); //假装模拟下需要 终止倒计时
|
||||
}, 60000);
|
||||
|
||||
if (this.isSend)
|
||||
{
|
||||
this.setData({isSend: false});
|
||||
var t = this.sendTime;
|
||||
var params = {
|
||||
mobile: this.user_intl + this.user_mobile
|
||||
};
|
||||
if (this.isSend) {
|
||||
this.setData({ isSend: false });
|
||||
var t = this.sendTime;
|
||||
var params = {
|
||||
mobile: this.user_intl + this.user_mobile,
|
||||
};
|
||||
|
||||
that.$.request({
|
||||
url: this.Config.URL.account.get_mobile_checkcode,
|
||||
data: params,
|
||||
success: function (data, status, msg, code) {
|
||||
if (status == 200)
|
||||
{
|
||||
var r = setInterval(function () {
|
||||
t > 0 ? that.setData({btntext: t-- + "s"}) : (that.setData({
|
||||
isSend: true,
|
||||
sendTime: 120,
|
||||
btntext: that.__("重新发送")
|
||||
}), clearInterval(r))
|
||||
}, 1e3);
|
||||
}
|
||||
else
|
||||
{
|
||||
that.setData({isSend: true});
|
||||
that.$.alert(msg)
|
||||
that.$.request({
|
||||
url: this.Config.URL.account.get_mobile_checkcode,
|
||||
data: params,
|
||||
success: function (data, status, msg, code) {
|
||||
if (status == 200) {
|
||||
var r = setInterval(function () {
|
||||
t > 0
|
||||
? that.setData({ btntext: t-- + "s" })
|
||||
: (that.setData({
|
||||
isSend: true,
|
||||
sendTime: 120,
|
||||
btntext: that.__("重新发送"),
|
||||
}),
|
||||
clearInterval(r));
|
||||
}, 1e3);
|
||||
} else {
|
||||
that.setData({ isSend: true });
|
||||
that.$.alert(msg);
|
||||
|
||||
that.$refs.runCode.$emit('runCode',0); //假装模拟下需要 终止倒计时
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
that.$refs.runCode.$emit("runCode", 0); //假装模拟下需要 终止倒计时
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
startTimer: function() {
|
||||
var that = this;
|
||||
if (that.cTimer == null) {
|
||||
that.countdown--;
|
||||
that.cTimer = setInterval(function() {
|
||||
that.countdown--;
|
||||
if (that.countdown == 0) {
|
||||
that.clearTimer();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
clearTimer: function() {
|
||||
var that = this;
|
||||
clearInterval(that.cTimer);
|
||||
that.cTimer = null;
|
||||
that.countdown = 6;
|
||||
}
|
||||
}
|
||||
};
|
||||
startTimer: function () {
|
||||
var that = this;
|
||||
if (that.cTimer == null) {
|
||||
that.countdown--;
|
||||
that.cTimer = setInterval(function () {
|
||||
that.countdown--;
|
||||
if (that.countdown == 0) {
|
||||
that.clearTimer();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
clearTimer: function () {
|
||||
var that = this;
|
||||
clearInterval(that.cTimer);
|
||||
that.cTimer = null;
|
||||
that.countdown = 6;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
@import '../../styles/reg.scss';
|
||||
@import "../../styles/reg.scss";
|
||||
</style>
|
||||
|
||||
@ -1,235 +1,392 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="searchBox">
|
||||
<view class="inputBox">
|
||||
<input type="text" :placeholder="defaultKeyword" @input="inputChange" v-model="keyword" @confirm="doSearch(false)"
|
||||
placeholder-class="placeholder-class" confirm-type="search">
|
||||
</view>
|
||||
<view class="searchBtn" @tap="doSearch(false)">搜索</view>
|
||||
</view>
|
||||
<view class="search-keyword" @touchstart="blur">
|
||||
<scroll-view class="keywordListBox" v-show="isShowKeywordList" scroll-y>
|
||||
<view class="keywordEntry" hover-class="keywordEntryTap" v-for="row in keywordList" wx:key="row.keyword">
|
||||
<view class="keywordText" @tap="doSearch(row.keyword)">
|
||||
<rich-text :nodes="row.htmlStr"></rich-text>
|
||||
</view>
|
||||
<view class="keywordImg" @tap="setkeyword(row)">
|
||||
<image src="https://static.lancerdt.com/xcxfile/appicon/search/back.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view class="keywordBox" v-show="!isShowKeywordList" scroll-y>
|
||||
<view class="keyword-block" v-if="oldKeywordList.length>0">
|
||||
<view class="keyword-list-header">
|
||||
<view>历史搜索</view>
|
||||
<view>
|
||||
<image @tap="oldDelete" src="https://static.lancerdt.com/xcxfile/appicon/search/delete.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="keyword">
|
||||
<view v-for="key in oldKeywordList" @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://static.lancerdt.com/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>
|
||||
<view class="content">
|
||||
<view class="searchBox">
|
||||
<view class="inputBox">
|
||||
<input
|
||||
type="text"
|
||||
:placeholder="defaultKeyword"
|
||||
@input="inputChange"
|
||||
v-model="keyword"
|
||||
@confirm="doSearch(false)"
|
||||
placeholder-class="placeholder-class"
|
||||
confirm-type="search"
|
||||
/>
|
||||
</view>
|
||||
<view class="searchBtn" @tap="doSearch(false)">搜索</view>
|
||||
</view>
|
||||
<view class="search-keyword" @touchstart="blur">
|
||||
<scroll-view class="keywordListBox" v-show="isShowKeywordList" scroll-y>
|
||||
<view
|
||||
class="keywordEntry"
|
||||
hover-class="keywordEntryTap"
|
||||
v-for="row in keywordList"
|
||||
wx:key="row.keyword"
|
||||
>
|
||||
<view class="keywordText" @tap="doSearch(row.keyword)">
|
||||
<rich-text :nodes="row.htmlStr"></rich-text>
|
||||
</view>
|
||||
<view class="keywordImg" @tap="setkeyword(row)">
|
||||
<image
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/search/back.png"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view class="keywordBox" v-show="!isShowKeywordList" scroll-y>
|
||||
<view class="keyword-block" v-if="oldKeywordList.length > 0">
|
||||
<view class="keyword-list-header">
|
||||
<view>历史搜索</view>
|
||||
<view>
|
||||
<image
|
||||
@tap="oldDelete"
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/search/delete.png"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="keyword">
|
||||
<view
|
||||
v-for="key in oldKeywordList"
|
||||
@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>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
defaultKeyword: "",
|
||||
keyword: "",
|
||||
oldKeywordList: [],
|
||||
hotKeywordList: [],
|
||||
keywordList: [],
|
||||
forbid: '',
|
||||
isShowKeywordList: false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
uni.setNavigationBarTitle({
|
||||
title:this.__('')
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.loadDefaultKeyword();
|
||||
this.loadOldKeyword();
|
||||
this.loadHotKeyword();
|
||||
|
||||
},
|
||||
blur(){
|
||||
uni.hideKeyboard()
|
||||
},
|
||||
//加载默认搜索关键字
|
||||
loadDefaultKeyword() {
|
||||
//定义默认搜索关键字,可以自己实现ajax请求数据再赋值,用户未输入时,以水印方式显示在输入框,直接不输入内容搜索会搜索默认关键字
|
||||
this.defaultKeyword = "默认关键字";
|
||||
},
|
||||
//加载历史搜索,自动读取本地Storage
|
||||
loadOldKeyword() {
|
||||
uni.getStorage({
|
||||
key: 'OldKeys',
|
||||
success: (res) => {
|
||||
var OldKeys = JSON.parse(res.data);
|
||||
this.oldKeywordList = OldKeys;
|
||||
}
|
||||
});
|
||||
},
|
||||
//加载热门搜索
|
||||
loadHotKeyword() {
|
||||
//定义热门搜索关键字,可以自己实现ajax请求数据再赋值
|
||||
this.hotKeywordList = ['键盘', '鼠标', '显示器', '电脑主机', '蓝牙音箱', '笔记本电脑', '鼠标垫', 'USB', 'USB3.0'];
|
||||
},
|
||||
//监听输入
|
||||
inputChange(event) {
|
||||
var keyword = event.detail.value;
|
||||
if (!keyword) {
|
||||
this.keywordList = [];
|
||||
this.isShowKeywordList = false;
|
||||
return;
|
||||
}
|
||||
this.isShowKeywordList = true;
|
||||
//以下示例截取淘宝的关键字,请替换成你的接口
|
||||
uni.request({
|
||||
url: 'https://suggest.taobao.com/sug?code=utf-8&q=' + keyword, //仅为示例
|
||||
success: (res) => {
|
||||
this.keywordList = this.drawCorrelativeKeyword(res.data.result, keyword);
|
||||
}
|
||||
});
|
||||
},
|
||||
//高亮关键字
|
||||
drawCorrelativeKeyword(keywords, keyword) {
|
||||
var len = keywords.length,
|
||||
keywordArr = [];
|
||||
for (var i = 0; i < len; i++) {
|
||||
var row = keywords[i];
|
||||
//定义高亮#9f9f9f
|
||||
var html = row[0].replace(keyword, "<span style='color: #9f9f9f;'>" + keyword + "</span>");
|
||||
html = '<div>' + html + '</div>';
|
||||
var tmpObj = {
|
||||
keyword: row[0],
|
||||
htmlStr: html
|
||||
};
|
||||
keywordArr.push(tmpObj)
|
||||
}
|
||||
return keywordArr;
|
||||
},
|
||||
//顶置关键字
|
||||
setkeyword(data) {
|
||||
this.keyword = data.keyword;
|
||||
},
|
||||
//清除历史搜索
|
||||
oldDelete() {
|
||||
let that = this;
|
||||
that.$.showModal({
|
||||
content: '确定清除历史搜索记录?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
//console.log('用户点击确定');
|
||||
this.oldKeywordList = [];
|
||||
uni.removeStorage({
|
||||
key: 'OldKeys'
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
//console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//热门搜索开关
|
||||
hotToggle() {
|
||||
this.forbid = this.forbid ? '' : '_forbid';
|
||||
},
|
||||
//执行搜索
|
||||
doSearch(key) {
|
||||
key = key ? key : this.keyword ? this.keyword : this.defaultKeyword;
|
||||
this.keyword = key;
|
||||
this.saveKeyword(key); //保存为历史
|
||||
uni.showToast({
|
||||
title: key,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
//以下是示例跳转淘宝搜索,可自己实现搜索逻辑
|
||||
//#ifdef APP-PLUS
|
||||
plus.runtime.openURL(encodeURI('taobao://s.taobao.com/search?q=' + key));
|
||||
//#endif
|
||||
//#ifdef H5
|
||||
window.location.href = 'taobao://s.taobao.com/search?q=' + key
|
||||
//#endif
|
||||
},
|
||||
//保存关键字到历史记录
|
||||
saveKeyword(keyword) {
|
||||
uni.getStorage({
|
||||
key: 'OldKeys',
|
||||
success: (res) => {
|
||||
//console.log(res.data);
|
||||
var OldKeys = JSON.parse(res.data);
|
||||
var findIndex = OldKeys.indexOf(keyword);
|
||||
if (findIndex == -1) {
|
||||
OldKeys.unshift(keyword);
|
||||
} else {
|
||||
OldKeys.splice(findIndex, 1);
|
||||
OldKeys.unshift(keyword);
|
||||
}
|
||||
//最多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; //更新历史搜索
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
defaultKeyword: "",
|
||||
keyword: "",
|
||||
oldKeywordList: [],
|
||||
hotKeywordList: [],
|
||||
keywordList: [],
|
||||
forbid: "",
|
||||
isShowKeywordList: false,
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.__(""),
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.loadDefaultKeyword();
|
||||
this.loadOldKeyword();
|
||||
this.loadHotKeyword();
|
||||
},
|
||||
blur() {
|
||||
uni.hideKeyboard();
|
||||
},
|
||||
//加载默认搜索关键字
|
||||
loadDefaultKeyword() {
|
||||
//定义默认搜索关键字,可以自己实现ajax请求数据再赋值,用户未输入时,以水印方式显示在输入框,直接不输入内容搜索会搜索默认关键字
|
||||
this.defaultKeyword = "默认关键字";
|
||||
},
|
||||
//加载历史搜索,自动读取本地Storage
|
||||
loadOldKeyword() {
|
||||
uni.getStorage({
|
||||
key: "OldKeys",
|
||||
success: (res) => {
|
||||
var OldKeys = JSON.parse(res.data);
|
||||
this.oldKeywordList = OldKeys;
|
||||
},
|
||||
});
|
||||
},
|
||||
//加载热门搜索
|
||||
loadHotKeyword() {
|
||||
//定义热门搜索关键字,可以自己实现ajax请求数据再赋值
|
||||
this.hotKeywordList = [
|
||||
"键盘",
|
||||
"鼠标",
|
||||
"显示器",
|
||||
"电脑主机",
|
||||
"蓝牙音箱",
|
||||
"笔记本电脑",
|
||||
"鼠标垫",
|
||||
"USB",
|
||||
"USB3.0",
|
||||
];
|
||||
},
|
||||
//监听输入
|
||||
inputChange(event) {
|
||||
var keyword = event.detail.value;
|
||||
if (!keyword) {
|
||||
this.keywordList = [];
|
||||
this.isShowKeywordList = false;
|
||||
return;
|
||||
}
|
||||
this.isShowKeywordList = true;
|
||||
//以下示例截取淘宝的关键字,请替换成你的接口
|
||||
uni.request({
|
||||
url: "https://suggest.taobao.com/sug?code=utf-8&q=" + keyword, //仅为示例
|
||||
success: (res) => {
|
||||
this.keywordList = this.drawCorrelativeKeyword(
|
||||
res.data.result,
|
||||
keyword
|
||||
);
|
||||
},
|
||||
});
|
||||
},
|
||||
//高亮关键字
|
||||
drawCorrelativeKeyword(keywords, keyword) {
|
||||
var len = keywords.length,
|
||||
keywordArr = [];
|
||||
for (var i = 0; i < len; i++) {
|
||||
var row = keywords[i];
|
||||
//定义高亮#9f9f9f
|
||||
var html = row[0].replace(
|
||||
keyword,
|
||||
"<span style='color: #9f9f9f;'>" + keyword + "</span>"
|
||||
);
|
||||
html = "<div>" + html + "</div>";
|
||||
var tmpObj = {
|
||||
keyword: row[0],
|
||||
htmlStr: html,
|
||||
};
|
||||
keywordArr.push(tmpObj);
|
||||
}
|
||||
return keywordArr;
|
||||
},
|
||||
//顶置关键字
|
||||
setkeyword(data) {
|
||||
this.keyword = data.keyword;
|
||||
},
|
||||
//清除历史搜索
|
||||
oldDelete() {
|
||||
let that = this;
|
||||
that.$.showModal({
|
||||
content: "确定清除历史搜索记录?",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
//console.log('用户点击确定');
|
||||
this.oldKeywordList = [];
|
||||
uni.removeStorage({
|
||||
key: "OldKeys",
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
//console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
//热门搜索开关
|
||||
hotToggle() {
|
||||
this.forbid = this.forbid ? "" : "_forbid";
|
||||
},
|
||||
//执行搜索
|
||||
doSearch(key) {
|
||||
key = key ? key : this.keyword ? this.keyword : this.defaultKeyword;
|
||||
this.keyword = key;
|
||||
this.saveKeyword(key); //保存为历史
|
||||
uni.showToast({
|
||||
title: key,
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
});
|
||||
//以下是示例跳转淘宝搜索,可自己实现搜索逻辑
|
||||
//#ifdef APP-PLUS
|
||||
plus.runtime.openURL(encodeURI("taobao://s.taobao.com/search?q=" + key));
|
||||
//#endif
|
||||
//#ifdef H5
|
||||
window.location.href = "taobao://s.taobao.com/search?q=" + key;
|
||||
//#endif
|
||||
},
|
||||
//保存关键字到历史记录
|
||||
saveKeyword(keyword) {
|
||||
uni.getStorage({
|
||||
key: "OldKeys",
|
||||
success: (res) => {
|
||||
//console.log(res.data);
|
||||
var OldKeys = JSON.parse(res.data);
|
||||
var findIndex = OldKeys.indexOf(keyword);
|
||||
if (findIndex == -1) {
|
||||
OldKeys.unshift(keyword);
|
||||
} else {
|
||||
OldKeys.splice(findIndex, 1);
|
||||
OldKeys.unshift(keyword);
|
||||
}
|
||||
//最多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>
|
||||
<style>
|
||||
.searchBox {width:95%;background-color:rgb(242,242,242);padding:7.5px 2.5%;display:flex;justify-content:space-between;}
|
||||
.searchBox .inputBox {width:85%;flex-shrink:1;display:flex;justify-content:center;align-items:center;}
|
||||
.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;}
|
||||
.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;}
|
||||
.searchBox {
|
||||
width: 95%;
|
||||
background-color: rgb(242, 242, 242);
|
||||
padding: 7.5px 2.5%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.searchBox .inputBox {
|
||||
width: 85%;
|
||||
flex-shrink: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.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>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
var HOST="http://127.0.0.1/project/xyx/";
|
||||
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;
|
||||
|
||||
|
||||
@ -189,7 +189,7 @@ function play_mp3(url){
|
||||
}
|
||||
function play_sfx(sfx_name,delay=0){
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@ -1,134 +1,238 @@
|
||||
<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 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;">
|
||||
<image class="arrow-jump" src="https://static.lancerdt.com/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://static.lancerdt.com/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>
|
||||
<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, 0.3);
|
||||
"
|
||||
>
|
||||
<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;
|
||||
"
|
||||
>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
import utils from "@/plant/plant/common/utils.js"
|
||||
import server from "@/plant/plant/common/server.js"
|
||||
import api from "@/plant/plant/common/api.js"
|
||||
|
||||
export default {
|
||||
props:{
|
||||
show:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
guides:{
|
||||
type:Array,
|
||||
default(){
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
guide_index:0,
|
||||
delay_done:true
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
touch_end:function(e){
|
||||
//click
|
||||
var touch=e.changedTouches[0];
|
||||
var guide_item=this.guides[this.guide_index];
|
||||
var arrow=guide_item.arrow;
|
||||
if(arrow){
|
||||
var distance=utils.get2PointDistance(touch.clientX,touch.clientY,arrow.x+23,arrow.y+65);
|
||||
if(arrow.id&&distance<=44){
|
||||
this.$emit("arrow_clicked",guide_item,arrow.id);
|
||||
this.next_guide();
|
||||
}
|
||||
}
|
||||
},
|
||||
next_clicked:function(e){
|
||||
if(e&&e.detail&&e.detail.formId)utils.report_formid(e.detail.formId);
|
||||
this.next_guide();
|
||||
},
|
||||
next_guide:function(){
|
||||
var that=this;
|
||||
if(this.guide_index<this.guides.length-1){
|
||||
this.guide_index+=1;
|
||||
var item=this.guides[this.guide_index];
|
||||
if(item.delay){
|
||||
that.delay_done=false;
|
||||
setTimeout(function(){
|
||||
that.delay_done=true;
|
||||
},item.delay);
|
||||
}else{
|
||||
that.delay_done=true;
|
||||
}
|
||||
}else{
|
||||
this.$emit("finished");
|
||||
}
|
||||
},
|
||||
get_user_info:function(e){
|
||||
var that=this;
|
||||
var user_info=e.detail.userInfo;
|
||||
if(user_info){
|
||||
user_info.openid=global.user_info.openid;
|
||||
server.post_api(api.POST_USER_INFO,user_info,{
|
||||
success:function(res){
|
||||
if(res.err==0){
|
||||
if(res.result.user_info){
|
||||
global.user_info=res.result.user_info;
|
||||
that.next_guide();
|
||||
that.$emit("login_success");
|
||||
}else{
|
||||
utils.show_alert("未知错误");
|
||||
}
|
||||
}
|
||||
},
|
||||
fail:function(res){
|
||||
utils.show_alert(res.msg);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
that.next_guide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
import utils from "@/plant/plant/common/utils.js";
|
||||
import server from "@/plant/plant/common/server.js";
|
||||
import api from "@/plant/plant/common/api.js";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
guides: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
guide_index: 0,
|
||||
delay_done: true,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
touch_end: function (e) {
|
||||
//click
|
||||
var touch = e.changedTouches[0];
|
||||
var guide_item = this.guides[this.guide_index];
|
||||
var arrow = guide_item.arrow;
|
||||
if (arrow) {
|
||||
var distance = utils.get2PointDistance(
|
||||
touch.clientX,
|
||||
touch.clientY,
|
||||
arrow.x + 23,
|
||||
arrow.y + 65
|
||||
);
|
||||
if (arrow.id && distance <= 44) {
|
||||
this.$emit("arrow_clicked", guide_item, arrow.id);
|
||||
this.next_guide();
|
||||
}
|
||||
}
|
||||
},
|
||||
next_clicked: function (e) {
|
||||
if (e && e.detail && e.detail.formId)
|
||||
utils.report_formid(e.detail.formId);
|
||||
this.next_guide();
|
||||
},
|
||||
next_guide: function () {
|
||||
var that = this;
|
||||
if (this.guide_index < this.guides.length - 1) {
|
||||
this.guide_index += 1;
|
||||
var item = this.guides[this.guide_index];
|
||||
if (item.delay) {
|
||||
that.delay_done = false;
|
||||
setTimeout(function () {
|
||||
that.delay_done = true;
|
||||
}, item.delay);
|
||||
} else {
|
||||
that.delay_done = true;
|
||||
}
|
||||
} else {
|
||||
this.$emit("finished");
|
||||
}
|
||||
},
|
||||
get_user_info: function (e) {
|
||||
var that = this;
|
||||
var user_info = e.detail.userInfo;
|
||||
if (user_info) {
|
||||
user_info.openid = global.user_info.openid;
|
||||
server.post_api(api.POST_USER_INFO, user_info, {
|
||||
success: function (res) {
|
||||
if (res.err == 0) {
|
||||
if (res.result.user_info) {
|
||||
global.user_info = res.result.user_info;
|
||||
that.next_guide();
|
||||
that.$emit("login_success");
|
||||
} else {
|
||||
utils.show_alert("未知错误");
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: function (res) {
|
||||
utils.show_alert(res.msg);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
that.next_guide();
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@keyframes ani-jump{
|
||||
0%{
|
||||
transform: translateY(0px);
|
||||
}
|
||||
50%{
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
100%{
|
||||
transform: translateY(0px);
|
||||
}
|
||||
}
|
||||
.arrow-jump
|
||||
{
|
||||
animation: ani-jump 2s infinite;
|
||||
}
|
||||
|
||||
button{
|
||||
background: transparent;
|
||||
}
|
||||
@keyframes ani-jump {
|
||||
0% {
|
||||
transform: translateY(0px);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(0px);
|
||||
}
|
||||
}
|
||||
.arrow-jump {
|
||||
animation: ani-jump 2s infinite;
|
||||
}
|
||||
|
||||
button {
|
||||
background: transparent;
|
||||
}
|
||||
</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
@ -673,7 +673,7 @@
|
||||
<view class="m-cell-bd">
|
||||
<view class="m-order-title" >
|
||||
<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 style="float:left;margin-left:20rpx">
|
||||
<view class="m-ber-n">{{user.user_account}}</view>
|
||||
|
||||
@ -51,7 +51,7 @@ var emojiData = {
|
||||
{ url: '18.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: '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: '[擦汗]' },
|
||||
@ -100,7 +100,7 @@ var emojiData = {
|
||||
{ url: '58.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: '[咖啡]' },
|
||||
@ -124,7 +124,7 @@ var emojiData = {
|
||||
{ url: '78.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: '[弱]' },
|
||||
@ -148,7 +148,7 @@ var emojiData = {
|
||||
{ url: '98.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: '[激动]' },
|
||||
@ -157,7 +157,7 @@ var emojiData = {
|
||||
{ url: '103.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",
|
||||
emojiSort:2,
|
||||
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: [
|
||||
[
|
||||
{ url: 'q_000.png', alt: '[测试1]' },
|
||||
@ -190,7 +190,7 @@ var emojiData = {
|
||||
{ url: 'q_018.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: '[]' },
|
||||
@ -214,7 +214,7 @@ var emojiData = {
|
||||
{ url: 'q_038.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: '[]' },
|
||||
@ -238,7 +238,7 @@ var emojiData = {
|
||||
{ url: 'q_058.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: '[]' },
|
||||
@ -262,7 +262,7 @@ var emojiData = {
|
||||
{ url: 'q_078.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: '[]' },
|
||||
@ -285,7 +285,7 @@ var emojiData = {
|
||||
{ url: 'q_097.png', alt: '[]' },
|
||||
{ url: 'q_098.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: '[]' },
|
||||
@ -308,7 +308,7 @@ var emojiData = {
|
||||
{ url: 'q_118.png', alt: '[]' },
|
||||
{ url: 'q_119.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: '[]' },
|
||||
@ -331,7 +331,7 @@ var emojiData = {
|
||||
{ url: 'q_138.png', alt: '[]' },
|
||||
{ url: 'q_139.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: '[]' },
|
||||
@ -354,7 +354,7 @@ var emojiData = {
|
||||
{ url: 'q_158.png', alt: '[]' },
|
||||
{ url: 'q_159.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: '[]' },
|
||||
@ -367,7 +367,7 @@ var emojiData = {
|
||||
{ url: 'q_168.png', alt: '[]' },
|
||||
{ url: 'q_169.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",
|
||||
emojiSort:2,
|
||||
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: [
|
||||
[
|
||||
{ url: 'emotion_001.png', alt: '[微笑]' },
|
||||
@ -399,7 +399,7 @@ var emojiData = {
|
||||
{ url: 'emotion_018.png', alt: '[抱拳]' },
|
||||
{ url: 'emotion_019.png', alt: '[握手]' },
|
||||
{ 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: '[]' },
|
||||
@ -422,7 +422,7 @@ var emojiData = {
|
||||
{ url: 'emotion_038.png', alt: '[]' },
|
||||
{ url: 'emotion_039.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: '[]' },
|
||||
@ -445,7 +445,7 @@ var emojiData = {
|
||||
{ url: 'emotion_058.png', alt: '[]' },
|
||||
{ url: 'emotion_059.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: '[]' },
|
||||
@ -468,7 +468,7 @@ var emojiData = {
|
||||
{ url: 'emotion_078.png', alt: '[]' },
|
||||
{ url: 'emotion_079.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: '[]' },
|
||||
@ -491,7 +491,7 @@ var emojiData = {
|
||||
{ url: 'emotion_098.png', alt: '[]' },
|
||||
{ url: 'emotion_099.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: '[]' },
|
||||
@ -514,7 +514,7 @@ var emojiData = {
|
||||
{ url: 'emotion_118.png', alt: '[]' },
|
||||
{ url: 'emotion_119.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: '[]' },
|
||||
@ -537,7 +537,7 @@ var emojiData = {
|
||||
{ url: 'emotion_138.png', alt: '[]' },
|
||||
{ url: 'emotion_139.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",
|
||||
emojiSort:3,
|
||||
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: [
|
||||
[
|
||||
{ url: '0.png', alt: '[抖音1]' },
|
||||
@ -570,7 +570,7 @@ var emojiData = {
|
||||
{ url: '18.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: '[]' },
|
||||
@ -594,7 +594,7 @@ var emojiData = {
|
||||
{ url: '38.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: '[]' },
|
||||
@ -618,7 +618,7 @@ var emojiData = {
|
||||
{ url: '58.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: '[]' },
|
||||
@ -641,7 +641,7 @@ var emojiData = {
|
||||
{ url: '77.png', alt: '[]' },
|
||||
{ url: '78.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: '[]' },
|
||||
@ -665,7 +665,7 @@ var emojiData = {
|
||||
{ url: '98.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: '[]' },
|
||||
@ -689,7 +689,7 @@ var emojiData = {
|
||||
{ url: '118.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: '[]' },
|
||||
@ -713,12 +713,12 @@ var emojiData = {
|
||||
{ url: '138.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: '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",
|
||||
emojiSort:4,
|
||||
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: [
|
||||
[
|
||||
{ url: '0.png', alt: '[ajmd1]' },
|
||||
@ -794,7 +794,7 @@ var emojiData = {
|
||||
emojiName:"gongfuhuList",
|
||||
emojiSort:5,
|
||||
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: [
|
||||
[
|
||||
{ url: '0.gif', alt: '[]' },
|
||||
@ -841,7 +841,7 @@ var emojiData = {
|
||||
emojiName:"xxyList",
|
||||
emojiSort:6,
|
||||
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: [
|
||||
[
|
||||
{ url: '0.png', alt: '[]' },
|
||||
@ -899,7 +899,7 @@ var emojiData = {
|
||||
emojiName:"feineneList",
|
||||
emojiSort:7,
|
||||
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: [
|
||||
[
|
||||
{ url: '0.gif', alt: '[]' },
|
||||
|
||||
Binary file not shown.
BIN
static/images/login-bg.png
Normal file
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
BIN
static/images/qishou.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
194
store/index.js
194
store/index.js
@ -12,6 +12,7 @@ import $cookies from '../helpers/vue-cookies';
|
||||
import Config from '../config/config'
|
||||
import StateCode from '../config/statecode'
|
||||
import Lang from '../config/lang'
|
||||
import { $loginPopup } from '../helpers/loginPopup.js'
|
||||
|
||||
|
||||
import notice from '../helpers/notice'
|
||||
@ -31,7 +32,7 @@ const STATE_KEY = 'STATE_KEY';
|
||||
var ret = uni.getStorageSync(USERS_KEY);
|
||||
let default_user_info = {
|
||||
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
|
||||
};
|
||||
|
||||
@ -55,7 +56,7 @@ const store = new Vuex.Store({
|
||||
cartList: [],
|
||||
cartMap: {},
|
||||
newMsgNum: 0,
|
||||
|
||||
showLoginPopup:false,
|
||||
plantformInfo: {
|
||||
return_state_list: [
|
||||
{
|
||||
@ -203,12 +204,13 @@ const store = new Vuex.Store({
|
||||
Lang: Lang
|
||||
},
|
||||
mutations: {
|
||||
setShowLoginPopup(state,showLoginPopup){
|
||||
state.showLoginPopup = Object.assign(state.showLoginPopup,showLoginPopup);
|
||||
},
|
||||
login(state, userInfo) {
|
||||
|
||||
if ('user_avatar' in userInfo)
|
||||
{
|
||||
if (userInfo.user_avatar)
|
||||
{
|
||||
if ('user_avatar' in userInfo){
|
||||
if (userInfo.user_avatar){
|
||||
if(state.Config.HTTPS && userInfo.user_avatar.indexOf("https") == 0)
|
||||
{
|
||||
}
|
||||
@ -233,44 +235,43 @@ const store = new Vuex.Store({
|
||||
}
|
||||
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.userName = userInfo.user_nickname || Lang.__('未注册用户');
|
||||
state.hasLogin = true;
|
||||
|
||||
|
||||
//保存基本信息
|
||||
uni.setStorageSync(USERS_KEY, JSON.stringify(userInfo));
|
||||
//保存基本信息
|
||||
uni.setStorageSync(USERS_KEY, JSON.stringify(userInfo));
|
||||
|
||||
//强制授权读取小程序或者公众号手机号
|
||||
if ('as' in userInfo)
|
||||
{
|
||||
if (userInfo.as)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Config.FORCE_BIND_MOBILE)
|
||||
{
|
||||
setTimeout(()=>{
|
||||
$.confirm(Lang.__('绑定手机号码'),
|
||||
function(data) {
|
||||
if (data.confirm) {
|
||||
//绑定手机操作
|
||||
$.gopage("/member/member/bindphone");
|
||||
}
|
||||
},true);
|
||||
}, 2000)
|
||||
}
|
||||
}
|
||||
//强制授权读取小程序或者公众号手机号
|
||||
if ('as' in userInfo){
|
||||
if (userInfo.as)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Config.FORCE_BIND_MOBILE)
|
||||
{
|
||||
// setTimeout(()=>{
|
||||
// $.confirm(Lang.__('绑定手机号码'),
|
||||
// function(data) {
|
||||
// if (data.confirm) {
|
||||
// //绑定手机操作
|
||||
// $.gopage("/member/member/bindphone");
|
||||
// }
|
||||
// },true);
|
||||
// }, 2000)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
logout(state, payload) {
|
||||
if ($.source_data.source_type == StateCode.SOURCE_TYPE_APP)
|
||||
@ -306,65 +307,69 @@ const store = new Vuex.Store({
|
||||
state.chatTolist={};///当前聊天对话的里面是聊天的对象和
|
||||
state.currentChatPuid='';
|
||||
|
||||
try {
|
||||
uni.closeSocket();
|
||||
} catch (s) {}
|
||||
|
||||
if (payload)
|
||||
{
|
||||
$.toLogin(state.forcedLoginState);
|
||||
}
|
||||
try {
|
||||
uni.closeSocket();
|
||||
} catch (s) {}
|
||||
|
||||
if (payload)
|
||||
{
|
||||
$.toLogin(state.forcedLoginState);
|
||||
}
|
||||
},
|
||||
forceUserInfo(state, callback) {
|
||||
var that = this;
|
||||
var that = this;
|
||||
//记录来源页面
|
||||
var pages = getCurrentPages();
|
||||
var page = pages[pages.length - 1];
|
||||
|
||||
//记录来源页面
|
||||
var pages = getCurrentPages();
|
||||
var page = pages[pages.length - 1];
|
||||
//page.route != 'pagesub/login/login' && page.route != 'pages/index/member'
|
||||
|
||||
//page.route != 'pagesub/login/login' && page.route != 'pages/index/member'
|
||||
|
||||
if (page.route.indexOf("/login/") != -1) {
|
||||
uni.setStorageSync('pre_route', page.route);
|
||||
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();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (page.route.indexOf("/login/") != -1) {
|
||||
uni.setStorageSync('pre_route', page.route);
|
||||
if (page.options) {
|
||||
uni.setStorageSync('pre_options', page.options);
|
||||
}
|
||||
else
|
||||
{
|
||||
//判断当前用户是否存在,不存在读取?
|
||||
callback && callback($.isEmptyObject(state.userInfo) ? null : state.userInfo);
|
||||
}
|
||||
|
||||
if (!state.hasLogin) {
|
||||
|
||||
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) {
|
||||
state.userInfo = Object.assign(state.userInfo, payload);
|
||||
@ -427,7 +432,7 @@ const store = new Vuex.Store({
|
||||
"RuleEnabled": false,
|
||||
"VendorFeatureSet": '',
|
||||
"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,
|
||||
"analytics": data.analytics,
|
||||
@ -968,9 +973,16 @@ const store = new Vuex.Store({
|
||||
method: "GET",
|
||||
data: param,
|
||||
loading: false,
|
||||
success: function (data) {
|
||||
success: function (data,status,msg) {
|
||||
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) {
|
||||
let total = 0;
|
||||
@ -1014,13 +1026,14 @@ const store = new Vuex.Store({
|
||||
|
||||
async addCart({ state, commit }, provider) {
|
||||
let that = this
|
||||
|
||||
|
||||
await $.request({
|
||||
url: Config.URL.cart.add,
|
||||
method:'POST',
|
||||
data: provider.params,
|
||||
loading: false,
|
||||
success: (data, status, msg, code) => {
|
||||
console.log(status)
|
||||
if (status == 200) {
|
||||
commit("setCartNum", {
|
||||
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)
|
||||
} else {
|
||||
$.alert(msg);
|
||||
// $.alert(msg);
|
||||
$.alert("点击太快了")
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
|
||||
@ -63,7 +63,7 @@ $brand-danger: #d9534f !default;
|
||||
//## Settings for some of the most global styles.
|
||||
|
||||
//
|
||||
$body-bg: #f5f5f5 !default;
|
||||
$body-bg: #f4f4f4 !default;
|
||||
// Global text color on `<body>`.
|
||||
$text-color: $gray-dark !default;
|
||||
|
||||
|
||||
@ -11,6 +11,26 @@
|
||||
-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 {
|
||||
content: "\e62a";
|
||||
}
|
||||
@ -42,4 +62,3 @@
|
||||
.icon-dingwei:before {
|
||||
content: "\e65f";
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user