'优化'
This commit is contained in:
parent
dffebe5f02
commit
b2f1b11bb6
26
common/config/config.js
Normal file
26
common/config/config.js
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* WanlShop 多用户电商系统核心配置项
|
||||
* @author 深圳前海万联科技有限公司 <wanlshop@i36k.com>
|
||||
* < 本程序,非FastAdmin购买授权,未经版权所有权人书面许可,不能自行用于商业用途!>
|
||||
*
|
||||
* @config socketUrl 即时通讯服务器地址,微信必须使用wss:// 如:wss://chat.example.com
|
||||
* @config cdnUrl OSS服务地址 如:https://oss.example.com 或 https://www.example.com
|
||||
* @config appUrl API服务器地址 如:https://api.example.com 或 https://www.example.com/api
|
||||
* @config amapKey 高德网页Key
|
||||
* @config debug 全局调试
|
||||
*
|
||||
* @ 相关文档 https://doc.fastadmin.net/wanlshop/265.html
|
||||
*/
|
||||
export default {
|
||||
// socketurl: 'wss://stationery.njrenzhou.cn', //如果是ws:// 地址为ws://你服务器IP:7272 如 ws://123.4.56.78:7272,使用wss 后面不需要添加 :7272 端口
|
||||
socketurl: 'wss://chat.mxyoupin.com', //如果是ws:// 地址为ws://你服务器IP:7272 如 ws://123.4.56.78:7272,使用wss 后面不需要添加 :7272 端口
|
||||
// cdnurl: 'https://app.mxyoupin.com',
|
||||
cdnurl: 'https://mxyoupin.oss-cn-shanghai.aliyuncs.com',
|
||||
appurl: 'https://app.mxyoupin.com/api', //如二级域名:https://api.example.com 或不使用二级域名 https://www.example.com/api
|
||||
// appurl:"https://stationery.njrenzhou.cn/api",
|
||||
amapkey: '',
|
||||
appid: '', // 公众号appid
|
||||
versionName: '1.1.11',
|
||||
versionCode: '1111',
|
||||
debug: false
|
||||
}
|
||||
165
common/libs/jssdk.js
Normal file
165
common/libs/jssdk.js
Normal file
@ -0,0 +1,165 @@
|
||||
// #ifdef H5
|
||||
const wechat = require("@/common/libs/jssdk/wechat");
|
||||
import config from '@/common/config/config';
|
||||
// #endif
|
||||
export default {
|
||||
//判断是否在微信中
|
||||
isWechat: function() {
|
||||
var ua = window.navigator.userAgent.toLowerCase();
|
||||
if (ua.match(/micromessenger/i) == 'micromessenger') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 初始化
|
||||
initJssdk: function(callback) {
|
||||
// 记录进入app时的url
|
||||
if (typeof window.entryUrl === 'undefined' || window.entryUrl === '') {
|
||||
window.entryUrl = location.href.split('#')[0]
|
||||
}
|
||||
let isiOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
||||
// 进行签名的时候 Android 不用使用之前的链接, ios 需要
|
||||
let signLink = isiOS ? window.entryUrl : location.href.split('#')[0];
|
||||
var uri = encodeURIComponent(signLink); //获取当前url然后传递给后台获取授权和签名信息
|
||||
//服务端进行签名
|
||||
uni.request({
|
||||
url: '/wanlshop/wechat/config',
|
||||
data: {
|
||||
url: uri
|
||||
},
|
||||
success: res => {
|
||||
wechat.config(res.data);
|
||||
wechat.ready(function() {
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
//在需要定位页面调用
|
||||
getlocation: function(callback) {
|
||||
if (!this.isWechat()) {
|
||||
//console.log('不是微信客户端')
|
||||
return;
|
||||
}
|
||||
this.initJssdk(function(res) {
|
||||
wechat.ready(function() {
|
||||
wechat.getLocation({
|
||||
type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
|
||||
success: function(res) {
|
||||
// console.log(res);
|
||||
callback(res)
|
||||
},
|
||||
fail: function(res) {
|
||||
// console.log(res)
|
||||
},
|
||||
// complete:function(res){
|
||||
// console.log(res)
|
||||
// }
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
openlocation: function(data, callback) { //打开位置
|
||||
if (!this.isWechat()) {
|
||||
//console.log('不是微信客户端')
|
||||
return;
|
||||
}
|
||||
this.initJssdk(function(res) {
|
||||
wechat.ready(function() {
|
||||
wechat.openLocation({ //根据传入的坐标打开地图
|
||||
latitude: data.latitude,
|
||||
longitude: data.longitude
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
chooseImage: function(callback) { //选择图片
|
||||
if (!this.isWechat()) {
|
||||
//console.log('不是微信客户端')
|
||||
return;
|
||||
}
|
||||
//console.log(data);
|
||||
this.initJssdk(function(res) {
|
||||
wechat.ready(function() {
|
||||
wechat.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album'],
|
||||
success: function(res) {
|
||||
callback(res)
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
},
|
||||
//微信支付
|
||||
wxpay: function(params = {}) {
|
||||
if (!this.isWechat()) {
|
||||
console.log('不是微信客户端')
|
||||
return;
|
||||
}
|
||||
this.initJssdk(function() {
|
||||
wechat.chooseWXPay({
|
||||
timestamp: params.data.timeStamp, // 支付签名时间戳,注意微信wechat中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
|
||||
nonceStr: params.data.nonceStr, // 支付签名随机串,不长于 32 位
|
||||
package: params.data.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
|
||||
signType: params.data.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
|
||||
paySign: params.data.paySign, // 支付签名
|
||||
success: function(res) {
|
||||
// console.log(res);
|
||||
// console.log('微信JSAPI返回支付成功')
|
||||
params.success(res)
|
||||
},
|
||||
cancel: function(res) {
|
||||
params.fail(res)
|
||||
// console.log('微信JSAPI返回支付失败')
|
||||
},
|
||||
// complete:function(res){
|
||||
// console.log(res)
|
||||
// }
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
//在需要自定义分享的页面中调用
|
||||
share: function(data) {
|
||||
if (!this.isWechat()) {
|
||||
//console.log('不是微信客户端')
|
||||
return;
|
||||
}
|
||||
//每次都需要重新初始化配置,才可以进行分享
|
||||
this.initJssdk(function() {
|
||||
var shareData = {
|
||||
title: data && data.title ? data.title : '我发现了一个很好的线上购物商城',
|
||||
desc: data && data.desc ? data.desc : '品质好而且很省钱如果自己在上面购买,每年可以省下1%~40%的钱',
|
||||
link: data && data.link ? data.link : window.location.href,
|
||||
imgUrl: data && data.imgUrl ? data.imgUrl : `${config.cdnurl}/assets/img/logo.png`,
|
||||
success: function(res) {
|
||||
//用户点击分享后的回调,这里可以进行统计,例如分享送金币之类的
|
||||
},
|
||||
cancel: function(res) {}
|
||||
};
|
||||
//分享给朋友接口
|
||||
wechat.onMenuShareAppMessage(shareData);
|
||||
//分享到朋友圈接口
|
||||
wechat.onMenuShareTimeline(shareData);
|
||||
});
|
||||
},
|
||||
// 选择通讯地址
|
||||
chooseAddress: function(callback) {
|
||||
if (!this.isWechat()) {
|
||||
//console.log('不是微信客户端')
|
||||
return;
|
||||
}
|
||||
this.initJssdk(function() {
|
||||
wechat.openAddress({
|
||||
success: function(res) {
|
||||
callback(res)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
1
common/libs/jssdk/wechat.js
Normal file
1
common/libs/jssdk/wechat.js
Normal file
File diff suppressed because one or more lines are too long
35
common/libs/mixin/mpShare.js
Normal file
35
common/libs/mixin/mpShare.js
Normal file
@ -0,0 +1,35 @@
|
||||
// #ifdef H5
|
||||
import jssdk from '@/common/libs/jssdk';
|
||||
// #endif
|
||||
module.exports = {
|
||||
onLoad() {
|
||||
// 设置默认的转发参数
|
||||
this.mpShare = {
|
||||
title: '', // 默认为小程序名称
|
||||
path: '', // 默认为当前页面路径
|
||||
imageUrl: '' // 默认为当前页面的截图
|
||||
}
|
||||
// #ifdef MP-WEIXIN
|
||||
wx.showShareMenu({
|
||||
withShareTicket: true,
|
||||
menus: ['shareAppMessage', 'shareTimeline']
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP-QQ
|
||||
qq.showShareMenu({
|
||||
showShareItems: ['qq', 'qzone', 'wechatFriends', 'wechatMoment']
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
jssdk.share();
|
||||
// #endif
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return this.mpShare
|
||||
},
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareTimeline() {
|
||||
return this.mpShare
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
3
common/qqmap-wx-jssdk.min.js
vendored
Normal file
3
common/qqmap-wx-jssdk.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1121
components/city.js
Normal file
1121
components/city.js
Normal file
File diff suppressed because it is too large
Load Diff
481
components/linzq-citySelect/linzq-citySelect.vue
Normal file
481
components/linzq-citySelect/linzq-citySelect.vue
Normal file
@ -0,0 +1,481 @@
|
||||
<template>
|
||||
<div class="wrapper" :style="'top:'+statusBarHeight+'px'">
|
||||
<div class="header">
|
||||
<view class="back_div">
|
||||
<image class="back_img" @click="back_city()" src="../../static/back_img.png" mode=""></image>
|
||||
</view>
|
||||
<input class="input" @input="onInput" placeholder="中文/拼音/首字母" v-model="searchValue" />
|
||||
</div>
|
||||
<scroll-view class="calendar-list" scroll-y="true" :scroll-into-view="scrollIntoId">
|
||||
<view v-if="disdingwei" id="hot">
|
||||
<!-- 定位模块 -->
|
||||
<view class="dingwei">
|
||||
<view class="dingwei_Tips">
|
||||
当前定位
|
||||
</view>
|
||||
<view class="dingwei_city">
|
||||
<view class="dingwei_city_one" @click="back_city({'cityName':position})">
|
||||
{{position}}
|
||||
</view>
|
||||
<view class="dingweis_div" @click="getWarpweft">
|
||||
<image class="dingweis" src="../../static/dingweis.png" mode=""></image>
|
||||
<text>{{po_tips}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 最近模块 -->
|
||||
<view class="dingwei" v-if="Visit.length>=0">
|
||||
<view class="dingwei_Tips">
|
||||
最近访问
|
||||
</view>
|
||||
<view class="dingwei_city dingwei_city_zuijin">
|
||||
<view class="dingwei_city_one toright" v-for="(item,index) in Visit" v-if="index<2" @click="back_city(item)">
|
||||
{{item.cityName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 城市列表 -->
|
||||
<view v-if="searchValue == ''" v-for="(item, index) in list" :id="getId(index)" :key="index">
|
||||
<view class="letter-header">{{ getId(index) }}</view>
|
||||
<view class="city-div" v-for="(city, i) in item" :key="i" @click="back_city(city)">
|
||||
<text class="city">{{ city.cityName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 搜索结果 -->
|
||||
<view class="city-div" v-for="(item, index) in searchList" @click="back_city(item)">
|
||||
<text class="city">{{ item.cityName }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 右侧字母 -->
|
||||
<view class="letters" v-if="searchValue == ''">
|
||||
<view class="letters-item" @click="scrollTo('hot')">最近</view>
|
||||
<view class="letters-item" v-for="item in letter" :key="item" @click="scrollTo(item)">{{ item }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 选中之后字母 -->
|
||||
<view class="mask" v-if="showMask">
|
||||
<view class="mask-r">{{selectLetter}}</view>
|
||||
</view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Citys from '../city.js';
|
||||
var QQMapWX = require('@/common/qqmap-wx-jssdk.min.js')
|
||||
export default {
|
||||
components: {},
|
||||
props: {},
|
||||
|
||||
computed: {
|
||||
hotCity() {
|
||||
return Citys.hotCity;
|
||||
},
|
||||
|
||||
citys() {
|
||||
return Citys.cities;
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: this.statusBarHeight,
|
||||
ImgUrl: this.ImgUrl,
|
||||
letter: [],
|
||||
selectLetter: '',
|
||||
searchValue: '',
|
||||
scrollIntoId: '',
|
||||
list: [],
|
||||
tId: null,
|
||||
searchList: [],
|
||||
showMask: false,
|
||||
disdingwei: true,
|
||||
Visit: [], //最近访问
|
||||
position: '北京',
|
||||
longitude: '', //经度
|
||||
latitude: '', //纬度
|
||||
seconds: 3,
|
||||
po_tips: '重新定位',
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
//获取存储的最近访问
|
||||
var that = this
|
||||
uni.getStorage({
|
||||
key: 'Visit_key',
|
||||
success: function(res) {
|
||||
that.Visit = res.data
|
||||
}
|
||||
});
|
||||
//获取定位 经度纬度
|
||||
that.getWarpweft(function(res){
|
||||
that.back_city({'cityName':res})
|
||||
})
|
||||
//获取city.js 的程序字母
|
||||
var mu = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'w', 'x', 'y',
|
||||
'z'
|
||||
];
|
||||
var tmp = [];
|
||||
for (var i = 0; i < mu.length; i++) {
|
||||
var item = mu[i];
|
||||
for (var j = 0; j < this.citys.length; j++) {
|
||||
var py = this.citys[j].py;
|
||||
if (py.substring(0, 1) == item) {
|
||||
if (tmp.indexOf(item) == -1) {
|
||||
this.list[i] = [this.citys[j]];
|
||||
tmp.push(item);
|
||||
this.letter.push(item.toUpperCase());
|
||||
} else {
|
||||
this.list[i].push(this.citys[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getId(index) {
|
||||
return this.letter[index];
|
||||
},
|
||||
|
||||
scrollTo(letter) {
|
||||
this.showMask = true
|
||||
this.selectLetter = letter == 'hot' ? '最' : letter
|
||||
setTimeout(() => {
|
||||
this.showMask = false
|
||||
}, 300);
|
||||
this.scrollIntoId = letter;
|
||||
},
|
||||
|
||||
|
||||
query(source, text) {
|
||||
let res = [];
|
||||
var self = this;
|
||||
res = source.filter(item => {
|
||||
const arr = [];
|
||||
let isHave = false;
|
||||
Object.keys(item).forEach(prop => {
|
||||
const itemStr = item[prop];
|
||||
self.isString(itemStr) &&
|
||||
itemStr.split(',').forEach(val => {
|
||||
arr.push(val);
|
||||
});
|
||||
});
|
||||
arr.some(val => {
|
||||
isHave = new RegExp('^' + text).test(val);
|
||||
return isHave;
|
||||
});
|
||||
return isHave;
|
||||
});
|
||||
console.log(JSON.stringify(res));
|
||||
return res;
|
||||
},
|
||||
|
||||
isString(obj) {
|
||||
return typeof obj === 'string';
|
||||
},
|
||||
|
||||
onInput(e) {
|
||||
const value = e.target.value;
|
||||
console.log(value);
|
||||
if (value !== '' && this.citys && this.citys.length > 0) {
|
||||
const queryData = this.query(this.citys, String(value).trim());
|
||||
this.searchList = queryData;
|
||||
this.disdingwei = false
|
||||
} else {
|
||||
this.searchList = [];
|
||||
this.disdingwei = true
|
||||
}
|
||||
},
|
||||
|
||||
back_city(item) {
|
||||
if (item) {
|
||||
this.$emit('back_city', item);
|
||||
//unshift 把数据插入到首位,与push相反
|
||||
this.Visit.unshift(item)
|
||||
this.searchValue = "";
|
||||
this.disdingwei = true
|
||||
var arr = this.Visit
|
||||
//数组去重
|
||||
function distinct(arr) {
|
||||
let newArr = []
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (newArr.indexOf(arr[i]) < 0) {
|
||||
newArr.push(arr[i])
|
||||
}
|
||||
}
|
||||
return newArr
|
||||
}
|
||||
this.Visit = distinct(arr)
|
||||
console.log(this.Visit, "---最近访问")
|
||||
uni.setStorage({
|
||||
key: 'Visit_key',
|
||||
data: this.Visit
|
||||
});
|
||||
} else {
|
||||
this.$emit('back_city', '');
|
||||
}
|
||||
|
||||
},
|
||||
getWarpweft(callBack) {
|
||||
console.log('dddddddd')
|
||||
var that = this
|
||||
that.po_tips = '定位中...'
|
||||
let countdown = setInterval(() => {
|
||||
console.log('dddddddd---')
|
||||
that.seconds--;
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
geocode: true,
|
||||
success: function(res) {
|
||||
console.log('当前位置的经度:' + res.longitude,res);
|
||||
console.log('当前位置的纬度:' + res.latitude);
|
||||
that.longitude = res.longitude
|
||||
that.latitude = res.latitude
|
||||
let location = {
|
||||
longitude: res.longitude,
|
||||
latitude: res.latitude
|
||||
}
|
||||
console.log(location,'fffffff')
|
||||
const qqmapsdk = new QQMapWX({
|
||||
key: 'GHNBZ-LUALS-RGKO2-6YTHN-PRVDV-D4BDT'
|
||||
})
|
||||
qqmapsdk.reverseGeocoder({
|
||||
location,
|
||||
success: function(res){
|
||||
console.log(res,res.result.address,'9999')
|
||||
that.position = res.result.address_component.city
|
||||
if(callBack){
|
||||
callBack(that.position)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
console.log('dddddddd---',res)
|
||||
}
|
||||
});
|
||||
if (that.seconds <= 0) {
|
||||
that.seconds = 3
|
||||
that.po_tips = '重新定位'
|
||||
clearInterval(countdown);
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.wrapper {
|
||||
position: fixed;
|
||||
z-index: 999999;
|
||||
background: #ffffff;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
top: var(--status-bar-height);
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.mask {
|
||||
position: absolute;
|
||||
bottom: 0upx;
|
||||
top: 83upx;
|
||||
left: 0upx;
|
||||
right: 0upx;
|
||||
width: 750upx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.mask-r {
|
||||
height: 120upx;
|
||||
width: 120upx;
|
||||
border-radius: 60upx;
|
||||
display: flex;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 40upx;
|
||||
color: #FFFFFF
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 85upx;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.back_div {
|
||||
width: 65upx;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.back_img {
|
||||
width: 35upx;
|
||||
height: 35upx;
|
||||
}
|
||||
|
||||
.input {
|
||||
font-size: 28upx;
|
||||
width: 620upx;
|
||||
height: 55upx;
|
||||
border-radius: 40upx;
|
||||
background-color: #F5F5F5;
|
||||
padding-left: 20upx;
|
||||
padding-right: 20upx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 30upx;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.show {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
transition: left 0.3s ease;
|
||||
}
|
||||
|
||||
.hide {
|
||||
left: 100%;
|
||||
width: 100%;
|
||||
transition: left 0.3s ease;
|
||||
}
|
||||
|
||||
|
||||
.title {
|
||||
font-size: 30upx;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.calendar-list {
|
||||
position: absolute;
|
||||
top: 83upx;
|
||||
bottom: 0upx;
|
||||
width: 100%;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.letters {
|
||||
position: absolute;
|
||||
right: 30upx;
|
||||
bottom: 0px;
|
||||
width: 50upx;
|
||||
top: 260upx;
|
||||
color: #2f9bfe;
|
||||
text-align: center;
|
||||
font-size: 24upx;
|
||||
}
|
||||
|
||||
.letters-item {
|
||||
margin-bottom: 5upx;
|
||||
}
|
||||
|
||||
.letter-header {
|
||||
height: 45upx;
|
||||
font-size: 22upx;
|
||||
color: #333333;
|
||||
padding-left: 24upx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #ebedef;
|
||||
|
||||
}
|
||||
|
||||
.city-div {
|
||||
width: 660upx;
|
||||
height: 85upx;
|
||||
margin-left: 24upx;
|
||||
border-bottom-width: 0.5upx;
|
||||
border-bottom-color: #ebedef;
|
||||
border-bottom-style: solid;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 35upx;
|
||||
}
|
||||
|
||||
.city {
|
||||
font-size: 28upx;
|
||||
color: #000000;
|
||||
padding-left: 30upx;
|
||||
}
|
||||
|
||||
.dingwei {
|
||||
width: 100%;
|
||||
padding-top: 25upx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 26upx;
|
||||
}
|
||||
|
||||
.dingwei_Tips {
|
||||
margin-left: 24upx;
|
||||
margin-bottom: 24upx;
|
||||
font-size: 24upx;
|
||||
color: #A5A5A5;
|
||||
}
|
||||
|
||||
.dingwei_city {
|
||||
width: 100%;
|
||||
height: 60upx;
|
||||
padding-left: 55upx;
|
||||
padding-right: 70upx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.dingwei_city_one {
|
||||
width: 185upx;
|
||||
height: 60upx;
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10upx;
|
||||
font-size: 32upx;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dingweis_div {
|
||||
display: flex;
|
||||
align-content: flex-end;
|
||||
align-items: center;
|
||||
font-size: 24upx;
|
||||
color: #FD5745;
|
||||
}
|
||||
|
||||
.dingweis {
|
||||
width: 32upx;
|
||||
height: 32upx;
|
||||
}
|
||||
|
||||
.dingwei_city_zuijin {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.toright {
|
||||
margin-right: 25upx;
|
||||
}
|
||||
</style>
|
||||
@ -143,3 +143,5 @@ export const checkPayPassword = (data, callback) => post('api/recover/person/che
|
||||
export const verifyPayPassword = (data, callback) => post('api/recover/person/verifyPayPassword', data, callback);
|
||||
export const priceList = (data, callback) => post('api/recover/personmoneylog/index', data, callback);
|
||||
export const uploadImg = (data, callback) => upload('api/feedback/upload', data, callback);
|
||||
export const allarealist = (data, callback) => post('api/recover/area/allarealist', data, callback);
|
||||
export const qrcode = (data, callback) => post('api/promotion/qrcode', data, callback);
|
||||
|
||||
7
main.js
7
main.js
@ -1,15 +1,18 @@
|
||||
import App from './App.vue'
|
||||
|
||||
import * as Api from './config/api.js'
|
||||
|
||||
import mpShare from './common/libs/mixin/mpShare.js'
|
||||
import store from './store';
|
||||
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue'
|
||||
import uView from 'uview-ui'
|
||||
Vue.config.productionTip = false
|
||||
Vue.prototype.$api = Api;
|
||||
Vue.prototype.path = "https://admin.dbcdq.cn"; //挂载在 Vue 实例上
|
||||
Vue.prototype.path = "https://admin.dbcdq.cn"; //挂载在 Vue 实例上
|
||||
Vue.prototype.$store = store; //挂载在 Vue 实例上
|
||||
Vue.use(uView)
|
||||
Vue.mixin(mpShare)
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
...App
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos" : [ "chooseLocation" ]
|
||||
"requiredPrivateInfos" : [ "chooseLocation","getLocation" ]
|
||||
},
|
||||
"permission" : {
|
||||
"scope.userLocation" : {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"style":
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle":"custom"
|
||||
}
|
||||
}
|
||||
@ -224,6 +224,13 @@
|
||||
"navigationBarTitleText": "支付订单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},{
|
||||
"path" : "pages/poster/sharePoster",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "推广二维码",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
||||
@ -13,8 +13,8 @@
|
||||
<view class="menuLine" v-show="menuNum == 2"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cityBox flex-center">
|
||||
南京市
|
||||
<view class="cityBox flex-center" @click="showCityClick">
|
||||
{{cityText||'选择城市'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -50,7 +50,7 @@
|
||||
</view>
|
||||
<view class="blockBox1"></view>
|
||||
|
||||
<view class="orderBox" v-for="item in qiangdanArr" @click="goDetail(item.id)">
|
||||
<view class="orderBox" style="height: 1700rpx;" v-for="item in qiangdanArr" @click="goDetail(item.id)">
|
||||
<view class="flex-between">
|
||||
<view class="flex-center">
|
||||
<image :src="path+'/assets/img/icon/yu.png'" style="width: 79rpx;height: 71rpx;margin-top: -25rpx;margin-left: -33rpx;margin-right: 21rpx;"></image>
|
||||
@ -94,6 +94,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-center noMore" v-show="page1==lastPage1">没有更多了</view>
|
||||
</view>
|
||||
<view class="menuBox2" v-show="menuNum == 2">
|
||||
<view class="navbar">
|
||||
@ -109,7 +110,7 @@
|
||||
</view>
|
||||
<view style="height: 195rpx;"></view>
|
||||
<!-- {{recycleList}} -->
|
||||
<view class="orderBox" v-show="item.status==tabCur || tabCur=='0'" v-for="item in recycleList" @click="goDetail(item.id)">
|
||||
<view class="orderBox" style="height: 1700rpx;" v-show="item.status==tabCur || tabCur=='0'" v-for="item in recycleList" @click="goDetail(item.id)">
|
||||
<view class="flex-between">
|
||||
<view class="flex-center">
|
||||
<view class="timeLabel">36分钟内</view>
|
||||
@ -178,8 +179,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-center noMore" v-show="page2==lastPage2">没有更多了</view>
|
||||
</view>
|
||||
|
||||
<view style="height: 100rpx;"></view>
|
||||
<appointTime ref="timeRef" @checkTime="checkTime"></appointTime>
|
||||
<!-- <view class='pinlei' >
|
||||
<view class='pinlei-title' >请选择回收品类</view>
|
||||
@ -329,6 +331,17 @@
|
||||
</u-popup>
|
||||
<cancleOrder @cancleReason="cancleReason" :cancleShow="cancleShow" @closeCancle="cancleShow=false"></cancleOrder>
|
||||
<custom-tab-bar :current-page="0" />
|
||||
|
||||
<!-- <u-popup :show="showCity"> -->
|
||||
<view v-show="showCity" style="width:750upx;height: 100%;position: fixed;left: 0;top:0;z-index: 999;">
|
||||
<citySelect @back_city="back_city"></citySelect>
|
||||
</view>
|
||||
<!-- </u-popup> -->
|
||||
<!-- <popup-layer ref="popupRef" :direction="'right'">
|
||||
<view style="width:750upx;height: 100%;">
|
||||
<citySelect @back_city="back_city"></citySelect>
|
||||
</view>
|
||||
</popup-layer> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -336,11 +349,12 @@
|
||||
import CustomTabBar from '@/components/CustomTabBar.vue';
|
||||
import cancleOrder from './cancleOrder.vue';
|
||||
import appointTime from '@/components/appointTime.vue';
|
||||
import citySelect from '@/components/linzq-citySelect/linzq-citySelect.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
jscode:'',
|
||||
limit:3,
|
||||
// limit:3,
|
||||
typelist: [],
|
||||
banner:[],
|
||||
notice:'',
|
||||
@ -405,13 +419,21 @@
|
||||
notesText: '',
|
||||
moreShow: false,
|
||||
orderId: '',
|
||||
statusToast: ''
|
||||
statusToast: '',
|
||||
showCity: false,
|
||||
cityText: '',
|
||||
page1: 1,
|
||||
page2: 1,
|
||||
lastPage1: '',
|
||||
lastPage2: '',
|
||||
limit: 1
|
||||
}
|
||||
},
|
||||
components: {
|
||||
CustomTabBar,
|
||||
cancleOrder,
|
||||
appointTime
|
||||
appointTime,
|
||||
citySelect
|
||||
},
|
||||
computed: {
|
||||
countTime: function(){
|
||||
@ -459,9 +481,46 @@
|
||||
imageUrl: ''
|
||||
}
|
||||
},
|
||||
onPullDownRefresh(){
|
||||
if(this.menuNum==1){
|
||||
console.log('抢单')
|
||||
this.page1 = 1;
|
||||
this.qiangdanArr = []
|
||||
this.qiangdanlist()
|
||||
}else{
|
||||
console.log('回收')
|
||||
this.page2 = 1
|
||||
this.recycleList = []
|
||||
this.recycleOrderList()
|
||||
}
|
||||
},
|
||||
onReachBottom (){
|
||||
console.log('触底')
|
||||
if(this.menuNum==1){
|
||||
console.log('抢单')
|
||||
if(this.page1<this.lastPage1){
|
||||
this.page1++
|
||||
this.qiangdanlist()
|
||||
}
|
||||
}else{
|
||||
console.log('回收')
|
||||
if(this.page2<this.lastPage2){
|
||||
this.page2++
|
||||
this.recycleOrderList()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
back_city(res){
|
||||
if(res){
|
||||
this.cityText = res.cityName;
|
||||
}
|
||||
this.showCity = false
|
||||
},
|
||||
showCityClick() {
|
||||
// this.$refs.popupRef.show();
|
||||
this.showCity = true
|
||||
},
|
||||
cancleReason(obj){
|
||||
console.log('ddd')
|
||||
let data = {
|
||||
@ -596,30 +655,35 @@
|
||||
this.tabCur = id
|
||||
// this.recycleList = []
|
||||
},
|
||||
qiangdanlist(){
|
||||
console.log('fffffffff')
|
||||
let data = {
|
||||
type_id: this.tabCur,
|
||||
page: this.page1,
|
||||
limit: this.limit
|
||||
}
|
||||
this.$api.qiangdanlist(data,res=>{
|
||||
if(res.code == '1'){
|
||||
this.qiangdanArr = this.qiangdanArr.concat(res.data.list.data)
|
||||
// this.recycleList = res.data.type
|
||||
this.lastPage1 = res.data.list.last_page
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
})
|
||||
},
|
||||
recycleOrderList(){
|
||||
console.log('fffffffff')
|
||||
let data = {
|
||||
status: '',
|
||||
page: 1
|
||||
page: this.page2,
|
||||
limit: this.limit
|
||||
}
|
||||
this.$api.recycleOrderList(data,res=>{
|
||||
if(res.code == '1'){
|
||||
console.log(res.data.list,res.data.list.data,'dddd')
|
||||
this.recycleList = res.data.list.data
|
||||
}
|
||||
})
|
||||
},
|
||||
qiangdanlist(){
|
||||
console.log('fffffffff')
|
||||
let data = {
|
||||
type_id: this.tabCur,
|
||||
page: 1,
|
||||
limit: 10
|
||||
}
|
||||
this.$api.qiangdanlist(data,res=>{
|
||||
if(res.code == '1'){
|
||||
this.qiangdanArr = res.data.list.data
|
||||
// this.recycleList = res.data.type
|
||||
this.lastPage2 = res.data.list.last_page
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -1419,5 +1483,12 @@
|
||||
.blockBox1{
|
||||
height: 165rpx;
|
||||
}
|
||||
.noMore{
|
||||
margin-top: 50rpx;
|
||||
// font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="topStatus"></view>
|
||||
<view class="headBox flex-center">
|
||||
<view class="headBox flex-center" @click="getAddress">
|
||||
口袋快收
|
||||
</view>
|
||||
<image :src="path+'/assets/img/icon/bg2.png'" class="bgImg" mode="widthFix"></image>
|
||||
@ -9,7 +9,8 @@
|
||||
<image :src="logoImage" ></image>
|
||||
</view> -->
|
||||
<view class="loginContent">
|
||||
<view class="loginTitle">账号密码登录 </view>
|
||||
<view class="loginTitle">账号密码登录
|
||||
{{addressText}} </view>
|
||||
<view class="inputBox">
|
||||
<image :src="path+'/assets/img/icon/user.png'" class="inputIcon"></image>
|
||||
<input v-model="mobile" type="text" class="inputEle" placeholder="请输入账号" />
|
||||
@ -29,7 +30,6 @@
|
||||
</view>
|
||||
<button class="loginBtn flex-center" @click="loginEn">登录</button>
|
||||
</view>
|
||||
|
||||
<image :src="path+'/assets/img/icon/logo1.png'" class="loginImg" mode="widthFix"></image>
|
||||
<!-- <view class="login-b">
|
||||
<button class="auth-btn refuse" @click="handleRefuse">拒绝</button>
|
||||
@ -42,6 +42,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var QQMapWX = require('@/common/qqmap-wx-jssdk.min.js')
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -51,7 +52,8 @@ export default {
|
||||
logoImage: '/static/img/t2.png',
|
||||
open_id: '',
|
||||
path: this.path,
|
||||
isRead: false
|
||||
isRead: false,
|
||||
addressText:''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -60,6 +62,48 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getAddress(){
|
||||
let _this = this;
|
||||
console.log('dddddd333d')
|
||||
// uni.getLocation({
|
||||
// type:'gcj02',
|
||||
// // geocode: true,
|
||||
// success(res) {
|
||||
// console.log(res)
|
||||
// },
|
||||
// fail() {
|
||||
|
||||
// }
|
||||
// })
|
||||
uni.getLocation({
|
||||
// type: 'gcj02',
|
||||
type: 'wgs84',
|
||||
geocode: true,
|
||||
success: function (res) {
|
||||
console.log('当前位置的经度:' + JSON.stringify(res));
|
||||
console.log('当前位置的经度:' + res.longitude);
|
||||
console.log('当前位置的纬度:' + res.latitude);
|
||||
let location = {
|
||||
longitude: res.longitude,
|
||||
latitude: res.latitude
|
||||
}
|
||||
console.log(location,'fffffff')
|
||||
const qqmapsdk = new QQMapWX({
|
||||
key: 'GHNBZ-LUALS-RGKO2-6YTHN-PRVDV-D4BDT'
|
||||
})
|
||||
qqmapsdk.reverseGeocoder({
|
||||
location,
|
||||
success: function(res){
|
||||
console.log(res,res.result.address,'9999')
|
||||
_this.addressText = res.result.address
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('当前位置的纬度:222' , res);
|
||||
}
|
||||
});
|
||||
},
|
||||
loginEn(){
|
||||
if(!this.isRead){
|
||||
uni.showToast({ title: "请同意用户服务协议和隐私政策" , icon: 'none'})
|
||||
|
||||
@ -76,12 +76,16 @@
|
||||
<view class="moduleBox" style="padding-bottom: 60rpx;">
|
||||
<view class="text4">代理区域</view>
|
||||
<view class="inputBox inputTwoBox2">
|
||||
<input class="input1" type="text" placeholder="请选择省份" />
|
||||
<!-- <input class="input1" type="text" placeholder="请选择省份" /> -->
|
||||
<view class="input1" @click="showProvince = true">{{provinceName||'请选择省份'}}</view>
|
||||
<text class="centerIcon">-</text>
|
||||
<input class="input2" type="text" placeholder="请选择城市" />
|
||||
<view @click="showCity = true" class="input2">{{cityName||'请选择城市'}}</view>
|
||||
<!-- <input class="input2" type="text" placeholder="请选择城市" /> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-picker :show="showProvince" :columns="[provinceList]" keyName="label" @confirm="confirmProvince"></u-picker>
|
||||
<u-picker :show="showCity" :columns="[cityList]" keyName="label" @confirm="confirmCity"></u-picker>
|
||||
<view class="tipBox">
|
||||
Tips:我们会在3个工作日内审核并与您联系,请注意接听电话。
|
||||
</view>
|
||||
@ -112,19 +116,43 @@
|
||||
id_card_start_date: '',
|
||||
id_card_end_date: '',
|
||||
id_card_address: '',
|
||||
mobile: ''
|
||||
mobile: '',
|
||||
showProvince: false,
|
||||
showCity: false,
|
||||
provinceList: [],
|
||||
cityList: [],
|
||||
provinceName: '',
|
||||
cityName: ''
|
||||
}
|
||||
},
|
||||
components:{
|
||||
imgUpload
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
this.allarealist()
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
confirmProvince(val){
|
||||
console.log(val,val.value[0])
|
||||
this.cityList = val.value[0].children[0].children
|
||||
this.provinceName = val.value[0].label
|
||||
this.showProvince = false
|
||||
},
|
||||
confirmCity(val){
|
||||
this.showCity = false
|
||||
this.cityName = val.value[0].label
|
||||
},
|
||||
allarealist(){
|
||||
this.$api.allarealist({},res=>{
|
||||
if(res.code == '1'){
|
||||
console.log(res.data,'ggggggg')
|
||||
this.provinceList = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
apply(){
|
||||
let data = {
|
||||
realname: this.realname,
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
<!-- <view class="headTitle">个人中心</view> -->
|
||||
<view class="flexView">
|
||||
<view class="statusBox"></view>
|
||||
<view style="height: 88rpx;flex-shrink: 0;"></view>
|
||||
<view class="headTitle">个人中心</view>
|
||||
<view class="head-read" >
|
||||
<view class="flex" v-if="headflag" @click="openface()">
|
||||
@ -32,9 +33,10 @@
|
||||
<view class="text2">账户余额</view>
|
||||
<view class="flex-between">
|
||||
<view class="flex-center">
|
||||
<text class="priceText">{{user_money}}</text>
|
||||
<image :src="path+'/assets/img/icon/eyeOpen.png'" class="img2"></image>
|
||||
<image :src="path+'/assets/img/icon/eyeCloese.png'" class="img3"></image>
|
||||
<text v-if="eyeOpen" class="priceText">{{user_money}}</text>
|
||||
<text v-else class="priceText">{{hidePrice(user_money)}}</text>
|
||||
<image @click="clickEye" v-if="eyeOpen" :src="path+'/assets/img/icon/eyeOpen.png'" class="img2"></image>
|
||||
<image @click="clickEye" v-else :src="path+'/assets/img/icon/eyeCloese.png'" class="img3"></image>
|
||||
</view>
|
||||
<view class="priceBtn flex-center">充值</view>
|
||||
</view>
|
||||
@ -137,7 +139,7 @@
|
||||
<image src="/static/img/right.png" style="width: 50rpx;height:50rpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fuwu mainwidth2 qrcodeBox">
|
||||
<view class="fuwu mainwidth2 qrcodeBox" @click="linkPage('/pages/poster/sharePoster')">
|
||||
<!-- <view class="padding15 fsz32" @click="shareShow = true">
|
||||
推广二维码
|
||||
</view> -->
|
||||
@ -255,7 +257,8 @@
|
||||
@change="shareChange"
|
||||
@closePoster="closePoster"
|
||||
/>
|
||||
</view> -->
|
||||
</view> -->
|
||||
<view style="height: 220rpx; flex-shrink: 0;"></view>
|
||||
</view>
|
||||
<custom-tab-bar :current-page="1" />
|
||||
</view>
|
||||
@ -281,7 +284,8 @@
|
||||
scrollAnimation: 300,
|
||||
shareShow: false,
|
||||
path: this.path,
|
||||
passwordShow: false
|
||||
passwordShow: false,
|
||||
eyeOpen: false
|
||||
}
|
||||
},
|
||||
components:{
|
||||
@ -312,6 +316,16 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
clickEye(){
|
||||
this.eyeOpen = !this.eyeOpen
|
||||
},
|
||||
hidePrice(val){
|
||||
let star = ''
|
||||
for(let i=1;i < val.length;i++){
|
||||
star += '*'
|
||||
}
|
||||
return star
|
||||
},
|
||||
linkOrder(val){
|
||||
uni.navigateTo({
|
||||
url: '/pages/order/order?type='+val
|
||||
@ -579,6 +593,7 @@ button::after{
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-direction: column;
|
||||
overflow: auto;
|
||||
|
||||
.head-read {
|
||||
// background-color: #00a73b;
|
||||
@ -780,12 +795,17 @@ button::after{
|
||||
text-align: center;
|
||||
// margin-bottom: 25rpx;
|
||||
// padding: 29rpx 0 25rpx;
|
||||
height: 88rpx;
|
||||
height: calc(88rpx + var(--status-bar-height));
|
||||
line-height: 88rpx;
|
||||
background: #FEF9EB;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 99;
|
||||
padding-top: var(--status-bar-height);
|
||||
}
|
||||
.statusBox{
|
||||
height: var(--status-bar-height);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.walletWrap{
|
||||
width: 680rpx;
|
||||
@ -793,6 +813,7 @@ button::after{
|
||||
border-radius: 20rpx;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
flex-shrink: 0;
|
||||
.walletBg{
|
||||
width: 680rpx;
|
||||
height: 240rpx;
|
||||
|
||||
@ -305,7 +305,7 @@ export default {
|
||||
let data = {
|
||||
id: _this.order_id
|
||||
}
|
||||
_this.$api.orderdetail(data, function(res) {
|
||||
_this.$api.personorderdetail(data, function(res) {
|
||||
if (res.code ==1 ) {
|
||||
let data = res.data.info
|
||||
_this.orderInfo = data;
|
||||
|
||||
490
pages/poster/sharePoster - 副本.vue
Normal file
490
pages/poster/sharePoster - 副本.vue
Normal file
@ -0,0 +1,490 @@
|
||||
<template>
|
||||
<view style="height:100vh;">
|
||||
<view class="wanl-share" style="padding-top: 0px;background:#F5F5FA">
|
||||
<view class="wanl-poster__poster" v-if="posterShow">
|
||||
<wanlPoster
|
||||
ref="wanlPoster"
|
||||
:img="image"
|
||||
:title="shareTitle"
|
||||
:price="price"
|
||||
:marketPrice="marketPrice"
|
||||
:page="page"
|
||||
:scene="scene"
|
||||
@success="posterSuccess"
|
||||
@close="closeShare"
|
||||
/>
|
||||
</view>
|
||||
<view class="wanl-share__share" style="position: fixed;bottom: 0;width: 100%;background: unset;z-index: 999;">
|
||||
<!-- <view class="head">
|
||||
<view class="content">
|
||||
<view class="text-lg">分享到 </view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <scroll-view class="scroll-x solid-bottom" scroll-x="true" show-scrollbar="false"
|
||||
:scroll-left="scrollAnimation" scroll-with-animation> -->
|
||||
<view class="scroll-x solid-bottom">
|
||||
<!-- #ifdef MP -->
|
||||
<!-- <view class="scroll-item">
|
||||
<button open-type="share">
|
||||
<view class="icons bg-green"><text class="wlIcon-31fenxiang"></text></view>
|
||||
<view class="project text-sm"><text>分享</text></view>
|
||||
</button>
|
||||
</view> -->
|
||||
<!-- #endif -->
|
||||
<view class="scroll-item" v-for="(value, index) in providerList" :key="index" v-if="value"
|
||||
@tap="share(value)">
|
||||
<!-- <view class="icons" :class="value.background"><text :class="value.icon"></text></view> -->
|
||||
<view class="project text-sm">
|
||||
<text>{{ value.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- </scroll-view> -->
|
||||
<view class="footer" @tap="closeShare"><text>取消</text></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* WanlShare 分享
|
||||
* @description 分享组件 深圳前海万联科技有限公司 https://www.wanlshop.com(除万联官方内嵌系统,未经授权严禁使用)
|
||||
* @著作权:WanlShop 登记号:2020SR0255711 版本:V1.0.0
|
||||
* @property {Number} scrollAnimation 滚动位置
|
||||
* @property {Number} shareType 分享类型 0.图文 1.纯文字 2.纯图片 5.小程序
|
||||
* @property {String} shareTitle 分享标题
|
||||
* @property {String} shareText 分享详情
|
||||
* @property {String} image 分享图片 如果是图文分享,且是ios平台,20kb
|
||||
* @property {String} page 分享链接
|
||||
* @event {Function} change 关闭弹窗
|
||||
*/
|
||||
// import {mapState} from 'vuex';
|
||||
import wanlPoster from './wanl-poster.vue';
|
||||
export default {
|
||||
name: 'WanlShare',
|
||||
props: {
|
||||
scrollAnimation: {
|
||||
type: Number,
|
||||
default: 300
|
||||
},
|
||||
shareType: {
|
||||
type: Number,
|
||||
default: 5
|
||||
},
|
||||
modalName: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
shareTitle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
shareText: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
image: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
price: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
marketPrice: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
page: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
scene: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
isReport: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
providerList: [],
|
||||
providerListBak: [],
|
||||
posterShow: true,
|
||||
posterFilePath: ''
|
||||
};
|
||||
},
|
||||
components: {
|
||||
wanlPoster
|
||||
},
|
||||
computed: {
|
||||
// ...mapState(['common'])
|
||||
},
|
||||
created() {
|
||||
let user = uni.getStorageSync('wanlshop:user');
|
||||
if(user.isLogin){
|
||||
this.scene.u = user.id;
|
||||
}
|
||||
uni.getProvider({
|
||||
service: 'share',
|
||||
success: e => {
|
||||
let data = [];
|
||||
// #ifdef APP-PLUS
|
||||
for (let i = 0; i < e.provider.length; i++) {
|
||||
switch (e.provider[i]) {
|
||||
case 'weixin':
|
||||
// data.push({
|
||||
// name: '微信好友',
|
||||
// id: 'weixin',
|
||||
// icon: 'wlIcon-WeChat',
|
||||
// background: 'bg-green',
|
||||
// sort: 0
|
||||
// });
|
||||
break;
|
||||
case 'sinaweibo':
|
||||
// data.push({
|
||||
// name: '新浪微博',
|
||||
// id: 'sinaweibo',
|
||||
// icon: 'wlIcon-WeiBo',
|
||||
// background: 'red',
|
||||
// sort: 2
|
||||
// });
|
||||
break;
|
||||
case 'qq':
|
||||
// data.push({
|
||||
// name: 'QQ',
|
||||
// id: 'qq',
|
||||
// icon: 'wlIcon-QQ',
|
||||
// background: 'blue',
|
||||
// sort: 3
|
||||
// });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
// data.push(
|
||||
// {
|
||||
// name: '生成海报',
|
||||
// id: 'poster',
|
||||
// icon: 'wlIcon-classify',
|
||||
// background: 'gray',
|
||||
// sort: 4
|
||||
// },
|
||||
// {
|
||||
// name: '链接',
|
||||
// id: 'link',
|
||||
// icon: 'wlIcon-lianjie',
|
||||
// background: 'gray',
|
||||
// sort: 5
|
||||
// });
|
||||
// if (this.isReport) {
|
||||
// data.push({
|
||||
// name: '举报',
|
||||
// id: 'report',
|
||||
// icon: 'wlIcon-jubao',
|
||||
// background: 'gray',
|
||||
// sort: 6
|
||||
// });
|
||||
// }
|
||||
this.providerList = data.sort((x, y) => {
|
||||
return x.sort - y.sort;
|
||||
});
|
||||
},
|
||||
fail: e => {
|
||||
uni.showModal({
|
||||
content: '获取分享通道失败',
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
async share(e) {
|
||||
this.toSave();
|
||||
return
|
||||
|
||||
let url = this.common.appConfig.domain + this.page + '?' + this.$wanlshop.parseParams(JSON.parse(JSON.stringify(this.scene).replace('"gr"','"groups_id"')));
|
||||
// let url1 = this.page + '?' + this.$wanlshop.parseParams(JSON.parse(JSON.stringify(this.scene).replace('"gr"','"groups_id"')));
|
||||
let params = JSON.parse(JSON.stringify(this.scene).replace('"gr"','"groups_id"'))
|
||||
params.shareId = uni.getStorageSync('shareId')?uni.getStorageSync('shareId'):null;
|
||||
console.log(params,"9999",uni.getStorageSync('shareId'))
|
||||
let url1 = this.page + '?' + this.$wanlshop.parseParams(params);
|
||||
console.log(url1,"8888888")
|
||||
if (e.id == 'poster') {
|
||||
this.openPoster();
|
||||
} else if (e.id == 'close') {
|
||||
this.closePoster();
|
||||
} else if (e.id == 'save') {
|
||||
this.toSave();
|
||||
} else if (e.id == 'link') {
|
||||
this.$wanlshop.copy(url);
|
||||
} else if (e.id == 'report') {
|
||||
this.closePoster();
|
||||
this.complaint();
|
||||
} else {
|
||||
if (!this.shareTitle && (this.shareType === 1 || this.shareType === 0)) {
|
||||
uni.showModal({
|
||||
content: '分享内容不能为空',
|
||||
showCancel: false
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.image && (this.shareType === 2 || this.shareType === 0)) {
|
||||
uni.showModal({
|
||||
content: '分享图片不能为空',
|
||||
showCancel: false
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 开始分享
|
||||
let shareOPtions = {
|
||||
provider: e.id,
|
||||
scene: e.type && e.type === 'WXSenceTimeline' ? 'WXSenceTimeline' :
|
||||
'WXSceneSession', //WXSceneSession”分享到聊天界面,“WXSenceTimeline”分享到朋友圈,“WXSceneFavorite”分享到微信收藏
|
||||
type: this.shareType,
|
||||
success: (e) => {
|
||||
uni.showModal({
|
||||
content: '已分享',
|
||||
showCancel: false
|
||||
})
|
||||
},
|
||||
fail: (e) => {
|
||||
uni.showModal({
|
||||
content: e.errMsg,
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
switch (this.shareType) {
|
||||
case 0:
|
||||
shareOPtions.summary = this.shareText ? this.shareText : this.common.appConfig.poster_details;
|
||||
shareOPtions.imageUrl = this.$wanlshop.oss(this.image, 50, 50);
|
||||
shareOPtions.title = this.shareTitle;
|
||||
shareOPtions.href = url;
|
||||
break;
|
||||
case 1:
|
||||
shareOPtions.summary = this.shareText ? this.shareText : this.common.appConfig.poster_details;
|
||||
break;
|
||||
case 2:
|
||||
shareOPtions.imageUrl = this.$wanlshop.oss(this.image, 50, 50);
|
||||
break;
|
||||
case 5:
|
||||
var pages = getCurrentPages();
|
||||
var page = (pages[pages.length - 1]).route;
|
||||
// shareOPtions.imageUrl = this.image ? this.$wanlshop.oss(this.image, 50, 50) : this.$wanlshop.oss(this.common.appConfig.guide_logo, 100, 125);
|
||||
shareOPtions.imageUrl = this.image ? this.$wanlshop.oss(this.image, 50, 50) : this.common.uploaddata.cdnurl+this.common.appConfig.guide_logo;
|
||||
shareOPtions.title = this.shareTitle;
|
||||
shareOPtions.miniProgram = {
|
||||
// id: this.common.appConfig.mp_weixin_id,
|
||||
id:"gh_504737f2fcee",
|
||||
// path: page, //微信小程序ID
|
||||
path: url1, //微信小程序ID
|
||||
webUrl: url,
|
||||
type: 0
|
||||
};
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// if(shareOPtions.type === 0 && plus.os.name === 'iOS'){//如果是图文分享,且是ios平台,则压缩图片
|
||||
// shareOPtions.imageUrl = await this.compress();
|
||||
// }
|
||||
if (shareOPtions.type === 1 && shareOPtions.provider === 'qq') { //如果是分享文字到qq,则必须加上href和title
|
||||
shareOPtions.href = url;
|
||||
shareOPtions.title = this.shareTitle;
|
||||
}
|
||||
console.log(shareOPtions,"shareOPtions")
|
||||
uni.share(shareOPtions);
|
||||
}
|
||||
if (!this.posterShow) {
|
||||
this.closeShare();
|
||||
}
|
||||
},
|
||||
// 举报商品
|
||||
complaint() {
|
||||
this.$emit('change', 'complaint');
|
||||
},
|
||||
// 关闭模态框
|
||||
closeShare() {
|
||||
this.closePoster();
|
||||
this.$emit('change');
|
||||
},
|
||||
closePoster(){
|
||||
if(this.posterShow){
|
||||
this.providerList = JSON.parse(JSON.stringify(this.providerListBak));
|
||||
}
|
||||
this.posterShow = false;
|
||||
this.$emit('closePoster')
|
||||
},
|
||||
openPoster(){
|
||||
// 深度复制
|
||||
this.providerListBak = JSON.parse(JSON.stringify(this.providerList));
|
||||
this.posterShow = true;
|
||||
},
|
||||
// 生成海报成功
|
||||
posterSuccess(e){
|
||||
this.posterFilePath = e.tempFilePath;
|
||||
// for(var i = 0; i < this.providerList.length; i++) {
|
||||
// if(this.providerList[i].id == 'poster'){
|
||||
// this.providerList[i] = {
|
||||
// name: '保存海报',
|
||||
// id: 'save',
|
||||
// icon: 'wlIcon-xiazai',
|
||||
// background: 'bg-orange',
|
||||
// sort: 6
|
||||
// };
|
||||
// }
|
||||
// };
|
||||
this.providerList.unshift({
|
||||
name: '保存海报',
|
||||
id: 'save',
|
||||
icon: 'wlIcon-xiazai',
|
||||
background: 'bg-orange',
|
||||
sort: 6
|
||||
})
|
||||
this.providerList.push({
|
||||
name: '链接',
|
||||
id: 'link',
|
||||
icon: 'wlIcon-lianjie',
|
||||
background: 'gray',
|
||||
sort: 5
|
||||
}, {
|
||||
name: '关闭海报',
|
||||
id: 'close',
|
||||
icon: 'wlIcon-31guanbi',
|
||||
background: 'gray',
|
||||
sort: 6
|
||||
});
|
||||
},
|
||||
// 手动保存
|
||||
toSave(url) {
|
||||
console.log('ddddddddd',this.posterFilePath)
|
||||
// #ifdef H5
|
||||
// this.$wanlshop.msg('暂不支持H5保存,请长按图片保存');
|
||||
// #endif
|
||||
//#ifndef H5
|
||||
uni.getImageInfo({
|
||||
src: this.posterFilePath,
|
||||
success: (image)=> {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: image.path,
|
||||
success: ()=> {
|
||||
uni.showToast({
|
||||
title: '海报已保存相册',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
this.closeShare();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//#endif
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
page{
|
||||
height: calc(100vh - 44px);
|
||||
}
|
||||
.wanl-share{
|
||||
height: 100%;
|
||||
// 海报
|
||||
&__poster{}
|
||||
/* 分享 */
|
||||
&__share {
|
||||
background-color: #ffffff;
|
||||
border-radius: 11px 11px 0 0;
|
||||
min-height: 50rpx;
|
||||
padding-bottom: 0px;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
.head {
|
||||
padding: 25rpx 25rpx 10rpx 25rpx;
|
||||
.content {
|
||||
justify-content: left;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
}
|
||||
.scroll-x {
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
padding: 24rpx 0;
|
||||
text-align: left;
|
||||
// height: 242rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.scroll-item {
|
||||
background: #fff;
|
||||
display: inline-block;
|
||||
font-size: 36rpx;
|
||||
// margin-left: 36rpx;
|
||||
margin: 0 10rpx;
|
||||
text-align: center;
|
||||
width: 200rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
border-radius: 10rpx;
|
||||
&:last-child {
|
||||
// margin-right: 36rpx;
|
||||
}
|
||||
.icons {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
border-radius: 9999rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 40rpx;
|
||||
display: block;
|
||||
&.gray {
|
||||
color: #606060;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
&.red {
|
||||
color: #ffffff;
|
||||
background-color: #e6162c;
|
||||
}
|
||||
&.blue {
|
||||
color: #ffffff;
|
||||
background-color: #3e92e8;
|
||||
}
|
||||
}
|
||||
button {
|
||||
line-height: 1;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border: 0;
|
||||
padding: 0;
|
||||
&:after {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
.project {
|
||||
// margin-top: 25rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .uni-scroll-view-content{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
246
pages/poster/sharePoster.vue
Normal file
246
pages/poster/sharePoster.vue
Normal file
@ -0,0 +1,246 @@
|
||||
<template>
|
||||
<view style="height:100vh;">
|
||||
<view class="wanl-share" style="padding-top: 0px;background:#F5F5FA">
|
||||
<view class="wanl-poster__poster" v-if="posterShow">
|
||||
<wanlPoster
|
||||
ref="wanlPoster"
|
||||
:img="image"
|
||||
:title="shareTitle"
|
||||
:price="price"
|
||||
:marketPrice="marketPrice"
|
||||
:page="page"
|
||||
:scene="scene"
|
||||
@success="posterSuccess"
|
||||
@close="closeShare"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex-center">
|
||||
<view class="footBox flex-center" @click="toSave">
|
||||
<image class="imgIcon" :src="path+'/assets/img/icon/downLoad.png'" mode="widthFix"></image>
|
||||
<text>保存图片</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* WanlShare 分享
|
||||
* @description 分享组件 深圳前海万联科技有限公司 https://www.wanlshop.com(除万联官方内嵌系统,未经授权严禁使用)
|
||||
* @著作权:WanlShop 登记号:2020SR0255711 版本:V1.0.0
|
||||
* @property {Number} scrollAnimation 滚动位置
|
||||
* @property {Number} shareType 分享类型 0.图文 1.纯文字 2.纯图片 5.小程序
|
||||
* @property {String} shareTitle 分享标题
|
||||
* @property {String} shareText 分享详情
|
||||
* @property {String} image 分享图片 如果是图文分享,且是ios平台,20kb
|
||||
* @property {String} page 分享链接
|
||||
* @event {Function} change 关闭弹窗
|
||||
*/
|
||||
// import {mapState} from 'vuex';
|
||||
import wanlPoster from './wanl-poster.vue';
|
||||
export default {
|
||||
name: 'WanlShare',
|
||||
props: {
|
||||
scrollAnimation: {
|
||||
type: Number,
|
||||
default: 300
|
||||
},
|
||||
shareType: {
|
||||
type: Number,
|
||||
default: 5
|
||||
},
|
||||
modalName: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
shareTitle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
shareText: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
image: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
price: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
marketPrice: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
page: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
scene: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
isReport: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
providerList: [],
|
||||
providerListBak: [],
|
||||
posterShow: true,
|
||||
posterFilePath: '',
|
||||
path: this.path
|
||||
};
|
||||
},
|
||||
components: {
|
||||
wanlPoster
|
||||
},
|
||||
computed: {
|
||||
// ...mapState(['common'])
|
||||
},
|
||||
created() {
|
||||
let user = uni.getStorageSync('wanlshop:user');
|
||||
if(user.isLogin){
|
||||
this.scene.u = user.id;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 生成海报成功
|
||||
posterSuccess(e){
|
||||
this.posterFilePath = e.tempFilePath;
|
||||
},
|
||||
// 手动保存
|
||||
toSave(url) {
|
||||
uni.getImageInfo({
|
||||
src: this.posterFilePath,
|
||||
success: (image)=> {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: image.path,
|
||||
success: ()=> {
|
||||
uni.showToast({
|
||||
title: '海报已保存相册',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
this.closeShare();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//#endif
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
page{
|
||||
height: calc(100vh - 44px);
|
||||
}
|
||||
.wanl-share{
|
||||
height: 100%;
|
||||
// 海报
|
||||
&__poster{}
|
||||
/* 分享 */
|
||||
&__share {
|
||||
background-color: #ffffff;
|
||||
border-radius: 11px 11px 0 0;
|
||||
min-height: 50rpx;
|
||||
padding-bottom: 0px;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
.head {
|
||||
padding: 25rpx 25rpx 10rpx 25rpx;
|
||||
.content {
|
||||
justify-content: left;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
}
|
||||
.scroll-x {
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
padding: 24rpx 0;
|
||||
text-align: left;
|
||||
// height: 242rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.scroll-item {
|
||||
background: #fff;
|
||||
display: inline-block;
|
||||
font-size: 36rpx;
|
||||
// margin-left: 36rpx;
|
||||
margin: 0 10rpx;
|
||||
text-align: center;
|
||||
width: 200rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
border-radius: 10rpx;
|
||||
&:last-child {
|
||||
// margin-right: 36rpx;
|
||||
}
|
||||
.icons {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
border-radius: 9999rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 40rpx;
|
||||
display: block;
|
||||
&.gray {
|
||||
color: #606060;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
&.red {
|
||||
color: #ffffff;
|
||||
background-color: #e6162c;
|
||||
}
|
||||
&.blue {
|
||||
color: #ffffff;
|
||||
background-color: #3e92e8;
|
||||
}
|
||||
}
|
||||
button {
|
||||
line-height: 1;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border: 0;
|
||||
padding: 0;
|
||||
&:after {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
.project {
|
||||
// margin-top: 25rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .uni-scroll-view-content{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.footBox{
|
||||
width: 240rpx;
|
||||
height: 85rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 43rpx;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #181622;
|
||||
.imgIcon{
|
||||
width: 37rpx;
|
||||
height: 37rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
424
pages/poster/wanl-poster - 副本.vue
Normal file
424
pages/poster/wanl-poster - 副本.vue
Normal file
@ -0,0 +1,424 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="wanl-poster" @tap="close" :style="{paddingTop: topNum + 'px'}">
|
||||
<canvas v-if="!tempFilePath" :canvas-id="canvasID" class="wanl-poster__canvas"
|
||||
:style="{ width: canvasW + 'px', height: canvasH + 'px'}" />
|
||||
<view v-else class="wanl-poster__main">
|
||||
<view @tap.stop="">
|
||||
<image lazy-load class="image" :src="tempFilePath" mode="widthFix" @longpress="toSave(tempFilePath)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var that;
|
||||
import {mapState} from 'vuex';
|
||||
export default {
|
||||
name: 'wanl-poster',
|
||||
props: {
|
||||
canvasID: {
|
||||
Type: String,
|
||||
default: 'PosterCanvas'
|
||||
},
|
||||
img: {
|
||||
Type: String,
|
||||
default: ''
|
||||
},
|
||||
price: {
|
||||
Type: String,
|
||||
default: ''
|
||||
},
|
||||
marketPrice: {
|
||||
Type: String,
|
||||
default: ''
|
||||
},
|
||||
title: {
|
||||
Type: String,
|
||||
default: '勉学优品'
|
||||
},
|
||||
page: {
|
||||
Type: String,
|
||||
default: ''
|
||||
},
|
||||
scene: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config: {},
|
||||
loading: false,
|
||||
lineType: true,
|
||||
mpQrcodeUrl: '',
|
||||
tempFilePath: '',
|
||||
canvasW: 0,
|
||||
canvasH: 0,
|
||||
ctx: null,
|
||||
topNum: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user', 'common'])
|
||||
},
|
||||
created() {
|
||||
uni.showLoading({
|
||||
title: '海报生成中...'
|
||||
});
|
||||
that = this;
|
||||
that.OnCanvas();
|
||||
},
|
||||
methods: {
|
||||
async OnCanvas() {
|
||||
that.loading = true;
|
||||
that.ctx = uni.createCanvasContext(that.canvasID, this);
|
||||
let imgurl = 'https://admin.dbcdq.cn/assets/img/icon/bg3.png'
|
||||
// let imgurl = 'https://admin.dbcdq.cn/assets/img/icon/bg2.png'
|
||||
//网络主图
|
||||
let _imgInfo = await that.getImageInfo({
|
||||
img: imgurl
|
||||
});
|
||||
that.canvasW = (uni.getSystemInfoSync().windowWidth/750)*520
|
||||
that.canvasH = (uni.getSystemInfoSync().windowWidth/750)*764
|
||||
that.topNum = 40
|
||||
//canvas背景颜色
|
||||
that.ctx.setFillStyle('#fff');
|
||||
//canvas画布大小
|
||||
that.ctx.fillRect(0, 0, that.canvasW, that.canvasH);
|
||||
//添加图片展示
|
||||
that.ctx.drawImage(_imgInfo.path, 0, 0, that.canvasW, that.canvasH);
|
||||
|
||||
let _qrcodeImg = await that.getImageInfo({img: 'https://admin.dbcdq.cn/assets/img/icon/qrcodebg.png'});
|
||||
|
||||
this.$api.qrcode({},res=>{
|
||||
if(res.code == '1'){
|
||||
|
||||
}
|
||||
})
|
||||
that.ctx.drawImage(_imgInfo.path, that.canvasW - 80, that.canvasH - 80, 50,50);
|
||||
//延迟后渲染至canvas上
|
||||
setTimeout(function() {
|
||||
console.log('14')
|
||||
that.ctx.draw(true, ret => {
|
||||
uni.hideLoading();
|
||||
console.log('16')
|
||||
that.getNewImage();
|
||||
console.log('17')
|
||||
});
|
||||
console.log('15')
|
||||
}, 500);
|
||||
},
|
||||
async OnCanvas2() {
|
||||
console.log('1',uni.getSystemInfoSync().windowHeight)
|
||||
// that.common.appConfig.poster_env = 'develop' //设置成跳转开发版小程序
|
||||
that.loading = true;
|
||||
that.ctx = uni.createCanvasContext(that.canvasID, this);
|
||||
console.log('2--',that.common,that.common.appConfig.poster_width)
|
||||
that.common.appConfig.poster_width = (uni.getSystemInfoSync().windowWidth/750)*520//500
|
||||
const canvasWidth = uni.upx2px(that.common.appConfig.poster_width - 0), //设置海报宽度
|
||||
//canvas Paddng 间距
|
||||
margin = uni.upx2px(0),
|
||||
//二维码或太阳码宽高
|
||||
qrcodeWidth = uni.upx2px(150);
|
||||
console.log('2',that.common.appConfig.poster_width)
|
||||
//文本宽度
|
||||
let _strlineW = 0;
|
||||
console.log('3')
|
||||
let imgurl = 'https://admin.dbcdq.cn/assets/img/icon/bg3.png'
|
||||
// let imgurl = 'https://admin.dbcdq.cn/assets/img/icon/bg2.png'
|
||||
//网络主图
|
||||
let _imgInfo = await that.getImageInfo({
|
||||
// img: that.img ? that.$wanlshop.oss(that.img, 400, 0) : that.$wanlshop.oss(that.common.appConfig.poster_image, 400, 0)
|
||||
img: imgurl//that.img ? that.common.uploaddata.cdnurl+that.img : that.common.uploaddata.cdnurl+that.common.appConfig.poster_image
|
||||
});
|
||||
console.log('4')
|
||||
let r = [_imgInfo.width, _imgInfo.height];
|
||||
let imgW = canvasWidth - margin * 2;
|
||||
if (r[0] != imgW) {
|
||||
r[1] = Math.floor((imgW / r[0]) * r[1]);
|
||||
r[0] = imgW;
|
||||
}
|
||||
that.canvasW = (uni.getSystemInfoSync().windowWidth/750)*520//canvasWidth;
|
||||
console.log('2')
|
||||
// 是否存在价格行
|
||||
// #ifdef MP
|
||||
if (that.price != '') {
|
||||
that.canvasH = r[1] + qrcodeWidth + 120;
|
||||
} else {
|
||||
that.canvasH = r[1] + qrcodeWidth + 85;
|
||||
}
|
||||
// #endif
|
||||
// #ifndef MP
|
||||
if (that.price != '') {
|
||||
that.canvasH = r[1] + qrcodeWidth + 114;
|
||||
} else {
|
||||
that.canvasH = r[1] + qrcodeWidth + 80;
|
||||
}
|
||||
that.canvasH = (uni.getSystemInfoSync().windowWidth/750)*764
|
||||
let h = (uni.getSystemInfoSync().windowWidth/750)*764
|
||||
let w = (uni.getSystemInfoSync().windowWidth/750)*520
|
||||
// #endif
|
||||
console.log('5',(uni.getSystemInfoSync().windowHeight/750)*764)
|
||||
that.topNum = 40//uni.getSystemInfoSync().windowHeight/2 - that.canvasH/2
|
||||
//canvas背景颜色
|
||||
// that.ctx.setFillStyle(that.common.appConfig.poster_background);
|
||||
that.ctx.setFillStyle('#fff');
|
||||
//canvas画布大小
|
||||
that.ctx.fillRect(0, 0, that.canvasW, that.canvasH);
|
||||
|
||||
|
||||
//添加图片展示
|
||||
that.ctx.drawImage(_imgInfo.path, margin, margin, that.canvasW, that.canvasH);
|
||||
//添加图片展示 end
|
||||
console.log('6',margin,r,canvasWidth)
|
||||
|
||||
//设置文本
|
||||
that.ctx.setFontSize(uni.upx2px(32)); //设置标题字体大小
|
||||
that.ctx.setFillStyle(that.common.appConfig.poster_title_color); //设置标题文本颜色
|
||||
let _strLastIndex = 0; //每次开始截取的字符串的索引
|
||||
let _strHeight = r[1] + margin * 2 + 15; //绘制字体距离canvas顶部的初始高度
|
||||
let _num = 1;
|
||||
console.log('7')
|
||||
let title = ['ddd','fff']//that.title ? that.title : that.common.appConfig.poster_title;
|
||||
// for (let i = 0; i < title.length-1; i++) {console.log('2')
|
||||
// _strlineW += that.ctx.measureText(title[i]).width;
|
||||
// if (_strlineW > r[0]) {
|
||||
// if (_num == 2 && that.lineType) {
|
||||
// //文字换行数量大于二进行省略号处理
|
||||
// that.ctx.fillText(title.substring(_strLastIndex, i - 2) + '...', margin, _strHeight);
|
||||
// _strlineW = 0;
|
||||
// _strLastIndex = i;
|
||||
// _num++;
|
||||
// break;
|
||||
// } else {
|
||||
// that.ctx.fillText(title.substring(_strLastIndex, i), margin, _strHeight);
|
||||
// _strlineW = 0;
|
||||
// _strHeight += 20;
|
||||
// _strLastIndex = i;
|
||||
// _num++;
|
||||
// }
|
||||
// } else if (i == title.length - 1) {
|
||||
// that.ctx.fillText(title.substring(_strLastIndex, i + 1), margin, _strHeight);
|
||||
// _strlineW = 0;
|
||||
// }
|
||||
// }
|
||||
//设置文本 end
|
||||
console.log('7')
|
||||
|
||||
//设置价格
|
||||
if (that.price != '') {
|
||||
_strlineW = margin;
|
||||
|
||||
_strHeight += uni.upx2px(60);
|
||||
|
||||
if (_num == 1) {
|
||||
_strHeight += 20; //单行标题时占位符
|
||||
}
|
||||
if (that.price != '') {
|
||||
//判断是否有销售价格
|
||||
that.ctx.setFillStyle(that.common.appConfig.poster_price_color);
|
||||
that.ctx.setFontSize(uni.upx2px(38));
|
||||
that.ctx.fillText('¥' + that.price, _strlineW, _strHeight); //商品价格
|
||||
_strlineW += that.ctx.measureText('¥' + that.price).width + uni.upx2px(10);
|
||||
}
|
||||
//商品原价
|
||||
that.ctx.setFillStyle(that.common.appConfig.poster_original_color);
|
||||
that.ctx.setFontSize(uni.upx2px(24));
|
||||
that.ctx.fillText(that.marketPrice, _strlineW, _strHeight);
|
||||
// 删除线
|
||||
that.ctx.strokeStyle = that.common.appConfig.poster_original_color;
|
||||
that.ctx.moveTo(_strlineW, _strHeight - uni.upx2px(10)); //起点
|
||||
that.ctx.lineTo(_strlineW + that.ctx.measureText(that.marketPrice).width, _strHeight - uni.upx2px(10)); //终点
|
||||
that.ctx.stroke();
|
||||
}
|
||||
//设置价格 end
|
||||
|
||||
|
||||
console.log('1')
|
||||
let _qrcodeImg = await that.getImageInfo({img: 'https://admin.dbcdq.cn/assets/img/icon/qrcodebg.png'});
|
||||
//添加二维码 drawImage(图片, 左边距, 上边距, 宽度, 高度);
|
||||
// let _qrcodeImg = await that.getImageInfo({img: `${that.$wanlshop.config('appurl')}/wanlshop/common/qrcode?width=${qrcodeWidth}&page=${encodeURIComponent(that.page + '?' + that.$wanlshop.parseParams(JSON.parse(JSON.stringify(that.scene).replace('"i"','"id"'))))}`});
|
||||
_strHeight += uni.upx2px(20);
|
||||
// #ifdef APP || H5 || MP-WEIXIN
|
||||
// 微信二维码
|
||||
// 展示全部二维码
|
||||
console.log('1')
|
||||
// if (that.common.appConfig.poster_qrcode == '0') {
|
||||
// that.ctx.drawImage(_qrcodeImg.path, r[0] - qrcodeWidth + margin, _strHeight, qrcodeWidth,qrcodeWidth);
|
||||
// let _mpQrcodeImg = await that.getImageInfo({img: `${that.$wanlshop.config('appurl')}/wanlshop/common/mpQrcode?data=${encodeURIComponent(JSON.stringify({
|
||||
// page:that.page,
|
||||
// scene: that.scene,
|
||||
// width: qrcodeWidth,
|
||||
// env: that.common.appConfig.poster_env
|
||||
// }))}`});
|
||||
// that.ctx.drawImage(_mpQrcodeImg.path, r[0] - qrcodeWidth - qrcodeWidth, _strHeight, qrcodeWidth,qrcodeWidth);
|
||||
// // 展示小程序码
|
||||
// } else if (that.common.appConfig.poster_qrcode == '1') {
|
||||
// let _mpQrcodeImg = await that.getImageInfo({img: `${that.$wanlshop.config('appurl')}/wanlshop/common/mpQrcode?data=${encodeURIComponent(JSON.stringify({
|
||||
// page:that.page,
|
||||
// scene: that.scene,
|
||||
// width: qrcodeWidth,
|
||||
// env: that.common.appConfig.poster_env
|
||||
// }))}`});
|
||||
// that.ctx.drawImage(_mpQrcodeImg.path, r[0] - qrcodeWidth + margin, _strHeight, qrcodeWidth,qrcodeWidth);
|
||||
// // 展示普通二维码
|
||||
// } else if (that.common.appConfig.poster_qrcode == '2') {
|
||||
// // 生成二维码
|
||||
// that.ctx.drawImage(_qrcodeImg.path, r[0] - qrcodeWidth + margin, _strHeight, qrcodeWidth,qrcodeWidth);
|
||||
// }else{
|
||||
// let _mpQrcodeImg = await that.getImageInfo({img: `${that.$wanlshop.config('appurl')}/wanlshop/common/mpQrcode?data=${encodeURIComponent(JSON.stringify({
|
||||
// page:that.page,
|
||||
// scene: that.scene,
|
||||
// width: qrcodeWidth,
|
||||
// env: that.common.appConfig.poster_env
|
||||
// }))}`});
|
||||
// that.ctx.drawImage(_mpQrcodeImg.path, r[0] - qrcodeWidth + margin, _strHeight, qrcodeWidth,qrcodeWidth);
|
||||
// }
|
||||
|
||||
this.$api.qrcode({},res=>{
|
||||
if(res.code == '1'){
|
||||
|
||||
}else{
|
||||
uni.showToast({ title: res.msg , icon: 'none' })
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
console.log('12',_qrcodeImg.path)
|
||||
that.ctx.drawImage(_imgInfo.path, w - 80, h - 80, 50,50);
|
||||
// #ifndef APP || H5 || MP-WEIXIN
|
||||
// that.ctx.drawImage(_imgInfo.path, 0, 0, 50,50);
|
||||
// 生成二维码
|
||||
// that.ctx.drawImage(_qrcodeImg.path, r[0] - qrcodeWidth + margin, _strHeight, qrcodeWidth,qrcodeWidth);
|
||||
// #endif
|
||||
//添加二维码 end
|
||||
console.log('12')
|
||||
|
||||
|
||||
//添加推荐人与描述
|
||||
let username = that.user.isLogin ? '@' + that.user.nickname : that.common.appConfig.poster_user;
|
||||
// that.ctx.setFillStyle(that.common.appConfig.poster_title_color);
|
||||
that.ctx.setFontSize(uni.upx2px(30));
|
||||
console.log('13')
|
||||
// that.ctx.fillText(username, margin, _strHeight + qrcodeWidth / 2);
|
||||
// that.ctx.setFillStyle(that.common.appConfig.poster_original_color);
|
||||
console.log('12')
|
||||
that.ctx.setFontSize(uni.upx2px(24));
|
||||
// that.ctx.fillText(that.common.appConfig.poster_viewDetails, margin, _strHeight + qrcodeWidth / 2 + 20);
|
||||
//添加推荐人与描述 end
|
||||
console.log('13')
|
||||
|
||||
//延迟后渲染至canvas上
|
||||
setTimeout(function() {
|
||||
console.log('14')
|
||||
that.ctx.draw(true, ret => {
|
||||
uni.hideLoading();
|
||||
console.log('16')
|
||||
that.getNewImage();
|
||||
console.log('17')
|
||||
});
|
||||
console.log('15')
|
||||
}, 500);
|
||||
},
|
||||
async getImageInfo({
|
||||
img
|
||||
}) {
|
||||
console.log(img,'----------')
|
||||
return new Promise((resolve, errs) => {
|
||||
uni.getImageInfo({
|
||||
src: img,
|
||||
success: function(image) {
|
||||
resolve(image);
|
||||
},
|
||||
fail(err) {
|
||||
errs(err);
|
||||
uni.showToast({
|
||||
title: '海报生成失败',
|
||||
mask: false,
|
||||
duration: 2000,
|
||||
icon: "none"
|
||||
});
|
||||
uni.hideLoading()
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
getNewImage() {
|
||||
console.log(that.canvasID,'----------+++')
|
||||
uni.canvasToTempFilePath({
|
||||
canvasId: that.canvasID,
|
||||
quality: 1,
|
||||
complete: res => {
|
||||
console.log(that.canvasID,res,'ffffff')
|
||||
that.tempFilePath = res.tempFilePath;
|
||||
that.loading = false;
|
||||
that.$emit('success', res);
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
this
|
||||
);
|
||||
},
|
||||
close() {
|
||||
this.$emit('close');
|
||||
},
|
||||
// 手动保存
|
||||
toSave(url) {
|
||||
//#ifndef H5
|
||||
uni.getImageInfo({
|
||||
src: url,
|
||||
success: function(image) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: image.path,
|
||||
success: function() {
|
||||
uni.showToast({
|
||||
title: '海报已保存相册',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.wanl-poster {
|
||||
&__canvas {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&__main {
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
width: 75%;
|
||||
padding-bottom: 60rpx;
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 6rpx;
|
||||
right: 4rpx;
|
||||
|
||||
.wlIcon {
|
||||
font-size: 46rpx;
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
188
pages/poster/wanl-poster.vue
Normal file
188
pages/poster/wanl-poster.vue
Normal file
@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="wanl-poster" @tap="close" :style="{paddingTop: topNum + 'px'}">
|
||||
<canvas v-if="!tempFilePath" :canvas-id="canvasID" class="wanl-poster__canvas"
|
||||
:style="{ width: canvasW + 'px', height: canvasH + 'px'}" />
|
||||
<view v-else class="wanl-poster__main">
|
||||
<view @tap.stop="">
|
||||
<image lazy-load class="image" :src="tempFilePath" mode="widthFix" @longpress="toSave(tempFilePath)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var that;
|
||||
export default {
|
||||
name: 'wanl-poster',
|
||||
props: {
|
||||
canvasID: {
|
||||
Type: String,
|
||||
default: 'PosterCanvas'
|
||||
},
|
||||
img: {
|
||||
Type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
tempFilePath: '',
|
||||
canvasW: 0,
|
||||
canvasH: 0,
|
||||
ctx: null,
|
||||
topNum: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
created() {
|
||||
uni.showLoading({
|
||||
title: '海报生成中...'
|
||||
});
|
||||
that = this;
|
||||
that.OnCanvas();
|
||||
},
|
||||
methods: {
|
||||
async OnCanvas() {
|
||||
that.loading = true;
|
||||
that.ctx = uni.createCanvasContext(that.canvasID, this);
|
||||
let imgurl = 'https://admin.dbcdq.cn/assets/img/icon/bg3.png'
|
||||
// let imgurl = 'https://admin.dbcdq.cn/assets/img/icon/bg2.png'
|
||||
//网络主图
|
||||
let _imgInfo = await that.getImageInfo({
|
||||
img: imgurl
|
||||
});
|
||||
that.canvasW = (uni.getSystemInfoSync().windowWidth/750)*520
|
||||
that.canvasH = (uni.getSystemInfoSync().windowWidth/750)*764
|
||||
that.topNum = 60
|
||||
//canvas背景颜色
|
||||
that.ctx.setFillStyle('transparent');
|
||||
//canvas画布大小
|
||||
that.ctx.fillRect(0, 0, that.canvasW, that.canvasH);
|
||||
//添加图片展示
|
||||
that.ctx.drawImage(_imgInfo.path, 0, 0, that.canvasW, that.canvasH);
|
||||
|
||||
let _qrcodeImg = await that.getImageInfo({img: 'https://admin.dbcdq.cn/assets/img/icon/bg1.png'});
|
||||
|
||||
this.$api.qrcode({},res=>{
|
||||
if(res.code == '1'){
|
||||
|
||||
}
|
||||
})
|
||||
let h = that.canvasW/100*48
|
||||
|
||||
let left = that.canvasW/100*28.2
|
||||
let top = that.canvasH/100*48.5
|
||||
that.ctx.drawImage(_qrcodeImg.path, left, top, h, h);
|
||||
// that.ctx.drawImage(_qrcodeImg.path, that.canvasW - 214, that.canvasH - 225, h, h);
|
||||
//延迟后渲染至canvas上
|
||||
setTimeout(function() {
|
||||
console.log('14')
|
||||
that.ctx.draw(true, ret => {
|
||||
uni.hideLoading();
|
||||
console.log('16')
|
||||
that.getNewImage();
|
||||
console.log('17')
|
||||
});
|
||||
console.log('15')
|
||||
}, 500);
|
||||
},
|
||||
async getImageInfo({
|
||||
img
|
||||
}) {
|
||||
return new Promise((resolve, errs) => {
|
||||
uni.getImageInfo({
|
||||
src: img,
|
||||
success: function(image) {
|
||||
resolve(image);
|
||||
},
|
||||
fail(err) {
|
||||
errs(err);
|
||||
uni.showToast({
|
||||
title: '海报生成失败',
|
||||
mask: false,
|
||||
duration: 2000,
|
||||
icon: "none"
|
||||
});
|
||||
uni.hideLoading()
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
getNewImage() {
|
||||
uni.canvasToTempFilePath({
|
||||
canvasId: that.canvasID,
|
||||
quality: 1,
|
||||
complete: res => {
|
||||
that.tempFilePath = res.tempFilePath;
|
||||
that.loading = false;
|
||||
that.$emit('success', res);
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
this
|
||||
);
|
||||
},
|
||||
close() {
|
||||
// this.$emit('close');
|
||||
},
|
||||
// 手动保存
|
||||
toSave(url) {
|
||||
//#ifndef H5
|
||||
uni.getImageInfo({
|
||||
src: url,
|
||||
success: function(image) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: image.path,
|
||||
success: function() {
|
||||
uni.showToast({
|
||||
title: '海报已保存相册',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.wanl-poster {
|
||||
&__canvas {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&__main {
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
width: 75%;
|
||||
padding-bottom: 60rpx;
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 6rpx;
|
||||
right: 4rpx;
|
||||
|
||||
.wlIcon {
|
||||
font-size: 46rpx;
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
BIN
static/back_img.png
Normal file
BIN
static/back_img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
BIN
static/dingweis.png
Normal file
BIN
static/dingweis.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
36
store/index.js
Normal file
36
store/index.js
Normal file
@ -0,0 +1,36 @@
|
||||
/**
|
||||
* WanlShop状态管理器
|
||||
*
|
||||
* @ author 深圳前海万联科技有限公司 <wanlshop@i36k.com>
|
||||
* < 程序仅用作FastAdmin付费插件API测试使用,非FastAdmin购买授权,未经版权所有权人书面许可,不能用于商业用途!>
|
||||
* @ link http://www.wanlshop.com
|
||||
* @ 2019年9月10日12:52:20
|
||||
* @ 2020年9月29日19:00:46
|
||||
* @ version 1.0.0
|
||||
**/
|
||||
import Vue from 'vue';
|
||||
import Vuex from 'vuex';
|
||||
// 模块
|
||||
import common from './modules/common';
|
||||
import user from './modules/user';
|
||||
// import chat from './modules/chat';
|
||||
// import cart from './modules/cart';
|
||||
import statistics from './modules/statistics';
|
||||
import update from './modules/update';
|
||||
import permissionToast from './modules/permissionToast';
|
||||
|
||||
Vue.use(Vuex);
|
||||
|
||||
const store = new Vuex.Store({
|
||||
modules: {
|
||||
// chat, // 即时通讯
|
||||
common, // 系统初始化
|
||||
user, // 用户中心
|
||||
// cart, // 购物车
|
||||
statistics, // 系统更新
|
||||
update, // 系统更新
|
||||
permissionToast
|
||||
}
|
||||
});
|
||||
|
||||
export default store;
|
||||
349
store/modules/cart.js
Normal file
349
store/modules/cart.js
Normal file
@ -0,0 +1,349 @@
|
||||
/**
|
||||
* WanlShop状态管理器 - 购物车
|
||||
*
|
||||
* @ author 深圳前海万联科技有限公司 <wanlshop@i36k.com>
|
||||
* < 程序仅用作FastAdmin付费插件API测试使用,非FastAdmin购买授权,未经版权所有权人书面许可,不能用于商业用途!>
|
||||
* < 购物车状态管理器,不得复制、二次开发到第三方项目,否则我们会追究其法律责任 >
|
||||
**/
|
||||
import Vue from 'vue';
|
||||
import fun from '../../common/wanlshop_function';
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
list: [], // 购物车数据
|
||||
cartnum: 0, // 商品数量
|
||||
allchoose: 0, //店铺选中个数
|
||||
allsum: 0, //总计价格
|
||||
allnum: 0, //总计数量
|
||||
allredpocket:0,
|
||||
status: false, //全选选中状态
|
||||
operate: false //管理购物车状态
|
||||
},
|
||||
actions: {
|
||||
async operate({state}) {
|
||||
state.operate = !state.operate;
|
||||
},
|
||||
async get({state, dispatch, rootState}){
|
||||
setTimeout(()=> {
|
||||
// 初始化购物车复用同步购物车
|
||||
if (rootState.user.isLogin) {
|
||||
// 如果登录则同步
|
||||
dispatch('login');
|
||||
}else{
|
||||
// 否则 初始化客户端,购物车用本地赋值,后续格式化购物车数据,整理
|
||||
uni.getStorageSync("wanlshop:cart") ? dispatch('format', uni.getStorageSync("wanlshop:cart")) : '';
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
async login({state, dispatch}){
|
||||
let cart = uni.getStorageSync("wanlshop:cart");
|
||||
// 强制合并
|
||||
await uni.request({
|
||||
url: '/wanlshop/cart/synchro',
|
||||
method: 'POST',
|
||||
data: {
|
||||
cart: cart ? cart: null
|
||||
},
|
||||
success: res => {
|
||||
dispatch('format', res.data);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 操作商品 1.0.2升级 ---------------------------------------------------------------------------
|
||||
async choose({state, dispatch}, {index, keys}) {
|
||||
let cart = state.list[index];
|
||||
let goods = cart.products[keys];
|
||||
!goods.checked ? dispatch('choosetrue', {cart:cart, goods:goods}) : dispatch('choosefalse', {cart:cart, goods:goods});
|
||||
},
|
||||
async choosetrue({state}, {cart, goods}) {
|
||||
//将商品选中状态改为true
|
||||
goods.checked = true;
|
||||
// 选中商品数量先+1
|
||||
cart.choose++;
|
||||
// 再与该店铺商品数量比较,如果相等就更改店铺选中状态为true
|
||||
if (cart.choose === cart.products.length) {
|
||||
cart.check = true;
|
||||
}
|
||||
//如果店铺选中状态改为true
|
||||
if (cart.check) {
|
||||
// 选中店铺,数量先+1
|
||||
state.allchoose++;
|
||||
// 再与店铺数量比较,如果相等就更改全选选中状态为true
|
||||
if (state.allchoose === state.list.length) {
|
||||
state.status = true;
|
||||
}else{
|
||||
state.status = false;
|
||||
}
|
||||
}
|
||||
|
||||
// console.log("红包",fun.bcadd(state.allredpocket, goods.sum))
|
||||
state.allsum = fun.bcadd(state.allsum, goods.sum);
|
||||
// state.allredpocket +=Number(goods.allredpocket);
|
||||
console.log(state,goods,"666")
|
||||
if(goods.allredpocket){
|
||||
state.allredpocket =(Number(state.allredpocket)+Number(goods.allredpocket)).toFixed(2);
|
||||
}else{
|
||||
// goods.allredpocket = goods.number*Number(goods.sku.redpocket)
|
||||
Vue.set(goods,"allredpocket",goods.number*Number(goods.sku.redpocket))
|
||||
state.allredpocket =(Number(state.allredpocket)+Number(goods.allredpocket)).toFixed(2);
|
||||
}
|
||||
state.allnum += goods.number;
|
||||
|
||||
},
|
||||
async choosefalse({state}, {cart, goods}) {
|
||||
// 将商品选中状态改为false
|
||||
goods.checked = false;
|
||||
// 选中商品数量-1
|
||||
cart.choose--;
|
||||
//如果店铺是被选中的,更改店铺选中状态
|
||||
if (cart.check) {
|
||||
cart.check = false;
|
||||
//并且选中店铺数量-1
|
||||
state.allchoose--;
|
||||
}
|
||||
state.status = false; //无论之前全选的状态,将其改为false就行
|
||||
state.allsum = fun.bcsub(state.allsum, goods.sum); //商品总计价格变动
|
||||
state.allnum -= goods.number;
|
||||
console.log(state.allredpocket,goods,"1234")
|
||||
state.allredpocket =(Number(state.allredpocket)-Number(goods.allredpocket)).toFixed(2);
|
||||
|
||||
|
||||
},
|
||||
// 操作店铺
|
||||
async shopchoose({dispatch}, cart) {
|
||||
!cart.check ? dispatch('shoptrue', cart) : dispatch('shopfalse', cart);
|
||||
},
|
||||
async shoptrue({dispatch}, cart) {
|
||||
//循环店铺中的商品,先筛选出目前没选中的商品,给它执行choosetrue
|
||||
cart.products.forEach((goods) => {
|
||||
goods.checked === false && dispatch('choosetrue', {cart:cart, goods:goods});
|
||||
})
|
||||
},
|
||||
async shopfalse({dispatch}, cart) {
|
||||
//循环店铺中的商品,先筛选出目前被选中的商品,给它执行choosefalse
|
||||
cart.products.forEach((goods) => {
|
||||
goods.checked === true && dispatch('choosefalse', {cart:cart, goods:goods});
|
||||
})
|
||||
},
|
||||
// 全选
|
||||
async cartchoose({state, dispatch}) {
|
||||
state.status = !state.status //取反改变状态
|
||||
//根据取反后的状态进行相应的店铺按钮操作
|
||||
state.status ? state.list.forEach((cart) => dispatch('shoptrue', cart)) : state.list.forEach((cart) => dispatch('shopfalse', cart));
|
||||
},
|
||||
// 结算
|
||||
async settlement({state, dispatch, rootState}){
|
||||
let data = [];
|
||||
state.list.forEach((cart, index) => {
|
||||
cart.products.forEach((goods, key) => {
|
||||
if (goods.checked) {
|
||||
data.push({
|
||||
goods_id: goods.goods_id,
|
||||
number: goods.number,
|
||||
sku_id: goods.sku.id
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
// 判断是否登录
|
||||
rootState.user.isLogin ? uni.navigateTo({url: `/pages/user/order/addorder?type=cart&data=${JSON.stringify(data)}`}) : uni.navigateTo({url: `/pages/user/auth/auth`});
|
||||
},
|
||||
// 整理本地数据、云端同步数据-------------------------------------------需要同步----------
|
||||
async format({state, dispatch}, data){
|
||||
let map = {},dest = [];
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let cart = data[i];
|
||||
// 1.0.2升级 读取数据库暂时取消所有已选
|
||||
cart.checked = false;
|
||||
if (!map[cart.shop_id]) {
|
||||
dest.push({
|
||||
shop_id: cart.shop_id,
|
||||
shop_name: cart.shop_name,
|
||||
products: [cart],
|
||||
check: false,
|
||||
choose: 0
|
||||
});
|
||||
map[cart.shop_id] = cart;
|
||||
} else {
|
||||
for (let j = 0; j < dest.length; j++) {
|
||||
let dj = dest[j];
|
||||
if (dj.shop_id == cart.shop_id) {
|
||||
dj.products.push(cart);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
state.list = dest;
|
||||
state.cartnum = 0;
|
||||
state.allchoose = 0;
|
||||
state.allsum = 0;
|
||||
state.allnum = 0;
|
||||
state.allredpocket = 0;
|
||||
state.status = false; // 全选选中状态
|
||||
state.operate = false; // 管理购物车状态
|
||||
dispatch('storage', {type: 'synchro'});
|
||||
},
|
||||
// 加
|
||||
async bcadd({state, dispatch}, goods) {
|
||||
goods.number++;
|
||||
goods.sum = fun.bcadd(goods.sum, goods.sku.price);
|
||||
goods.allredpocket = (Number(goods.allredpocket) + Number(goods.sku.redpocket)).toFixed(2)
|
||||
|
||||
if (goods.checked) {
|
||||
state.allnum++;
|
||||
state.allsum = fun.bcadd(state.allsum, goods.sku.price);
|
||||
console.log(state,goods,"加")
|
||||
state.allredpocket =(Number(state.allredpocket)+Number(goods.sku.redpocket)).toFixed(2);
|
||||
}
|
||||
dispatch('storage', {type: 'bcadd', goods: goods});
|
||||
},
|
||||
// 减
|
||||
async bcsub({state, dispatch}, goods) {
|
||||
if (goods.number > 1){
|
||||
goods.number--;
|
||||
goods.sum = fun.bcsub(goods.sum, goods.sku.price);
|
||||
goods.allredpocket = (Number(goods.allredpocket) - Number(goods.sku.redpocket)).toFixed(2)
|
||||
if (goods.checked) {
|
||||
state.allnum--;
|
||||
state.allsum = fun.bcsub(state.allsum, goods.sku.price);
|
||||
state.allredpocket =(Number(state.allredpocket)-Number(goods.sku.redpocket)).toFixed(2);
|
||||
console.log(state.allredpocket,goods.sku.redpocket,"减")
|
||||
}
|
||||
dispatch('storage', {type: 'bcsub', goods: goods});
|
||||
}
|
||||
},
|
||||
// 添加购物车---------------------------------------------------------------------------
|
||||
async add({state, dispatch}, goods){
|
||||
let isshop = -1;
|
||||
let data = {goods_id: goods.goods_id,sku_id: goods.sku_id,title: goods.title,image: goods.image,sku: goods.sku,number: goods.number,sum: goods.sum,checked: false};
|
||||
state.list.find((item, index)=> {
|
||||
if(item.shop_id == goods.shop_id){
|
||||
isshop = index;
|
||||
}
|
||||
});
|
||||
// 新店铺
|
||||
if (isshop == -1) {
|
||||
state.list.push({
|
||||
shop_id: goods.shop_id,
|
||||
shop_name: goods.shop_name,
|
||||
products: [data],
|
||||
check: false, //店铺选中状态
|
||||
choose: 0, //商品选中个数
|
||||
});
|
||||
}else{
|
||||
// 老店铺追加
|
||||
let products = state.list[isshop].products;
|
||||
let isgoods = -1;
|
||||
products.find((item, index)=> {
|
||||
if(item.goods_id === goods.goods_id && item.sku_id === goods.sku_id){
|
||||
isgoods = index;
|
||||
}
|
||||
});
|
||||
if (isgoods == -1) {
|
||||
// 有新,即不会全选,复用以上方法全取消
|
||||
dispatch('shopfalse', state.list[isshop]);
|
||||
products.push(data);
|
||||
}else{
|
||||
// 商品已存在,只添加数量
|
||||
let shop = products[isgoods];
|
||||
shop.number += goods.number;
|
||||
shop.sum = fun.bcmul(goods.sku.price, shop.number);
|
||||
// 如果店铺全选,必须取消店铺全选
|
||||
if (shop.checked) {
|
||||
state.allnum += goods.number;
|
||||
state.allsum = fun.bcadd(state.allsum, fun.bcmul(goods.sku.price, goods.number));
|
||||
console.log(state,"7890",goods)
|
||||
}
|
||||
}
|
||||
}
|
||||
dispatch('storage', {type: 'add', goods: goods});
|
||||
},
|
||||
// 移动入关注
|
||||
async move({state, dispatch, rootState}){
|
||||
// 判断是否登录
|
||||
rootState.user.isLogin ? dispatch('storage', {type: 'follow'}) : uni.navigateTo({url: `/pages/user/auth/auth`});
|
||||
},
|
||||
// 删除购物车
|
||||
async del({state, dispatch}){
|
||||
// 判断是否全选如果全选直接清空
|
||||
if (state.status) {
|
||||
dispatch('empty');
|
||||
}else{
|
||||
dispatch('storage', {type: 'del'});
|
||||
}
|
||||
},
|
||||
// 清空购物车
|
||||
async empty({state, dispatch}){
|
||||
state.list = [];
|
||||
state.cartnum = 0;
|
||||
state.allchoose = 0;
|
||||
state.allsum = 0;
|
||||
state.allnum = 0;
|
||||
state.redpocket = 0;
|
||||
state.allredpocket = 0;
|
||||
state.status = false; // 全选选中状态
|
||||
state.operate = false; // 管理购物车状态
|
||||
dispatch('storage', {type: 'empty'});
|
||||
},
|
||||
// 数据操作 1.0.2升级
|
||||
async storage({state, dispatch, rootState}, {type, goods}){
|
||||
let cloud = null; // 云端更新条件
|
||||
let storage = []; // 本地更新条件
|
||||
// 删除,移动关注需要用到
|
||||
let select = []; // 选中数据
|
||||
let unchecked = []; // 未选中数据
|
||||
// 操作数据
|
||||
if(type == 'empty'){
|
||||
cloud = {type: type};
|
||||
}else{
|
||||
// 遍历
|
||||
state.list.forEach((cart, index) => {
|
||||
cart.products.forEach((item, key) => {
|
||||
let data = {shop_id: cart.shop_id,shop_name: cart.shop_name,goods_id: item.goods_id,title: item.title,number: item.number,image: item.image,sku: item.sku,sku_id: item.sku_id,sum: item.sum,checked: item.checked};
|
||||
if (type == 'del' || type == 'follow') {
|
||||
if (item.checked) {
|
||||
select.push(data);
|
||||
}else{
|
||||
unchecked.push(data);
|
||||
}
|
||||
}else{
|
||||
storage.push(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
// 统计数量
|
||||
state.cartnum = storage.length;
|
||||
// 整理数据
|
||||
if(type == 'bcsub' || type == 'bcadd'){
|
||||
cloud = {type: type, goods_id: goods.goods_id, sku_id: goods.sku_id, number: goods.number, sum: goods.sum};
|
||||
}else if(type == 'del' || type == 'follow'){
|
||||
dispatch('format', unchecked);
|
||||
storage = unchecked;
|
||||
cloud = {type: type, data: select};
|
||||
// 取消管理
|
||||
state.operate = false;
|
||||
}else if(type == 'add'){
|
||||
cloud = {type: type, data: goods};
|
||||
// 取消全选
|
||||
state.status = false;
|
||||
}
|
||||
}
|
||||
// 操作云端
|
||||
if (cloud != null && rootState.user.isLogin) {
|
||||
await uni.request({
|
||||
url: '/wanlshop/cart/storage',
|
||||
method: 'POST',
|
||||
data: cloud,
|
||||
success: res => {
|
||||
if (type == 'follow') {
|
||||
rootState.statistics.dynamic.collection = rootState.statistics.dynamic.collection + res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// 保存本地
|
||||
uni.setStorageSync("wanlshop:cart", storage);
|
||||
}
|
||||
}
|
||||
};
|
||||
469
store/modules/chat.js
Normal file
469
store/modules/chat.js
Normal file
@ -0,0 +1,469 @@
|
||||
/**
|
||||
* WanlShop状态管理器 - 即时通讯
|
||||
*
|
||||
* @ author 深圳前海万联科技有限公司 <wanlshop@i36k.com>
|
||||
* < 程序仅用作FastAdmin付费插件API测试使用,非FastAdmin购买授权,未经版权所有权人书面许可,不能用于商业用途!>
|
||||
* @ link http://www.wanlshop.com
|
||||
**/
|
||||
import Vue from 'vue';
|
||||
import fun from '../../common/wanlshop_function';
|
||||
import config from '../../common/config/config';
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
isOnline: false,
|
||||
socket: null,
|
||||
reconnectTime: 0,
|
||||
isOpenReconnect: true,
|
||||
ischat: {
|
||||
notice: true,
|
||||
number: 0
|
||||
},
|
||||
close: false,
|
||||
list: [],
|
||||
},
|
||||
mutations: {
|
||||
setIschat(state, payload) {
|
||||
for (let i in payload) {
|
||||
for (let j in state.ischat) {
|
||||
if (i === j) {
|
||||
state.ischat[j] = payload[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
// 连接socket
|
||||
connectSocket({ state, rootState, dispatch }) {
|
||||
config.debug ? console.log("连接 GatewayWorker"):'';
|
||||
state.socket = uni.connectSocket({
|
||||
url: config.socketurl,
|
||||
complete: () => {}
|
||||
});
|
||||
// 监听连接成功
|
||||
state.socket.onOpen(() => dispatch('onOpen'));
|
||||
// 监听接收信息
|
||||
state.socket.onMessage((res) => dispatch('onMessage', res));
|
||||
// 监听断开
|
||||
state.socket.onClose((e) => dispatch('onClose', e));
|
||||
// 监听错误
|
||||
state.socket.onError(() => dispatch('onError'));
|
||||
|
||||
// 获取一次聊天列表
|
||||
setTimeout(()=> {
|
||||
if (rootState.user.isLogin) {
|
||||
dispatch('get');
|
||||
}
|
||||
},300);
|
||||
},
|
||||
onOpen({ state, dispatch }) {
|
||||
// 用户上线
|
||||
state.isOnline = true;
|
||||
config.debug ? console.log('GatewayWorker连接成功'):'';
|
||||
state.isOpenReconnect = true;
|
||||
},
|
||||
|
||||
// 监听关闭
|
||||
onClose({ state, dispatch }, e) {
|
||||
// 用户下线
|
||||
state.isOnline = false;
|
||||
state.socket = null;
|
||||
config.debug ? console.log('GatewayWorker连接已关闭'):'';
|
||||
if (state.isOpenReconnect) {
|
||||
config.debug ? console.log("3秒后重新链接"):'';
|
||||
setTimeout(()=> {
|
||||
dispatch('reconnect');
|
||||
}, 3000);
|
||||
}
|
||||
},
|
||||
// 监听连接错误
|
||||
onError({ state, dispatch }) {
|
||||
// 用户下线
|
||||
state.isOnline = false;
|
||||
state.socket = null;
|
||||
config.debug ? console.log('socket连接错误'):'';
|
||||
if (!state.socket) {
|
||||
setTimeout(()=> {
|
||||
dispatch('reconnect');
|
||||
}, 3000);
|
||||
}
|
||||
},
|
||||
// 监听接收消息
|
||||
onMessage({ state, dispatch, rootDispatch }, data) {
|
||||
let message = JSON.parse(data.data)
|
||||
switch (message['type']) {
|
||||
case 'ping':
|
||||
state.socket.send({
|
||||
data: '{"type":"pong"}',
|
||||
async success() {
|
||||
config.debug ? console.log("GatewayWorker心跳:" + new Date()):'';
|
||||
}
|
||||
})
|
||||
break;
|
||||
case 'init':
|
||||
uni.request({
|
||||
url: '/wanlshop/chat/shake',
|
||||
method: 'POST',
|
||||
data: {'client_id': message.client_id},
|
||||
success: res => {
|
||||
uni.setStorageSync("wanlshop:chat_client_id", res.data);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'service':
|
||||
// 全局通知
|
||||
uni.$emit('onService', message);
|
||||
// 消息提示
|
||||
dispatch('notice', {type: message.type, data: null});
|
||||
break;
|
||||
case 'chat':
|
||||
// 全局通知
|
||||
uni.$emit('onMessage', fun.setChat(message));
|
||||
// 更新数量
|
||||
dispatch('update', {type: message.type, data:message, shop: {id: message.form.shop_id, user_id: message.form.id, name: message.form.name,avatar: message.form.avatar,}});
|
||||
let tipsContent = '';
|
||||
if (message.message.type == 'text') {
|
||||
tipsContent = message.message.content.text
|
||||
}else if(message.message.type == 'img') {
|
||||
tipsContent = '[图片消息]';
|
||||
}else if(message.message.type == 'voice') {
|
||||
tipsContent = '[语音消息]';
|
||||
}
|
||||
if (state.ischat.notice) {
|
||||
dispatch('notice', {
|
||||
type: message.type,
|
||||
data: {
|
||||
title: message.form.name,
|
||||
subtitle: '发来一条消息',
|
||||
content: tipsContent,
|
||||
jsondata: JSON.stringify({
|
||||
id: 0
|
||||
})
|
||||
}
|
||||
});
|
||||
}else{
|
||||
state.ischat.number++;
|
||||
}
|
||||
break;
|
||||
case 'order':
|
||||
// 全局更新,分析订单类型: 待收货(已发货)交易物流+1
|
||||
// 接受其他 签收,退款申请同意,拒绝
|
||||
dispatch('storage', {type: message.type});
|
||||
// 消息提示
|
||||
dispatch('notice', {
|
||||
type: 'order',
|
||||
data: {
|
||||
title: message.title,
|
||||
subtitle: '',
|
||||
content: message.content,
|
||||
jsondata: JSON.stringify({
|
||||
modules: message.modules,
|
||||
modules_id: message.modules_id
|
||||
})
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'notice':
|
||||
dispatch('storage', {type: message.type});
|
||||
// 消息提示
|
||||
dispatch('notice', {
|
||||
type: message.type,
|
||||
data: {
|
||||
title: '标题',
|
||||
subtitle: '副标题',
|
||||
content: '内容',
|
||||
jsondata: JSON.stringify({
|
||||
id: 0
|
||||
})
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'live':
|
||||
// 全局通知
|
||||
uni.$emit('onLiveMessage', message);
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 处理消息
|
||||
async handleOnMessage({ state, dispatch }, message) {
|
||||
if (message.type == "say") {
|
||||
uni.$emit('onMessage', message)
|
||||
} else if (message.type == "getLivingPool") {
|
||||
uni.$emit('onLibingPool', message)
|
||||
} else if (message.type == "SocketLivingInfo") {
|
||||
uni.$emit('SocketLivingInfo', message)
|
||||
}
|
||||
},
|
||||
// 断线重连
|
||||
reconnect({ state, dispatch }) {
|
||||
config.debug ? console.log("GatewayWorker准备重新连接"):'';
|
||||
if (state.isOnline) {
|
||||
return;
|
||||
}
|
||||
if (state.reconnectTime >= 3) {
|
||||
return dispatch('reconnectConfirm');
|
||||
}
|
||||
state.reconnectTime += 1
|
||||
console.log(`GatewayWorker正在${state.reconnectTime}次重新连接`);
|
||||
return dispatch('connectSocket');
|
||||
|
||||
},
|
||||
// 断线重连提示
|
||||
reconnectConfirm({ state, dispatch }) {
|
||||
dispatch('connectSocket');
|
||||
state.reconnectTime = 0
|
||||
},
|
||||
// 验证是否上线
|
||||
checkOnline({ state, dispatch }) {
|
||||
if (!state.isOnline) {
|
||||
// 断线重连提示
|
||||
dispatch('reconnectConfirm');
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
//踢下线
|
||||
kickout({ state, rootState }, msg) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: msg,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
// #ifdef APP
|
||||
if (uni.getSystemInfoSync().platform == 'ios'){
|
||||
plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
|
||||
} else if (uni.getSystemInfoSync().platform == 'android'){
|
||||
plus.runtime.quit();
|
||||
}
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
wx.exitMiniProgram({
|
||||
success: (res) => {}
|
||||
})
|
||||
// #endif
|
||||
dispatch('logout');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 退出登录
|
||||
async logout({state, rootState}) {
|
||||
await uni.request({
|
||||
url: '/wanlshop/user/logout',
|
||||
success: res => {
|
||||
for (let j in rootState.user) {
|
||||
rootState.user[j] = ''
|
||||
}
|
||||
rootState.user.isLogin = false;
|
||||
let statistics = rootState.statistics;
|
||||
for (let j in statistics) {
|
||||
for (let i in statistics[j]) {
|
||||
statistics[j][i] = 0
|
||||
}
|
||||
}
|
||||
// 从本地缓存中异步移除指定key
|
||||
uni.removeStorageSync('wanlshop:user');
|
||||
uni.removeStorageSync('wanlshop:statis');
|
||||
uni.removeStorageSync('shareId')
|
||||
// 关闭即时通讯
|
||||
dispatch('close');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 关闭连接
|
||||
close({ state, dispatch }) {
|
||||
if (state.socket) {
|
||||
state.socket.close()
|
||||
}
|
||||
dispatch('destoryChatObject');
|
||||
state.isOpenReconnect = false
|
||||
},
|
||||
// 创建聊天对象
|
||||
createChatObject({ state, dispatch }, detail) {
|
||||
state.TO = detail
|
||||
},
|
||||
// 销毁聊天对象
|
||||
destoryChatObject({ state, dispatch }) {
|
||||
state.TO = false
|
||||
},
|
||||
// 全局消息提示
|
||||
async notice({state, dispatch, rootState}, {type, data}){
|
||||
// 声音提示
|
||||
if (rootState.user.voice) {
|
||||
let audio = uni.createInnerAudioContext();
|
||||
let cdn = rootState.common.appUrl.oss;
|
||||
let src = {
|
||||
service: cdn + '/assets/addons/wanlshop/voice/service.mp3',
|
||||
order: cdn + '/assets/addons/wanlshop/voice/order.mp3',
|
||||
notice: cdn + '/assets/addons/wanlshop/voice/notice.mp3',
|
||||
chat: cdn + '/assets/addons/wanlshop/voice/chat.mp3'
|
||||
};
|
||||
audio.autoplay = true;
|
||||
audio.src = src[type];
|
||||
audio.onPlay(() => {
|
||||
config.debug ? console.log('开始播放') : '';
|
||||
});
|
||||
audio.onError((res) => {
|
||||
config.debug ? console.log(res) : '';
|
||||
});
|
||||
}
|
||||
// 震动
|
||||
// #ifndef H5
|
||||
if (rootState.user.shock) {
|
||||
uni.vibrateShort();
|
||||
}
|
||||
// #endif
|
||||
//推送
|
||||
// #ifdef APP-PLUS
|
||||
// if (rootState.user.pushs) {
|
||||
// if (data) {
|
||||
// plus.push.createMessage(data.content, data.jsondata, {
|
||||
// cover: false,
|
||||
// title: data.title,
|
||||
// subtitle: data.subtitle
|
||||
// });
|
||||
// }else{
|
||||
// config.debug ? console.log('推送数据不存在无法推送') : '';
|
||||
// }
|
||||
// }
|
||||
// #endif
|
||||
},
|
||||
// 读取消息列表
|
||||
async get({state, dispatch, rootState}) {
|
||||
await uni.request({
|
||||
url: '/wanlshop/chat/lists',
|
||||
success: res => {
|
||||
state.list = res.data;
|
||||
let count = 0;
|
||||
res.data.forEach(item => {count += item.count;});
|
||||
dispatch('storage', {type: 'statis', number: count});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除指定消息
|
||||
async del({state, dispatch, rootState}, index){
|
||||
let list = state.list;
|
||||
// 修改消息总数量
|
||||
dispatch('storage', {type: 'del', number: list[index].count});
|
||||
// 清空本地储存
|
||||
uni.removeStorage({
|
||||
key: 'wanlchat:message_' + list[index].user_id,
|
||||
success: (res) => {
|
||||
config.debug ? console.log('删除消息成功'):'';
|
||||
}
|
||||
});
|
||||
// 操作云
|
||||
await uni.request({url: '/wanlshop/chat/del',method: 'POST',data: {id: list[index].user_id}});
|
||||
// 删除状态管理器
|
||||
Vue.delete(state.list, index);
|
||||
},
|
||||
// 全部已读
|
||||
async empty({state, dispatch, rootState}){
|
||||
uni.showModal({
|
||||
content: '是否将全部数据标记已读状态?',
|
||||
success: res=> {
|
||||
if (res.confirm) {
|
||||
// 已读状态管理器
|
||||
state.list.forEach(item => {item.count = 0});
|
||||
// 全局清零
|
||||
dispatch('storage', {type: 'empty'});
|
||||
// 操作云
|
||||
uni.request({
|
||||
url: '/wanlshop/chat/read',
|
||||
method: 'POST',
|
||||
success: res => {
|
||||
uni.showToast({title: '全部已读',icon: 'none'});
|
||||
}
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
config.debug ? console.log('用户点击取消') : '';
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 通用更新,接受消息更新,发送消息更新,返回清空角标
|
||||
async update({state, dispatch}, {type, data, id, shop}){
|
||||
if (type == 'del') {
|
||||
let counts = 0;
|
||||
state.list.some(chat => {if (chat.user_id == id) {
|
||||
counts = chat.count;
|
||||
chat.count = 0;
|
||||
return true
|
||||
}});
|
||||
// 操作统计
|
||||
dispatch('storage', {type: 'del', number: counts});
|
||||
// 操作云
|
||||
await uni.request({url: '/wanlshop/chat/clear',method: 'POST',data: {id: id}});
|
||||
}else if(type == 'chat' || type == 'send'){
|
||||
let content = '';
|
||||
let createtime = data.createtime;
|
||||
let chat_id = 0;
|
||||
let chat_name = null;
|
||||
let chat_avatar = null;
|
||||
if (data.message.type == 'text') {
|
||||
content = data.message.content.text;
|
||||
}else if(data.message.type == 'img') {
|
||||
content = '[图片消息]';
|
||||
}else if(data.message.type == 'voice') {
|
||||
content = '[语音消息]';
|
||||
}else if(data.message.type == 'goods') {
|
||||
content = '[商品消息]';
|
||||
}else{
|
||||
content = '[未知类型消息]';
|
||||
}
|
||||
if(type == 'chat'){
|
||||
chat_id = data.form.id;
|
||||
dispatch('storage', {type: 'chat'});
|
||||
}else if (type == 'send') {
|
||||
chat_id = data.to_id;
|
||||
}
|
||||
let result = state.list.some(chat => {
|
||||
if (chat.user_id == chat_id) {
|
||||
if(type == 'chat'){
|
||||
chat.count += 1;
|
||||
}
|
||||
chat.createtime = createtime;
|
||||
chat.content = content;
|
||||
return true
|
||||
}
|
||||
});
|
||||
// 如果没有新增一个,chat 数量初始1
|
||||
if (!result) {
|
||||
Vue.set(state.list, 0, {
|
||||
id: shop.id,
|
||||
user_id: shop.user_id,
|
||||
name: shop.name,
|
||||
avatar: shop.avatar,
|
||||
content: content,
|
||||
count: 1,
|
||||
createtime: createtime,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
// 操作储存
|
||||
async storage({state, rootState}, {type, number}) {
|
||||
if(type == 'statis'){
|
||||
rootState.statistics.notice.chat = number;
|
||||
}else if(type == 'order'){
|
||||
rootState.statistics.notice.order += 1;
|
||||
}else if(type == 'notice'){
|
||||
rootState.statistics.notice.notice += 1;
|
||||
}else if(type == 'chat'){
|
||||
rootState.statistics.notice.chat += 1;
|
||||
}else if(type == 'del'){
|
||||
rootState.statistics.notice.chat -= number;
|
||||
}else if(type == 'empty'){
|
||||
rootState.statistics.notice.chat = 0;
|
||||
rootState.statistics.notice.order = 0;
|
||||
rootState.statistics.notice.notice = 0;
|
||||
}
|
||||
uni.setStorageSync("wanlshop:statis", rootState.statistics);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
180
store/modules/common.js
Normal file
180
store/modules/common.js
Normal file
@ -0,0 +1,180 @@
|
||||
/**
|
||||
* WanlShop状态管理器 - 系统初始化
|
||||
*
|
||||
* @ author 深圳前海万联科技有限公司 <wanlshop@i36k.com>
|
||||
* < 程序仅用作FastAdmin付费插件API测试使用,非FastAdmin购买授权,未经版权所有权人书面许可,不能用于商业用途!>
|
||||
* @ link http://www.wanlshop.com
|
||||
* @ 2020年9月29日19:00:46
|
||||
* @ version 1.0.0
|
||||
**/
|
||||
import config from '../../common/config/config';
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
// 储存数据
|
||||
state: {
|
||||
appStyle: {}, // APP整体样式
|
||||
appConfig: {}, // APP整体配置
|
||||
is_hidden:0,//隐藏友圈
|
||||
is_hidden_payment:0,//隐藏支付
|
||||
is_hidden_wechat_login:0,//隐藏微信登录
|
||||
is_hidden_account_login:0,//隐藏账户登录
|
||||
uploaddata:{},
|
||||
vippayconfig:{},
|
||||
studentBXmoney: "40",
|
||||
studentBXred: "160",
|
||||
fapiaogivered:0,
|
||||
// APP链接
|
||||
appUrl: {
|
||||
api: config.appurl,
|
||||
oss: config.cdnurl
|
||||
},
|
||||
// APP整体数据
|
||||
appInfo: {
|
||||
adVersion: '0', // 广告数据版本号 拉取大版本号数据
|
||||
serviceVersion: '0' // Api数据版本号 拉取大版本号数据 用于尚未更新用户正常使用
|
||||
},
|
||||
// 广告数据
|
||||
adData: {
|
||||
openAdverts: {},
|
||||
pageAdverts: [],
|
||||
categoryAdverts: [],
|
||||
firstAdverts: [],
|
||||
otherAdverts: []
|
||||
},
|
||||
// 模块数据
|
||||
modulesData: {
|
||||
homeModules: {}, //首页模块
|
||||
categoryModules: [], //类目模块
|
||||
searchModules: [] //搜索模块
|
||||
},
|
||||
config: {
|
||||
screenshot: false,
|
||||
position: true,
|
||||
map: true
|
||||
},
|
||||
version: config.versionName,
|
||||
versionCode: config.versionCode
|
||||
},
|
||||
mutations: {
|
||||
setConfig(state, payload) {
|
||||
for (let i in payload) {
|
||||
for (let j in state.config) {
|
||||
if (i === j) {
|
||||
state.config[j] = payload[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 操作数据
|
||||
actions: {
|
||||
// WanlShop 初始化,检测
|
||||
async init({state, dispatch, rootState}) {
|
||||
let userStorage = uni.getStorageSync('wanlshop:user');
|
||||
uni.request({
|
||||
url: '/wanlshop/token/check',
|
||||
success: (res) => {
|
||||
if (res.msg === 'ok') {
|
||||
// 已经登录,刷新一个token,将原有账户赋值给状态管理器
|
||||
if (userStorage) {
|
||||
rootState.user = userStorage;
|
||||
}
|
||||
rootState.user.isLogin = true;
|
||||
}else{
|
||||
// 清除登录信息
|
||||
let user = rootState.user;
|
||||
for (let j in user) {
|
||||
user[j] = ''
|
||||
}
|
||||
rootState.user.isLogin = false;
|
||||
// 清除统计信息
|
||||
let statistics = rootState.statistics;
|
||||
for (let j in statistics) {
|
||||
for (let i in statistics[j]) {
|
||||
statistics[j][i] = 0
|
||||
}
|
||||
}
|
||||
// 从本地缓存中异步移除
|
||||
if (userStorage) {
|
||||
uni.removeStorageSync('wanlshop:user');
|
||||
uni.removeStorageSync('wanlshop:statis');
|
||||
}
|
||||
}
|
||||
dispatch('getAds');
|
||||
dispatch('getServices');
|
||||
},
|
||||
fail: (e) => {
|
||||
// #ifdef APP-PLUS
|
||||
plus.navigator.closeSplashscreen(); //主动关闭启动图
|
||||
// #endif
|
||||
}
|
||||
});
|
||||
},
|
||||
async getServices({state}){
|
||||
await uni.request({
|
||||
url: '/wanlshop/common/init',
|
||||
data: {
|
||||
version: state.version
|
||||
},
|
||||
success: res => {
|
||||
// px转rpx正则表达
|
||||
for (var i = 0; i < res.data.modulesData.homeModules.item.length; i++) {
|
||||
for (var item in res.data.modulesData.homeModules.item[i].style)
|
||||
{
|
||||
if(res.data.modulesData.homeModules.item[i].style[item])
|
||||
res.data.modulesData.homeModules.item[i].style[item] =
|
||||
res.data.modulesData.homeModules.item[i].style[item].toString().replace(/\d*\.?\d+px/, function(match) {
|
||||
return match.replace('px', '') * 2 + 'rpx'
|
||||
})
|
||||
};
|
||||
for (var item in res.data.modulesData.homeModules.item[i].params)
|
||||
{
|
||||
if(res.data.modulesData.homeModules.item[i].params[item])
|
||||
res.data.modulesData.homeModules.item[i].params[item] =
|
||||
res.data.modulesData.homeModules.item[i].params[item].toString().replace(/\d*\.?\d+px/, function(match) {
|
||||
return match.replace('px', '') * 2 + 'rpx'
|
||||
})
|
||||
};
|
||||
};
|
||||
// 写入全局配置
|
||||
state.appConfig = res.data.appConfig;
|
||||
state.is_hidden = res.data.is_hidden;
|
||||
state.is_hidden_payment = res.data.is_hidden_payment;
|
||||
state.is_hidden_wechat_login = res.data.is_hidden_wechat_login;
|
||||
state.is_hidden_account_login = res.data.is_hidden_account_login;
|
||||
state.uploaddata = res.data.uploaddata;
|
||||
state.vippayconfig = res.data.vippayconfig;
|
||||
state.studentBXmoney = res.data.fapiao.studentBXmoney;
|
||||
state.studentBXred = res.data.fapiao.studentBXred;
|
||||
state.fapiaogivered = res.data.fapiao.givered;
|
||||
// 写入全局样式
|
||||
state.appStyle = res.data.appStyle;
|
||||
// 写入模块数据
|
||||
state.modulesData = res.data.modulesData;
|
||||
}
|
||||
});
|
||||
},
|
||||
async getAds({state}){
|
||||
await uni.request({
|
||||
url: '/wanlshop/common/adverts',
|
||||
data: {
|
||||
version: state.version
|
||||
},
|
||||
success: res => {
|
||||
if(res.data.syspopup){
|
||||
uni.showModal({content: res.data.syspopup});
|
||||
}else{
|
||||
// 关闭启动图进入APP
|
||||
// #ifdef APP-PLUS
|
||||
setTimeout(() => {
|
||||
plus.navigator.closeSplashscreen(); //主动关闭启动图
|
||||
}, 100)
|
||||
// #endif
|
||||
}
|
||||
state.adData = res.data.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
259
store/modules/permissionToast.js
Normal file
259
store/modules/permissionToast.js
Normal file
@ -0,0 +1,259 @@
|
||||
const state = {
|
||||
dialogView: null,
|
||||
permissionListener: null,
|
||||
list: [{
|
||||
name: "CAMERA",
|
||||
title: "相机权限申请说明:",
|
||||
content: "用于您拍摄照片,保证上传发票、更新头像或者发送照片功能的使用,允许或拒绝均不会获取任何隐私信息。",
|
||||
},
|
||||
{
|
||||
name: "READ_MEDIA_IMAGES",
|
||||
title: "读取外部存储权限申请说明:",
|
||||
content: "用于读取您的设备存储中的图片,允许或拒绝均不会获取任何隐私信息。",
|
||||
},
|
||||
{
|
||||
name: "READ_EXTERNAL_STORAGE",
|
||||
title: "读取外部存储权限申请说明:",
|
||||
content: "用于读取您的设备存储中的图片,允许或拒绝均不会获取任何隐私信息。",
|
||||
},
|
||||
{
|
||||
name: "RECORD_AUDIO",
|
||||
title: "录音权限申请说明:",
|
||||
content: "用于录制音频,例如语音消息,允许或拒绝均不会获取任何隐私信息。",
|
||||
},
|
||||
{
|
||||
name: "ACCESS_FINE_LOCATION",
|
||||
title: "位置权限申请说明:",
|
||||
content: "用于连接蓝牙设备,例如通过蓝牙连接检测仪器,允许或拒绝均不会获取任何隐私信息。",
|
||||
}
|
||||
]
|
||||
}
|
||||
const actions = {
|
||||
//清除弹框
|
||||
asyncClearDialogView({
|
||||
commit
|
||||
}) {
|
||||
commit('clearDialogView')
|
||||
},
|
||||
//权限获取
|
||||
//监听权限申请
|
||||
async requstPermission({
|
||||
state,
|
||||
dispatch,
|
||||
commit
|
||||
}, permissionID) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
console.log('🚀🚀','当前申请的权限',permissionID);
|
||||
// if (!uni.getSystemInfoSync().platform == 'android') return resolve(true)
|
||||
/**
|
||||
* @description plus.navigator.checkPermission 检查应用是否获取指定权限
|
||||
* 有些权限检测不到 就继续下面的代码,比如相册权限就可以直接检测,就很方便,授权情况下不需要再走下面代码了
|
||||
* checkPermission 返回参数
|
||||
* @params undetermined 未确定
|
||||
* @params authorized 授权
|
||||
*/
|
||||
let checkPermission = plus.navigator.checkPermission('android.permission.' +
|
||||
permissionID)
|
||||
console.log(checkPermission);
|
||||
if (checkPermission == 'authorized') return resolve(true)
|
||||
//判断是否自己在list里面配置了这个权限
|
||||
let index = state.list.findIndex(item => item.name == permissionID)
|
||||
console.log(index, 789789789798, permissionID);
|
||||
if (index == -1) throw new Error('这个权限没有配置')
|
||||
//唤起原生权限说明弹框
|
||||
dispatch('requstPermissionDialog', index)
|
||||
//授权检测回调
|
||||
plus.android.requestPermissions(
|
||||
[
|
||||
'android.permission.' + permissionID //单个权限
|
||||
// 'android.permission.CAMERA', 'android.permission.READ_EXTERNAL_STORAGE' //多个权限
|
||||
],
|
||||
async (resultObj) => {
|
||||
console.log(resultObj, 'resultObj');
|
||||
await dispatch('asyncClearDialogView')
|
||||
// 权限申请结果
|
||||
/**
|
||||
* @description resultObj.deniedAlways 永久拒绝授权
|
||||
* 多个权限返回结果可能是{"granted":["android.permission.CAMERA"],"deniedPresent":[],"deniedAlways":["android.permission.READ_EXTERNAL_STORAGE"]}
|
||||
* 这个情况就是我同时授权相册和相机,但是只允许了相机,没有授权相册
|
||||
* 这个时候 可以通过deniedAlways 查看哪个权限被永久拒绝了,然后自行在设置弹框内容
|
||||
* 所以可以自己判断细分一下,我下面的代码是先判断了是否有永久拒绝的权限,然后直接弹框提示用户去设置
|
||||
*/
|
||||
if (resultObj.deniedAlways && resultObj.deniedAlways.length > 0) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '操作权限已被拒绝,请手动前往设置',
|
||||
confirmText: "立即设置",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
dispatch('gotoAppPermissionSetting')
|
||||
} else {
|
||||
resolve(false)
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log('永久拒绝授权');
|
||||
} else if (resultObj.deniedPresent && resultObj.deniedPresent.length > 0) {
|
||||
resolve(false)
|
||||
console.log('拒绝授权');
|
||||
} else if (resultObj.granted && resultObj.granted.length > 0) {
|
||||
resolve(true)
|
||||
console.log('授权成功');
|
||||
}
|
||||
},
|
||||
(error) => {
|
||||
reject(false)
|
||||
console.log('申请权限错误:', error);
|
||||
}
|
||||
);
|
||||
} catch (err) {
|
||||
reject(false)
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
},
|
||||
//监听弹框
|
||||
requstPermissionDialog({
|
||||
state,
|
||||
dispatch
|
||||
}, index) {
|
||||
try {
|
||||
let permissionListener = state.permissionListener;
|
||||
console.log(index,permissionListener);
|
||||
if (!permissionListener) permissionListener = uni.createRequestPermissionListener()
|
||||
const dialogData = state.list[index]
|
||||
permissionListener.onConfirm((res) => {
|
||||
dispatch('dialogStyle', {
|
||||
...dialogData,
|
||||
status: true
|
||||
})
|
||||
})
|
||||
permissionListener.onComplete(async (res) => {
|
||||
permissionListener.stop()
|
||||
dispatch('dialogStyle', {
|
||||
title: '',
|
||||
content: '',
|
||||
status: false
|
||||
})
|
||||
})
|
||||
} catch (err) {
|
||||
console.log('监听弹框错误', err);
|
||||
}
|
||||
},
|
||||
//弹框样式
|
||||
dialogStyle({
|
||||
state,
|
||||
commit
|
||||
}, data) {
|
||||
console.log(data);
|
||||
const {
|
||||
title,
|
||||
content,
|
||||
status
|
||||
} = data
|
||||
try {
|
||||
console.log('弹框样式函数',status);
|
||||
if(!status) {
|
||||
commit('clearDialogView')
|
||||
return
|
||||
}
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
const statusBarHeight = systemInfo.statusBarHeight;
|
||||
const navigationBarHeight = systemInfo.platform === 'android' ? 48 :
|
||||
44;
|
||||
const totalHeight = statusBarHeight + navigationBarHeight;
|
||||
commit('setDialogView', {
|
||||
totalHeight,
|
||||
title,
|
||||
content
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
console.log(e, '权限说明弹框样式错误');
|
||||
}
|
||||
},
|
||||
//跳转到app权限设置页面
|
||||
gotoAppPermissionSetting() {
|
||||
if (!uni.getSystemInfoSync().platform == 'android') {
|
||||
var UIApplication = plus.ios.import("UIApplication");
|
||||
var application2 = UIApplication.sharedApplication();
|
||||
var NSURL2 = plus.ios.import("NSURL");
|
||||
// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
|
||||
var setting2 = NSURL2.URLWithString("app-settings:");
|
||||
application2.openURL(setting2);
|
||||
|
||||
plus.ios.deleteObject(setting2);
|
||||
plus.ios.deleteObject(NSURL2);
|
||||
plus.ios.deleteObject(application2);
|
||||
} else {
|
||||
// console.log(plus.device.vendor);
|
||||
var Intent = plus.android.importClass("android.content.Intent");
|
||||
var Settings = plus.android.importClass("android.provider.Settings");
|
||||
var Uri = plus.android.importClass("android.net.Uri");
|
||||
var mainActivity = plus.android.runtimeMainActivity();
|
||||
var intent = new Intent();
|
||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
mainActivity.startActivity(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
const mutations = {
|
||||
//设置弹框
|
||||
setDialogView(state, {
|
||||
totalHeight,
|
||||
title,
|
||||
content
|
||||
}) {
|
||||
state.dialogView = new plus.nativeObj.View('per-modal', {
|
||||
top: '0px',
|
||||
left: '0px',
|
||||
width: '100%',
|
||||
backgroundColor: '#444',
|
||||
//opacity: .5;
|
||||
})
|
||||
state.dialogView.drawRect({
|
||||
color: '#fff',
|
||||
radius: '5px'
|
||||
}, {
|
||||
top: totalHeight + 'px',
|
||||
left: '5%',
|
||||
width: '90%',
|
||||
height: "100px",
|
||||
})
|
||||
state.dialogView.drawText(title, {
|
||||
top: totalHeight + 5 + 'px',
|
||||
left: "8%",
|
||||
height: "30px"
|
||||
}, {
|
||||
align: "left",
|
||||
color: "#000",
|
||||
})
|
||||
state.dialogView.drawText(content, {
|
||||
top: totalHeight + 35 + 'px',
|
||||
height: "60px",
|
||||
left: "8%",
|
||||
width: "84%"
|
||||
}, {
|
||||
whiteSpace: 'normal',
|
||||
size: "14px",
|
||||
align: "left",
|
||||
color: "#656563"
|
||||
})
|
||||
state.dialogView.show()
|
||||
},
|
||||
//清除弹框
|
||||
clearDialogView(state) {
|
||||
console.log('清除弹框样式');
|
||||
state.dialogView && state.dialogView.close()
|
||||
state.dialogView = null
|
||||
}
|
||||
}
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
actions,
|
||||
mutations
|
||||
};
|
||||
93
store/modules/statistics.js
Normal file
93
store/modules/statistics.js
Normal file
@ -0,0 +1,93 @@
|
||||
/**
|
||||
* WanlShop状态管理器 - 用户管理
|
||||
*
|
||||
* @ author 深圳前海万联科技有限公司 <wanlshop@i36k.com>
|
||||
* < 程序仅用作FastAdmin付费插件API测试使用,非FastAdmin购买授权,未经版权所有权人书面许可,不能用于商业用途!>
|
||||
* @ link http://www.wanlshop.com
|
||||
* @ 2020年9月29日19:00:46
|
||||
* @ version 1.0.0
|
||||
**/
|
||||
export default {
|
||||
namespaced: true,
|
||||
// 储存数据
|
||||
state: {
|
||||
// 订单统计
|
||||
order: {
|
||||
pay: 0, // 待支付
|
||||
delive: 0, // 待发货
|
||||
receiving: 0, // 待收货
|
||||
evaluate: 0, // 待评价
|
||||
customer: 0 ,//售后
|
||||
whole: 0 ,//普通订单总数
|
||||
groups: 0 //拼团订单总数
|
||||
},
|
||||
// 动态统计
|
||||
dynamic: {
|
||||
collection: 0, // 收藏
|
||||
concern: 0, // 关注店铺
|
||||
footprint: 0, // 足迹
|
||||
coupon: 0, // 卡券
|
||||
accountbank: 0 // 银行卡
|
||||
},
|
||||
// 消息统计
|
||||
notice: {
|
||||
order: 0,
|
||||
notice: 0,
|
||||
chat: 0
|
||||
},
|
||||
// 物流状态
|
||||
logistics: []
|
||||
},
|
||||
// 修改数据
|
||||
mutations: {
|
||||
// 修改所有
|
||||
edit(state, payload){
|
||||
for (let i in payload) {
|
||||
for (let j in state) {
|
||||
if (i === j) {
|
||||
state[j] = payload[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
uni.setStorageSync("wanlshop:statis", state);
|
||||
},
|
||||
// 设置统计订单数据 - 修改键
|
||||
order(state, payload) {
|
||||
for (let i in payload) {
|
||||
for (let j in state.order) {
|
||||
if (i === j) {
|
||||
state.order[j] = payload[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
uni.setStorageSync("wanlshop:statis", state);
|
||||
},
|
||||
// 设置统计动态数据 - 修改键
|
||||
dynamic(state, payload) {
|
||||
for (let i in payload) {
|
||||
for (let j in state.dynamic) {
|
||||
if (i === j) {
|
||||
state.dynamic[j] = payload[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
uni.setStorageSync("wanlshop:statis", state);
|
||||
},
|
||||
// 设置通知统计数据 - 修改键
|
||||
noticec(state, payload) {
|
||||
for (let i in payload) {
|
||||
for (let j in state.notice) {
|
||||
if (i === j) {
|
||||
state.notice[j] = payload[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
uni.setStorageSync("wanlshop:statis", state);
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async get({commit, rootState}) {
|
||||
commit('edit', uni.getStorageSync('wanlshop:statis'));
|
||||
}
|
||||
}
|
||||
};
|
||||
236
store/modules/update.js
Normal file
236
store/modules/update.js
Normal file
@ -0,0 +1,236 @@
|
||||
/**
|
||||
* WanlShop状态管理器 - 系统更新 - 后续版本更新
|
||||
*
|
||||
* @ author 深圳前海万联科技有限公司 <wanlshop@i36k.com>
|
||||
* < 程序仅用作FastAdmin付费插件API测试使用,非FastAdmin购买授权,未经版权所有权人书面许可,不能用于商业用途!>
|
||||
* @ link http://www.wanlshop.com
|
||||
* @ 2020年9月29日19:00:46
|
||||
* @ version 1.0.0
|
||||
**/
|
||||
import Vue from 'vue';
|
||||
import config from '../../common/config/config';
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
// 储存数据
|
||||
state: {
|
||||
update: false,
|
||||
data: {},
|
||||
link: {},
|
||||
download: {
|
||||
path: null,
|
||||
start: false,
|
||||
install: false,
|
||||
progress: 0,
|
||||
totalBytesWritten: 0,
|
||||
totalBytesExpectedToWrite: 0,
|
||||
},
|
||||
task: null
|
||||
},
|
||||
// 修改数据
|
||||
mutations: {
|
||||
edit(state, {data, index}){
|
||||
state[index] = data;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async update({commit, dispatch}) {
|
||||
// #ifdef MP
|
||||
const mp = uni.getUpdateManager();
|
||||
// 请求完新版本信息的回调
|
||||
mp.onCheckForUpdate((res) => {
|
||||
config.debug ? console.log(res.hasUpdate) : '';
|
||||
});
|
||||
mp.onUpdateReady((res) => {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,是否重启应用?',
|
||||
success(show) {
|
||||
if (show.confirm) {
|
||||
mp.applyUpdate();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
mp.onUpdateFailed((res) => {
|
||||
config.debug ? console.log('新的版本下载失败') : '';
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
let storage = uni.getStorageSync('wanlshop:update');
|
||||
if (!storage.ignore) {
|
||||
uni.request({
|
||||
url: '/wanlshop/common/update',
|
||||
success: (res) => {
|
||||
if (res.data !== null) {
|
||||
// 获取本地缓存
|
||||
if (Number(config.versionCode) !== Number(res.data.versionCode)) {
|
||||
let link = false;
|
||||
// 写入全局数据
|
||||
res.data.content = res.data.content.replace(/(\r\n)|(\n)/g, '<br>');
|
||||
commit('edit', {data: res.data, index: 'data'});
|
||||
// 下载链接
|
||||
if (plus.os.name.toLowerCase() === 'ios') {
|
||||
if (res.data.iosLink && res.data.iosLink !== '') {
|
||||
commit('edit', {data: {url: config.cdnurl + res.data.iosLink, type: res.data.iosLink.match(RegExp(/.wgt/)) ? 'wgt' : 'url'}, index: 'link'});
|
||||
link = true;
|
||||
}
|
||||
} else {
|
||||
if (res.data.androidLink && res.data.androidLink !== '') {
|
||||
commit('edit', {data: {url: config.cdnurl + res.data.androidLink, type: res.data.androidLink.match(RegExp(/.wgt/)) ? 'wgt' : 'url'}, index: 'link'});
|
||||
link = true;
|
||||
}
|
||||
}
|
||||
// 更新方式
|
||||
res.data.enforce === 1 ? (link && dispatch('download')) : (link && commit('edit', {data: true, index: 'update'}));
|
||||
}else{
|
||||
// 如果有缓存删除
|
||||
if (storage.path) {
|
||||
uni.removeSavedFile({
|
||||
filePath: storage.path,
|
||||
success: (res) => {
|
||||
uni.removeStorageSync('wanlshop:update');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}else{
|
||||
config.debug ? console.log('暂未发现任何更新版本') : '';
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
async download({state, commit, dispatch}) {
|
||||
// #ifdef APP-PLUS
|
||||
let storage = uni.getStorageSync('wanlshop:update');
|
||||
let link = state.link;
|
||||
let download = state.download;
|
||||
// 判断是否下载过,下载过安装
|
||||
if (storage.path) {
|
||||
config.debug ? console.log('已经下载过,未安装') : '';
|
||||
commit('edit', {data: false, index: 'update'});
|
||||
if (link.type == 'wgt') {
|
||||
download.path = storage.path;
|
||||
if (state.data.enforce === 1) {
|
||||
dispatch('install');
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '更新尚未完成',
|
||||
content: '没有完成安装或安装的版本号不是最新!是否要继续安装更新包呢?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
dispatch('install');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}else if(link.type == 'url'){
|
||||
plus.runtime.openURL(link.url);
|
||||
}
|
||||
}else{
|
||||
// 判断下载类型
|
||||
if (link.type == 'wgt') {
|
||||
download.start = true;
|
||||
// 创建下载任务对象
|
||||
state.task = uni.downloadFile({
|
||||
url: link.url,
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200) {
|
||||
// 保存下载的安装包
|
||||
uni.saveFile({
|
||||
tempFilePath: res.tempFilePath,
|
||||
success: (file) => {
|
||||
// 本地缓存
|
||||
uni.setStorage({
|
||||
key: 'wanlshop:update',
|
||||
data: {
|
||||
path: file.savedFilePath,
|
||||
ignore: false
|
||||
}
|
||||
});
|
||||
// 保存地址
|
||||
download.path = file.savedFilePath;
|
||||
// 任务完成,关闭下载任务
|
||||
state.task.abort();
|
||||
state.task = null;
|
||||
download.start = false;
|
||||
// 进行安装
|
||||
dispatch('install');
|
||||
}
|
||||
});
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: `有更新,但更新文件异常:${link.url}`,
|
||||
icon: 'none',
|
||||
duration: 5000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
// 进度条更新
|
||||
state.task.onProgressUpdate((res) => {
|
||||
// 下载进度百分比
|
||||
download.progress = res.progress;
|
||||
// 已经下载的数据长度,单位 Bytes
|
||||
download.totalBytesWritten = res.totalBytesWritten;
|
||||
// 预期需要下载的数据总长度,单位 Bytes
|
||||
download.totalBytesExpectedToWrite = res.totalBytesExpectedToWrite;
|
||||
});
|
||||
}else if(link.type == 'url'){
|
||||
// 弹出更新
|
||||
config.debug ? console.log('弹出更新') : '';
|
||||
plus.runtime.openURL(link.url);
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
async install({state, commit}) {
|
||||
config.debug ? console.log('开始安装') : '';
|
||||
// #ifdef APP-PLUS
|
||||
let download = state.download;
|
||||
let force = state.update ? {} : {force: true};
|
||||
// 更新状态
|
||||
download.install = true;
|
||||
// 安装更新
|
||||
plus.runtime.install(download.path, force, function() {
|
||||
// 更新状态
|
||||
commit('edit', {data: false, index: 'update'});
|
||||
download.install = false;
|
||||
// 更新提示
|
||||
uni.showModal({
|
||||
title: '升级成功',
|
||||
content: '应用将重启以完成更新',
|
||||
showCancel: false,
|
||||
complete: () => {
|
||||
plus.runtime.restart();
|
||||
}
|
||||
});
|
||||
}, function(e) {
|
||||
// 更新状态
|
||||
download.install = false;
|
||||
uni.showToast({
|
||||
title: `安装失败:${e.message}`,
|
||||
icon: 'none',
|
||||
duration: 8000
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
// 忽略升级
|
||||
async ignore({state, commit}) {
|
||||
// 本地缓存
|
||||
uni.setStorage({
|
||||
key: 'wanlshop:update',
|
||||
data: {
|
||||
path: null,
|
||||
ignore: true
|
||||
}
|
||||
});
|
||||
commit('edit', {data: false, index: 'update'});
|
||||
}
|
||||
}
|
||||
};
|
||||
88
store/modules/user.js
Normal file
88
store/modules/user.js
Normal file
@ -0,0 +1,88 @@
|
||||
/**
|
||||
* WanlShop状态管理器 - 用户管理
|
||||
*
|
||||
* @ author 深圳前海万联科技有限公司 <wanlshop@i36k.com>
|
||||
* < 程序仅用作FastAdmin付费插件API测试使用,非FastAdmin购买授权,未经版权所有权人书面许可,不能用于商业用途!>
|
||||
* @ link http://www.wanlshop.com
|
||||
* @ 2020年9月29日19:00:46
|
||||
* @ version 1.0.0
|
||||
**/
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
id: 0, //用户ID
|
||||
isLogin: false, // 登录状态
|
||||
username: '', // 用户名
|
||||
nickname: '', // 昵称
|
||||
mobile: '', // 手机号
|
||||
avatar: '', // 默认头像
|
||||
level: 0, // 等级
|
||||
gender: 0, // 性别
|
||||
birthday: '', // 生日
|
||||
bio: '', // 签名
|
||||
money: '0.00', // 余额
|
||||
score: 0, // 积分
|
||||
successions: '', // 连续登录天数
|
||||
maxsuccessions: '', // 最大连续登录天数
|
||||
prevtime: '', // 上次登录时间
|
||||
logintime: '', // 登录时间
|
||||
loginip: '', // 加入IP
|
||||
jointime: '', // 加入时间
|
||||
token: '', // 令牌
|
||||
pushs: true, // 推送
|
||||
shock: true, // 震动
|
||||
voice: true, // 提示音
|
||||
redpocket:0,//红包
|
||||
vip: 0,
|
||||
vipout_time: 0,
|
||||
},
|
||||
mutations: {
|
||||
setUserInfo(state, payload) {
|
||||
for (let i in payload) {
|
||||
for (let j in state) {
|
||||
if (i === j) {
|
||||
state[j] = payload[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
uni.setStorageSync("wanlshop:user", state);
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async login({state, commit, dispatch, rootState}, data) {
|
||||
commit('setUserInfo', data.userinfo);
|
||||
state.isLogin = true; // 登录状态强制 开启
|
||||
// 根据notice.vue 而知,fastadmin没有此三项默认字段,手动添加,想同步修改该这两处即可
|
||||
state.pushs = true; // 推送
|
||||
state.voice = true; // 提示音
|
||||
state.shock = true; // 震动
|
||||
uni.setStorageSync("wanlshop:user", state);
|
||||
if(uni.getStorageSync('shareId')){
|
||||
// 调用绑定人接口
|
||||
uni.request({
|
||||
url: '/user/bindSquireid',
|
||||
method: 'POST',
|
||||
data:{
|
||||
squire_id:uni.getStorageSync('shareId')
|
||||
},
|
||||
success: res => {}
|
||||
});
|
||||
}else{
|
||||
uni.setStorageSync('shareId',data.userinfo.id)
|
||||
}
|
||||
// 统计信息
|
||||
dispatch('statistics', data.statistics)
|
||||
},
|
||||
async statistics({state, dispatch, rootState}, payload){
|
||||
let states = rootState.statistics;
|
||||
for (let i in payload) {
|
||||
for (let j in states) {
|
||||
if (i === j) {
|
||||
states[j] = payload[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
uni.setStorageSync("wanlshop:statis", states);
|
||||
}
|
||||
}
|
||||
};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/appointTime.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/appointTime.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/commonUpload.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/commonUpload.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/imgUpload.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/imgUpload.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/linzq-citySelect/linzq-citySelect.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/linzq-citySelect/linzq-citySelect.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/feedback/index.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/feedback/index.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/cancleOrder.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/cancleOrder.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/apply.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/apply.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/editInfo.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/editInfo.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/orderConfig.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/orderConfig.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/priceRecord.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/priceRecord.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/pay.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/pay.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/poster/sharePoster.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/poster/sharePoster.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/poster/wanl-poster.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/poster/wanl-poster.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,8 +1,8 @@
|
||||
|
||||
var isReady=false;var onReadyCallbacks=[];
|
||||
var isServiceReady=false;var onServiceReadyCallbacks=[];
|
||||
var __uniConfig = {"pages":["pages/index/index","pages/mine/mine","pages/mine/edituser","pages/type/type","pages/login/authorize","pages/login/login","pages/address/list","pages/address/detail","pages/about/about","pages/person/add","pages/person/edit","pages/person/orderlist","pages/person/qiangdan","pages/person/orderinfo","pages/order/order","pages/order/detail","pages/exchange/createorder","pages/exchange/orderdetail","pages/exchange/orderlist","pages/exchange/goodslist","pages/exchange/goodsdetail","pages/mine/point_list","pages/question/index","pages/mine/orderConfig","pages/mine/priceRecord","pages/mine/apply","pages/feedback/index","pages/mine/editInfo","pages/order/pay"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app1","navigationBarBackgroundColor":"#fff","backgroundColor":"#fff"},"tabBar":{"color":"#333333","selectedColor":"#00a73b","backgroundColor":"#ffffff","list":[{"pagePath":"pages/index/index","text":"首页","iconPath":"static/img/home.png","selectedIconPath":"static/img/home_select.png"},{"pagePath":"pages/order/order","text":"订单","iconPath":"static/img/order.png","selectedIconPath":"static/img/order_select.png"},{"pagePath":"pages/mine/mine","text":"我的","iconPath":"static/img/mine.png","selectedIconPath":"static/img/mine1.png"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"回收小程序","compilerVersion":"4.76","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
||||
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false,"navigationStyle":"custom"}},{"path":"/pages/mine/mine","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的","navigationStyle":"custom"}},{"path":"/pages/mine/edituser","meta":{},"window":{"navigationBarTitleText":"用户信息","enablePullDownRefresh":false}},{"path":"/pages/type/type","meta":{},"window":{"navigationBarTitleText":"回收预约","enablePullDownRefresh":false}},{"path":"/pages/login/authorize","meta":{},"window":{"navigationBarTitleText":"登录","enablePullDownRefresh":false}},{"path":"/pages/login/login","meta":{},"window":{"navigationBarTitleText":"登录","enablePullDownRefresh":false,"navigationStyle":"custom"}},{"path":"/pages/address/list","meta":{},"window":{"navigationBarTitleText":"地址管理"}},{"path":"/pages/address/detail","meta":{},"window":{"navigationBarTitleText":"修改地址"}},{"path":"/pages/about/about","meta":{},"window":{"navigationBarTitleText":"关于我们"}},{"path":"/pages/person/add","meta":{},"window":{"navigationBarTitleText":"成为回收员"}},{"path":"/pages/person/edit","meta":{},"window":{"navigationBarTitleText":"回收员信息"}},{"path":"/pages/person/orderlist","meta":{},"window":{"navigationBarTitleText":"回收员订单"}},{"path":"/pages/person/qiangdan","meta":{},"window":{"navigationBarTitleText":"抢单大厅","enablePullDownRefresh":false}},{"path":"/pages/person/orderinfo","meta":{},"window":{"navigationBarTitleText":"订单详情","enablePullDownRefresh":false}},{"path":"/pages/order/order","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"用户订单","enablePullDownRefresh":false}},{"path":"/pages/order/detail","meta":{},"window":{"navigationBarTitleText":"订单详情","enablePullDownRefresh":false}},{"path":"/pages/exchange/createorder","meta":{},"window":{"navigationBarTitleText":"兑换订单","enablePullDownRefresh":false}},{"path":"/pages/exchange/orderdetail","meta":{},"window":{"navigationBarTitleText":"订单详情","enablePullDownRefresh":false}},{"path":"/pages/exchange/orderlist","meta":{},"window":{"navigationBarTitleText":"订单列表","enablePullDownRefresh":false}},{"path":"/pages/exchange/goodslist","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/exchange/goodsdetail","meta":{},"window":{"navigationBarTitleText":"详情","enablePullDownRefresh":false}},{"path":"/pages/mine/point_list","meta":{},"window":{"navigationBarTitleText":"积分明细","enablePullDownRefresh":false}},{"path":"/pages/question/index","meta":{},"window":{"navigationBarTitleText":"常见问题","enablePullDownRefresh":false}},{"path":"/pages/mine/orderConfig","meta":{},"window":{"navigationBarTitleText":"接单设置","enablePullDownRefresh":false}},{"path":"/pages/mine/priceRecord","meta":{},"window":{"navigationBarTitleText":"资金记录","enablePullDownRefresh":false}},{"path":"/pages/mine/apply","meta":{},"window":{"navigationBarTitleText":"代理加盟","enablePullDownRefresh":false}},{"path":"/pages/feedback/index","meta":{},"window":{"navigationBarTitleText":"意见反馈","enablePullDownRefresh":false}},{"path":"/pages/mine/editInfo","meta":{},"window":{"navigationBarTitleText":"信息编辑","enablePullDownRefresh":false}},{"path":"/pages/order/pay","meta":{},"window":{"navigationBarTitleText":"支付订单","enablePullDownRefresh":false}}];
|
||||
var __uniConfig = {"pages":["pages/index/index","pages/mine/mine","pages/mine/edituser","pages/type/type","pages/login/authorize","pages/login/login","pages/address/list","pages/address/detail","pages/about/about","pages/person/add","pages/person/edit","pages/person/orderlist","pages/person/qiangdan","pages/person/orderinfo","pages/order/order","pages/order/detail","pages/exchange/createorder","pages/exchange/orderdetail","pages/exchange/orderlist","pages/exchange/goodslist","pages/exchange/goodsdetail","pages/mine/point_list","pages/question/index","pages/mine/orderConfig","pages/mine/priceRecord","pages/mine/apply","pages/feedback/index","pages/mine/editInfo","pages/order/pay","pages/poster/sharePoster"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app1","navigationBarBackgroundColor":"#fff","backgroundColor":"#fff"},"tabBar":{"color":"#333333","selectedColor":"#00a73b","backgroundColor":"#ffffff","list":[{"pagePath":"pages/index/index","text":"首页","iconPath":"static/img/home.png","selectedIconPath":"static/img/home_select.png"},{"pagePath":"pages/order/order","text":"订单","iconPath":"static/img/order.png","selectedIconPath":"static/img/order_select.png"},{"pagePath":"pages/mine/mine","text":"我的","iconPath":"static/img/mine.png","selectedIconPath":"static/img/mine1.png"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"回收小程序","compilerVersion":"4.76","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
||||
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false,"navigationStyle":"custom"}},{"path":"/pages/mine/mine","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"我的","navigationStyle":"custom"}},{"path":"/pages/mine/edituser","meta":{},"window":{"navigationBarTitleText":"用户信息","enablePullDownRefresh":false}},{"path":"/pages/type/type","meta":{},"window":{"navigationBarTitleText":"回收预约","enablePullDownRefresh":false}},{"path":"/pages/login/authorize","meta":{},"window":{"navigationBarTitleText":"登录","enablePullDownRefresh":false}},{"path":"/pages/login/login","meta":{},"window":{"navigationBarTitleText":"登录","enablePullDownRefresh":false,"navigationStyle":"custom"}},{"path":"/pages/address/list","meta":{},"window":{"navigationBarTitleText":"地址管理"}},{"path":"/pages/address/detail","meta":{},"window":{"navigationBarTitleText":"修改地址"}},{"path":"/pages/about/about","meta":{},"window":{"navigationBarTitleText":"关于我们"}},{"path":"/pages/person/add","meta":{},"window":{"navigationBarTitleText":"成为回收员"}},{"path":"/pages/person/edit","meta":{},"window":{"navigationBarTitleText":"回收员信息"}},{"path":"/pages/person/orderlist","meta":{},"window":{"navigationBarTitleText":"回收员订单"}},{"path":"/pages/person/qiangdan","meta":{},"window":{"navigationBarTitleText":"抢单大厅","enablePullDownRefresh":false}},{"path":"/pages/person/orderinfo","meta":{},"window":{"navigationBarTitleText":"订单详情","enablePullDownRefresh":false}},{"path":"/pages/order/order","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"用户订单","enablePullDownRefresh":false}},{"path":"/pages/order/detail","meta":{},"window":{"navigationBarTitleText":"订单详情","enablePullDownRefresh":false}},{"path":"/pages/exchange/createorder","meta":{},"window":{"navigationBarTitleText":"兑换订单","enablePullDownRefresh":false}},{"path":"/pages/exchange/orderdetail","meta":{},"window":{"navigationBarTitleText":"订单详情","enablePullDownRefresh":false}},{"path":"/pages/exchange/orderlist","meta":{},"window":{"navigationBarTitleText":"订单列表","enablePullDownRefresh":false}},{"path":"/pages/exchange/goodslist","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/exchange/goodsdetail","meta":{},"window":{"navigationBarTitleText":"详情","enablePullDownRefresh":false}},{"path":"/pages/mine/point_list","meta":{},"window":{"navigationBarTitleText":"积分明细","enablePullDownRefresh":false}},{"path":"/pages/question/index","meta":{},"window":{"navigationBarTitleText":"常见问题","enablePullDownRefresh":false}},{"path":"/pages/mine/orderConfig","meta":{},"window":{"navigationBarTitleText":"接单设置","enablePullDownRefresh":false}},{"path":"/pages/mine/priceRecord","meta":{},"window":{"navigationBarTitleText":"资金记录","enablePullDownRefresh":false}},{"path":"/pages/mine/apply","meta":{},"window":{"navigationBarTitleText":"代理加盟","enablePullDownRefresh":false}},{"path":"/pages/feedback/index","meta":{},"window":{"navigationBarTitleText":"意见反馈","enablePullDownRefresh":false}},{"path":"/pages/mine/editInfo","meta":{},"window":{"navigationBarTitleText":"信息编辑","enablePullDownRefresh":false}},{"path":"/pages/order/pay","meta":{},"window":{"navigationBarTitleText":"支付订单","enablePullDownRefresh":false}},{"path":"/pages/poster/sharePoster","meta":{},"window":{"navigationBarTitleText":"推广二维码","enablePullDownRefresh":false}}];
|
||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
|
||||
|
||||
2946
unpackage/dist/dev/app-plus/app-service.js
vendored
2946
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2798
unpackage/dist/dev/app-plus/app-view.js
vendored
2798
unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
BIN
unpackage/dist/dev/app-plus/static/back_img.png
vendored
Normal file
BIN
unpackage/dist/dev/app-plus/static/back_img.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
BIN
unpackage/dist/dev/app-plus/static/dingweis.png
vendored
Normal file
BIN
unpackage/dist/dev/app-plus/static/dingweis.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
13
unpackage/dist/dev/mp-weixin/app.json
vendored
13
unpackage/dist/dev/mp-weixin/app.json
vendored
@ -5,6 +5,7 @@
|
||||
"pages/mine/edituser",
|
||||
"pages/type/type",
|
||||
"pages/login/authorize",
|
||||
"pages/login/login",
|
||||
"pages/address/list",
|
||||
"pages/address/detail",
|
||||
"pages/about/about",
|
||||
@ -21,7 +22,14 @@
|
||||
"pages/exchange/goodslist",
|
||||
"pages/exchange/goodsdetail",
|
||||
"pages/mine/point_list",
|
||||
"pages/question/index"
|
||||
"pages/question/index",
|
||||
"pages/mine/orderConfig",
|
||||
"pages/mine/priceRecord",
|
||||
"pages/mine/apply",
|
||||
"pages/feedback/index",
|
||||
"pages/mine/editInfo",
|
||||
"pages/order/pay",
|
||||
"pages/poster/sharePoster"
|
||||
],
|
||||
"subPackages": [],
|
||||
"window": {
|
||||
@ -61,7 +69,8 @@
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos": [
|
||||
"chooseLocation"
|
||||
"chooseLocation",
|
||||
"getLocation"
|
||||
],
|
||||
"usingComponents": {}
|
||||
}
|
||||
11
unpackage/dist/dev/mp-weixin/common/main.js
vendored
11
unpackage/dist/dev/mp-weixin/common/main.js
vendored
@ -16,6 +16,8 @@ var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/run
|
||||
__webpack_require__(/*! uni-pages */ 26);
|
||||
var _App = _interopRequireDefault(__webpack_require__(/*! ./App.vue */ 27));
|
||||
var Api = _interopRequireWildcard(__webpack_require__(/*! ./config/api.js */ 33));
|
||||
var _mpShare = _interopRequireDefault(__webpack_require__(/*! ./common/libs/mixin/mpShare.js */ 680));
|
||||
var _store = _interopRequireDefault(__webpack_require__(/*! ./store */ 681));
|
||||
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
|
||||
var _uviewUi = _interopRequireDefault(__webpack_require__(/*! uview-ui */ 34));
|
||||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
||||
@ -27,7 +29,9 @@ wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
|
||||
_vue.default.config.productionTip = false;
|
||||
_vue.default.prototype.$api = Api;
|
||||
_vue.default.prototype.path = "https://admin.dbcdq.cn"; //挂载在 Vue 实例上
|
||||
_vue.default.prototype.$store = _store.default; //挂载在 Vue 实例上
|
||||
_vue.default.use(_uviewUi.default);
|
||||
_vue.default.mixin(_mpShare.default);
|
||||
_App.default.mpType = 'app';
|
||||
var app = new _vue.default(_objectSpread({}, _App.default));
|
||||
createApp(app).$mount();
|
||||
@ -107,6 +111,13 @@ Object.defineProperty(exports, "__esModule", {
|
||||
exports.default = void 0;
|
||||
var _default = {
|
||||
onLaunch: function onLaunch() {
|
||||
// var token = uni.getStorageSync('userToken');
|
||||
// console.log(token,'--------')
|
||||
// if(!token){
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/login/login'
|
||||
// })
|
||||
// }
|
||||
var self = this;
|
||||
wx.getSystemInfo({
|
||||
success: function success(res) {},
|
||||
|
||||
@ -764,3 +764,6 @@ input {
|
||||
uni-tabbar.uni-tabbar-bottom .uni-tabbar {
|
||||
display: none;
|
||||
}
|
||||
.topStatus {
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
5135
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
5135
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["components/CustomTabBar"],{
|
||||
|
||||
/***/ 344:
|
||||
/***/ 416:
|
||||
/*!************************************************************!*\
|
||||
!*** D:/work/liuqing/recycapp/components/CustomTabBar.vue ***!
|
||||
\************************************************************/
|
||||
@ -9,10 +9,10 @@
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _CustomTabBar_vue_vue_type_template_id_25678e6a_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CustomTabBar.vue?vue&type=template&id=25678e6a&scoped=true& */ 345);
|
||||
/* harmony import */ var _CustomTabBar_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CustomTabBar.vue?vue&type=script&lang=js& */ 347);
|
||||
/* harmony import */ var _CustomTabBar_vue_vue_type_template_id_25678e6a_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CustomTabBar.vue?vue&type=template&id=25678e6a&scoped=true& */ 417);
|
||||
/* harmony import */ var _CustomTabBar_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CustomTabBar.vue?vue&type=script&lang=js& */ 419);
|
||||
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _CustomTabBar_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _CustomTabBar_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
||||
/* harmony import */ var _CustomTabBar_vue_vue_type_style_index_0_id_25678e6a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CustomTabBar.vue?vue&type=style&index=0&id=25678e6a&scoped=true&lang=css& */ 350);
|
||||
/* harmony import */ var _CustomTabBar_vue_vue_type_style_index_0_id_25678e6a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CustomTabBar.vue?vue&type=style&index=0&id=25678e6a&scoped=true&lang=css& */ 422);
|
||||
/* harmony import */ var _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 32);
|
||||
|
||||
var renderjs
|
||||
@ -41,7 +41,7 @@ component.options.__file = "components/CustomTabBar.vue"
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 345:
|
||||
/***/ 417:
|
||||
/*!*******************************************************************************************************!*\
|
||||
!*** D:/work/liuqing/recycapp/components/CustomTabBar.vue?vue&type=template&id=25678e6a&scoped=true& ***!
|
||||
\*******************************************************************************************************/
|
||||
@ -50,7 +50,7 @@ component.options.__file = "components/CustomTabBar.vue"
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_template_id_25678e6a_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./CustomTabBar.vue?vue&type=template&id=25678e6a&scoped=true& */ 346);
|
||||
/* harmony import */ var _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_template_id_25678e6a_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./CustomTabBar.vue?vue&type=template&id=25678e6a&scoped=true& */ 418);
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_template_id_25678e6a_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
|
||||
|
||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_template_id_25678e6a_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
|
||||
@ -63,7 +63,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 346:
|
||||
/***/ 418:
|
||||
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/work/liuqing/recycapp/components/CustomTabBar.vue?vue&type=template&id=25678e6a&scoped=true& ***!
|
||||
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
@ -90,7 +90,7 @@ render._withStripped = true
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 347:
|
||||
/***/ 419:
|
||||
/*!*************************************************************************************!*\
|
||||
!*** D:/work/liuqing/recycapp/components/CustomTabBar.vue?vue&type=script&lang=js& ***!
|
||||
\*************************************************************************************/
|
||||
@ -99,14 +99,14 @@ render._withStripped = true
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./CustomTabBar.vue?vue&type=script&lang=js& */ 348);
|
||||
/* harmony import */ var _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./CustomTabBar.vue?vue&type=script&lang=js& */ 420);
|
||||
/* harmony import */ var _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
||||
/* harmony default export */ __webpack_exports__["default"] = (_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 348:
|
||||
/***/ 420:
|
||||
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/work/liuqing/recycapp/components/CustomTabBar.vue?vue&type=script&lang=js& ***!
|
||||
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
@ -120,7 +120,7 @@ Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _vuex = __webpack_require__(/*! vuex */ 349);
|
||||
var _vuex = __webpack_require__(/*! vuex */ 421);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -286,7 +286,7 @@ exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 350:
|
||||
/***/ 422:
|
||||
/*!*********************************************************************************************************************!*\
|
||||
!*** D:/work/liuqing/recycapp/components/CustomTabBar.vue?vue&type=style&index=0&id=25678e6a&scoped=true&lang=css& ***!
|
||||
\*********************************************************************************************************************/
|
||||
@ -295,14 +295,14 @@ exports.default = _default;
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_style_index_0_id_25678e6a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--6-oneOf-1-3!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./CustomTabBar.vue?vue&type=style&index=0&id=25678e6a&scoped=true&lang=css& */ 351);
|
||||
/* harmony import */ var _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_style_index_0_id_25678e6a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--6-oneOf-1-3!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../software/HBuilderX.4.76.2025082103/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./CustomTabBar.vue?vue&type=style&index=0&id=25678e6a&scoped=true&lang=css& */ 423);
|
||||
/* harmony import */ var _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_style_index_0_id_25678e6a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_style_index_0_id_25678e6a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_style_index_0_id_25678e6a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_style_index_0_id_25678e6a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
||||
/* harmony default export */ __webpack_exports__["default"] = (_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_software_HBuilderX_4_76_2025082103_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_CustomTabBar_vue_vue_type_style_index_0_id_25678e6a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 351:
|
||||
/***/ 423:
|
||||
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/work/liuqing/recycapp/components/CustomTabBar.vue?vue&type=style&index=0&id=25678e6a&scoped=true&lang=css& ***!
|
||||
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
@ -321,7 +321,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
'components/CustomTabBar-create-component',
|
||||
{
|
||||
'components/CustomTabBar-create-component':(function(module, exports, __webpack_require__){
|
||||
__webpack_require__('2')['createComponent'](__webpack_require__(344))
|
||||
__webpack_require__('2')['createComponent'](__webpack_require__(416))
|
||||
})
|
||||
},
|
||||
[['components/CustomTabBar-create-component']]
|
||||
|
||||
@ -1 +1 @@
|
||||
<view class="data-v-25678e6a"><view class="custom-tab-bar data-v-25678e6a"><view data-event-opts="{{[['tap',[['switchTab',['pages/index/index']]]]]}}" class="tab-bar-item data-v-25678e6a" bindtap="__e"><image src="{{currentPage=='0'?path+'/assets/img/icon/index_check.png':path+'/assets/img/icon/index.png'}}" class="data-v-25678e6a"></image><text class="data-v-25678e6a">首页</text></view><view data-event-opts="{{[['tap',[['linkOrder',['$event']]]]]}}" class="lightBox flex-center data-v-25678e6a" bindtap="__e"><image src="{{path+'/assets/img/icon/light.png'}}" class="data-v-25678e6a"></image><view class="data-v-25678e6a">闪电评估</view></view><view data-event-opts="{{[['tap',[['switchTab',['pages/mine/mine']]]]]}}" class="tab-bar-item data-v-25678e6a" bindtap="__e"><image src="{{currentPage=='1'?path+'/assets/img/icon/my_check.png':path+'/assets/img/icon/my.png'}}" class="data-v-25678e6a"></image><text class="data-v-25678e6a">我的</text></view></view><view style="height:120rpx;" class="data-v-25678e6a"></view></view>
|
||||
<view class="data-v-25678e6a"><view class="custom-tab-bar data-v-25678e6a"><view data-event-opts="{{[['tap',[['switchTab',['pages/index/index']]]]]}}" class="tab-bar-item data-v-25678e6a" bindtap="__e"><image src="{{currentPage=='0'?path+'/assets/img/icon/index_check.png':path+'/assets/img/icon/index.png'}}" class="data-v-25678e6a"></image><text class="data-v-25678e6a">首页</text></view><view data-event-opts="{{[['tap',[['linkOrder',['$event']]]]]}}" class="lightBox flex-center data-v-25678e6a" bindtap="__e"><image src="{{path+'/assets/img/icon/ID.png'}}" class="data-v-25678e6a"></image><view class="data-v-25678e6a">闪电评估</view></view><view data-event-opts="{{[['tap',[['switchTab',['pages/mine/mine']]]]]}}" class="tab-bar-item data-v-25678e6a" bindtap="__e"><image src="{{currentPage=='1'?path+'/assets/img/icon/my_check.png':path+'/assets/img/icon/my.png'}}" class="data-v-25678e6a"></image><text class="data-v-25678e6a">我的</text></view></view><view style="height:120rpx;" class="data-v-25678e6a"></view></view>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user