Commit 144b67c9 authored by 000's avatar 000

Merge branch 'dev' into 'feature_recommend_q'

Dev

See merge request !6
parents d7b08afb a9f20e26
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
var rsult=hgService.checkIfLimited(); //检测是否限制后台运行 var rsult=hgService.checkIfLimited(); //检测是否限制后台运行
if(rsult.isLimit){ //限制了后台运行 if(rsult.isLimit){ //限制了后台运行
hgService.requestIgnoreLimit(); //申请 hgService.requestIgnoreLimit(); //申请
...@@ -76,7 +75,6 @@ ...@@ -76,7 +75,6 @@
//var globalEvent = uni.requireNativePlugin('globalEvent'); //全局事件回调 任务启动时间,会有一定延时 一般一分钟内。 //var globalEvent = uni.requireNativePlugin('globalEvent'); //全局事件回调 任务启动时间,会有一定延时 一般一分钟内。
}, },
// hgServiceFun(){ // hgServiceFun(){
// const pushLive = uni.requireNativePlugin('push-live'); // const pushLive = uni.requireNativePlugin('push-live');
// pushLive.startService({ //启动服务 // pushLive.startService({ //启动服务
......
...@@ -176,11 +176,8 @@ ...@@ -176,11 +176,8 @@
var platform = uni.getSystemInfoSync().platform var platform = uni.getSystemInfoSync().platform
//根据当前平台去后台检测版本号 //根据当前平台去后台检测版本号
//这是我的逻辑,自己自定义 //这是我的逻辑,自己自定义
if(debug.isdebug){ if(!debug.isdebug) {
}else {
//正式版的APP更新处理 //正式版的APP更新处理
uni.request({ uni.request({
...@@ -192,30 +189,11 @@ ...@@ -192,30 +189,11 @@
user_token:this.$store.state.token, user_token:this.$store.state.token,
}, },
success: (result) => { success: (result) => {
console.log(result,"result"); let appVersion = widgetInfo.versionCode;//当前版本
var str = widgetInfo.version; let nesVersion = result.data.data.version;//最新版本
var str1 = "";
var dian = 0;
for(let i =0;i<str.length;i++){
if(str[i]=="."){
if(dian==1){
}else{
str1+=str[i];
}
dian++;
}else{
str1+=str[i];
}
}
let appVersion = parseFloat(str1);//当前版本
let nesVersion = parseFloat(result.data.data.version);//最新版本
if (nesVersion > appVersion) { if (nesVersion > appVersion) {
if (result.data.data.pkgurl != '' && result.data.data.downloadurl == '') { if (result.data.data.pkgurl != '' && result.data.data.downloadurl == '') {
this.type="pkg"; this.type="pkg";
this.url=result.data.data.pkgurl; this.url=result.data.data.pkgurl;
this.title="1"; this.title="1";
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
//"appid" : "__UNI__FC9419E", //"appid" : "__UNI__FC9419E",
"appid" : "__UNI__1EA80F1", //这个是 web "appid" : "__UNI__1EA80F1", //这个是 web
"description" : "商家", "description" : "商家",
"versionName" : "1.0.99", "versionName" : "1.102",
"versionCode" : 199, "versionCode" : 1102,
"transformPx" : false, "transformPx" : false,
"compatible" : { "compatible" : {
"ignoreVersion" : true, //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持 "ignoreVersion" : true, //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
"runtimeVersion" : "2.9.3,2.9.7,2.9.8", //兼容的uni-app运行环境版本号,多个版本使用,分割 "runtimeVersion" : "2.9.8,2.9.11,3.0.0,3.0.1", //兼容的uni-app运行环境版本号,多个版本使用,分割
"compilerVersion" : "2.9.8" //兼容的编译器版本号 "compilerVersion" : "2.9.8" //兼容的编译器版本号
}, },
/* 5+App特有相关weex */ /* 5+App特有相关weex */
...@@ -164,7 +164,22 @@ ...@@ -164,7 +164,22 @@
} }
}, },
"compilerVersion" : 2, "compilerVersion" : 2,
"nativePlugins" : {} "nativePlugins" : {
"HG-Background" : {
"__plugin_info__" : {
"name" : "保活 前台运行",
"description" : "用于提高app存活概率或添加前台显示 q群:219508489",
"platforms" : "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=2203",
"android_package_name" : "com.app.lumastore",
"ios_bundle_id" : "",
"isCloud" : true,
"bought" : 1,
"pid" : "2203",
"parameters" : {}
}
}
}
}, },
/* 快应用特有相关 */ /* 快应用特有相关 */
"quickapp" : {}, "quickapp" : {},
......
...@@ -341,6 +341,7 @@ ...@@ -341,6 +341,7 @@
}, },
data() { data() {
return { return {
linkage_id:'', linkage_id:'',
is_datashow:true, is_datashow:true,
bools:'', bools:'',
...@@ -429,7 +430,13 @@ ...@@ -429,7 +430,13 @@
{} {}
], ],
isShow:false, isShow:false,
chindformList:[], chindformList:[],
myProps:{
label:'cate_name',
value: 'cate_id',
children: '',
},
//上传图片相关的 //上传图片相关的
c_pics: [], c_pics: [],
c_pics1:[], c_pics1:[],
...@@ -611,6 +618,7 @@ ...@@ -611,6 +618,7 @@
} }
}, },
async findEleProduct(results){ async findEleProduct(results){
console.log('查找商品')
uni.showLoading({title:'请稍后'}); uni.showLoading({title:'请稍后'});
let res=await findEleProduct({code:results.code}); let res=await findEleProduct({code:results.code});
...@@ -662,6 +670,8 @@ ...@@ -662,6 +670,8 @@
this.codeDisabled=true;//条形码输入框是否禁止输入 this.codeDisabled=true;//条形码输入框是否禁止输入
this.c_pics=[{code:0,data:res.data.photo,msg:"success",time:"1587101904"}]; this.c_pics=[{code:0,data:res.data.photo,msg:"success",time:"1587101904"}];
// console.log(this.chindformList);
for(var i = 0; i < this.chindformList.length; i++) { for(var i = 0; i < this.chindformList.length; i++) {
if(this.chindformList[i].cate_id==res.data.cate_id){ if(this.chindformList[i].cate_id==res.data.cate_id){
this.cate_name=this.chindformList[i].cate_name; this.cate_name=this.chindformList[i].cate_name;
...@@ -669,6 +679,9 @@ ...@@ -669,6 +679,9 @@
} }
} }
} }
},
myProps(){
}, },
saoma(e){ saoma(e){
uni.scanCode({ uni.scanCode({
...@@ -725,11 +738,11 @@ ...@@ -725,11 +738,11 @@
}, },
confirm(e){ confirm(e){
console.log(e)
this.cate_name = e.item.cate_name; this.cate_name = e.item.cate_name;
this.form.cate_id =e.item.cate_id; this.form.cate_id =e.item.cate_id;
this.index = e.index; this.index = e.index;
}, },
pickerone(){ pickerone(){
this.$refs.picker.show() // 显示 this.$refs.picker.show() // 显示
}, },
...@@ -741,7 +754,8 @@ ...@@ -741,7 +754,8 @@
}, },
//分类选中 //分类选中
bindPickerChange(e){ bindPickerChange(e){
console.info(e.detail.value); console.info(e.detail.value);
console.log(this.chindformList)
this.cate_name = this.chindformList[e.detail.value].cate_name; this.cate_name = this.chindformList[e.detail.value].cate_name;
this.form.cate_id = this.chindformList[e.detail.value].cate_id; this.form.cate_id = this.chindformList[e.detail.value].cate_id;
this.index = e.detail.value; this.index = e.detail.value;
...@@ -760,7 +774,8 @@ ...@@ -760,7 +774,8 @@
}, },
//修改的时候赋初始值 //修改的时候赋初始值
async eleProductInfofun(){ async eleProductInfofun(){
let that=this;
let res = await eleProductInfo({ let res = await eleProductInfo({
product_id:this.product_id, product_id:this.product_id,
}); });
...@@ -800,24 +815,32 @@ ...@@ -800,24 +815,32 @@
this.form.commission = res.data.commission, //返佣比例 this.form.commission = res.data.commission, //返佣比例
this.form.sell_type = res.data.sell_type, // 售卖类型 this.form.sell_type = res.data.sell_type, // 售卖类型
this.form.mandatory = res.data.mandatory this.form.mandatory = res.data.mandatory
this.video_photos=res.data.video_photos;//轮播
this.detail_photos=res.data.detail_photos;//详情 if(typeof res.data.video_photos == 'object'){
res.data.video_photos.map(item=>{ //轮播 this.video_photos=res.data.video_photos;//轮播
this.c_pics1.push({ for(let i in res.data.video_photos){
code:0, this.c_pics1.push({
data:item, code:0,
msg:"success", data:res.data.video_photos[i],
time:"1587101904" msg:"success",
}) time:"1587101904"
}) });
res.data.detail_photos.map(item=>{ //详情 }
this.c_pics2.push({ }
code:0,
data:item,
msg:"success", if(typeof res.data.detail_photos == 'object'){
time:"1587101904" this.detail_photos=res.data.detail_photos;//详情
}) for(let i in res.data.detail_photos){
}) this.c_pics2.push({
code:0,
data:res.data.detail_photos[i],
msg:"success",
time:"1587101904"
});
}
}
//下拉分类 初始值 //下拉分类 初始值
this.chindformList.forEach((item,index)=>{ this.chindformList.forEach((item,index)=>{
if(item.cate_id==res.data.cate_id){ if(item.cate_id==res.data.cate_id){
...@@ -826,6 +849,8 @@ ...@@ -826,6 +849,8 @@
} }
}); });
if(res.data.commodity_type == 'ordinary') { if(res.data.commodity_type == 'ordinary') {
this.ordinary.map(item=>{ this.ordinary.map(item=>{
if(this.linkage_product_id == item.product_id){ if(this.linkage_product_id == item.product_id){
...@@ -890,6 +915,7 @@ ...@@ -890,6 +915,7 @@
// this.$api.msg("秒杀库存或限购数量不能为小数"); // this.$api.msg("秒杀库存或限购数量不能为小数");
// return false; // return false;
// } // }
let can = { let can = {
action:this.product_id==''?'add':'edit', action:this.product_id==''?'add':'edit',
linkage_id:this.linkage_id, linkage_id:this.linkage_id,
...@@ -982,7 +1008,8 @@ ...@@ -982,7 +1008,8 @@
async typeManagerfun(){ async typeManagerfun(){
let res = await typeManager({}); let res = await typeManager({});
if(res.code==0){ if(res.code==0){
this.chindformList = res.data; this.chindformList = res.data;
if(this.product_id!=undefined && this.product_id!=""){ if(this.product_id!=undefined && this.product_id!=""){
this.eleProductInfofun(); this.eleProductInfofun();
} }
......
...@@ -230,9 +230,11 @@ ...@@ -230,9 +230,11 @@
this.goods_list = []; this.goods_list = [];
this.page = 1; this.page = 1;
this.isallshow=false; this.isallshow=false;
this.tabactive = 1,
// this.goods_product_list(); // this.goods_product_list();
this.searchProduct(); this.searchProduct();
}, },
computed: { computed: {
staticUrl () {//静态资源地址 staticUrl () {//静态资源地址
return this.$store.state.staticUrl; return this.$store.state.staticUrl;
......
...@@ -368,15 +368,6 @@ ...@@ -368,15 +368,6 @@
} }
}, },
onLoad() { onLoad() {
getskipShop({
type: 'bld'
}).then(res => {
if (res.code == 0) {
this.is_bld = res.data.is_bld
// this.is_bld = 1
}
})
//显示欢迎回来~ //显示欢迎回来~
setTimeout(() => { setTimeout(() => {
this.$refs.Welcome.show(); this.$refs.Welcome.show();
...@@ -410,6 +401,16 @@ ...@@ -410,6 +401,16 @@
// uni.stopPullDownRefresh();//结束下拉刷新 // uni.stopPullDownRefresh();//结束下拉刷新
}, },
onShow() { onShow() {
getskipShop({
type: 'bld'
}).then(res => {
if (res.code == 0) {
this.is_bld = res.data.is_bld
// this.is_bld = 1
}
})
this.storeIndexfun(); this.storeIndexfun();
...@@ -439,13 +440,21 @@ ...@@ -439,13 +440,21 @@
activity_nucleus(param).then(res => { activity_nucleus(param).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.$api.msg(res.msg); uni.showModal({
title:'提示',
content:res.msg,
showCancel:false,
confirmText:'确定',
success() {
}
})
}else{ }else{
this.$api.msg(res.msg); this.$api.msg(res.msg);
} }
}) })
return; return;
} else if (res.scanType == 'EAN_13') { } else{
uni.request({ uni.request({
url: 'https://www.mxnzp.com/api/barcode/goods/details', //仅为示例,并非真实接口地址。 url: 'https://www.mxnzp.com/api/barcode/goods/details', //仅为示例,并非真实接口地址。
data: { data: {
...@@ -456,9 +465,7 @@ ...@@ -456,9 +465,7 @@
}, },
method: 'GET', method: 'GET',
success: (results) => { success: (results) => {
// console.log(results);
if (results.data.code == 0) { if (results.data.code == 0) {
// this.$api.msg(results.data.msg);
results.isScanCode = false; results.isScanCode = false;
results.code = res.result; results.code = res.result;
uni.navigateTo({ uni.navigateTo({
...@@ -470,12 +477,9 @@ ...@@ -470,12 +477,9 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/addEditEleProduct/addEditEleProduct?results=' + JSON.stringify(results) url: '/pages/addEditEleProduct/addEditEleProduct?results=' + JSON.stringify(results)
}) })
// console.log(results)
} }
}, },
fail: (results) => { fail: (results) => {
// console.log(results);
results.isScanCode = false; results.isScanCode = false;
results.code = res.result; results.code = res.result;
uni.navigateTo({ uni.navigateTo({
...@@ -564,7 +568,6 @@ ...@@ -564,7 +568,6 @@
this.is_luck_draw = res.data.shop_info.is_luck_draw this.is_luck_draw = res.data.shop_info.is_luck_draw
this.money_type = res.data.shop_info.money_type this.money_type = res.data.shop_info.money_type
this.activity_type = res.data.shop_info.activity_type //判断是否有秒杀资格 this.activity_type = res.data.shop_info.activity_type //判断是否有秒杀资格
console.log(this.shop_type,'aa')
} else { } else {
this.$api.msg(res.msg); this.$api.msg(res.msg);
} }
......
...@@ -333,6 +333,6 @@ ...@@ -333,6 +333,6 @@
} }
.orderlist{ .orderlist{
padding: 100upx 24upx 0 24upx;box-sizing: border-box; padding: 40upx 24upx 0 24upx;box-sizing: border-box;
} }
</style> </style>
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
name: '', name: '',
mobile: '', mobile: '',
address: '', address: '',
type: '',//退款退款 退款 type: 1,//同意
refund_id: '' refund_id: ''
} }
}, },
...@@ -42,10 +42,8 @@ export default { ...@@ -42,10 +42,8 @@ export default {
}, },
onLoad(option){ onLoad(option){
// console.log(option) console.log(option)
this.type = option.type;
this.refund_id = option.refund_id; this.refund_id = option.refund_id;
// console.log(this.refund_id,this.type)
}, },
methods: { methods: {
refundExamine(){//提交 refundExamine(){//提交
......
...@@ -223,6 +223,7 @@ export default { ...@@ -223,6 +223,7 @@ export default {
this.is_loading_done = false; this.is_loading_done = false;
this.pageNum = 0; this.pageNum = 0;
this.order = []; this.order = [];
this.refundOrder=[];
this.initializedata(); this.initializedata();
}, },
onUnload() { onUnload() {
...@@ -355,6 +356,7 @@ export default { ...@@ -355,6 +356,7 @@ export default {
let is_dianping = event.currentTarget.dataset.is_dianping; let is_dianping = event.currentTarget.dataset.is_dianping;
let sale_status = event.currentTarget.dataset.sale_status; let sale_status = event.currentTarget.dataset.sale_status;
this.order = []; this.order = [];
this.refundOrder=[];
this.statusTab = statusTab; this.statusTab = statusTab;
this.tabactive = statusTab; this.tabactive = statusTab;
this.status = status; this.status = status;
...@@ -363,6 +365,9 @@ export default { ...@@ -363,6 +365,9 @@ export default {
this.is_loading_done = false; this.is_loading_done = false;
this.currentTab = event.target.dataset.current; this.currentTab = event.target.dataset.current;
this.pageNum = 0; this.pageNum = 0;
console.log(this.refundOrder,'aaaa');
this.initializedata(); this.initializedata();
}, },
// 拒绝退款原因关闭弹窗 // 拒绝退款原因关闭弹窗
...@@ -637,7 +642,7 @@ export default { ...@@ -637,7 +642,7 @@ export default {
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}); });
this.listDeal2(); //确认收货成功自动刷新售后列表 // this.listDeal2(); //确认收货成功自动刷新售后列表
} else { } else {
this.$api.msg(res.msg); this.$api.msg(res.msg);
} }
......
<template> <template>
<!-- 商家查看自己店铺的订单详情 --> <!-- 商家查看自己店铺的订单详情 -->
<!-- 订单 order --> <!-- 订单 order -->
<view class="shoporderdetale xiangq yocode"> <view class="shoporderdetale xiangq yocode">
<view class="beijingimg" style="height:80px"> <view class="beijingimg" style="height:80px">
<!-- <view class="onetitle">{{detail.orderstatus}}</view> <!-- <view class="onetitle">{{detail.orderstatus}}</view>
<view class="twotitle">{{detail.statusdesc}}</view> --> <view class="twotitle">{{detail.statusdesc}}</view> -->
</view> </view>
<view class="boxs"> <view class="boxs">
<view class="topbox_20 addresone" v-if="detail.delivery_type>=1"> <view class="topbox_20 addresone" v-if="detail.delivery_type>=1">
<view class="ali-c"> <view class="ali-c">
<view class="weizhiimg"> <view class="weizhiimg">
<image class="imgs" src="/static/news/address.png"></image> <image class="imgs" src="/static/news/address.png"></image>
</view> </view>
<view class="flex1 ml-20 addrnamesv"> <view class="flex1 ml-20 addrnamesv">
<view class="sz_30 bt_hei">{{detail.addr.name}} {{detail.addr.mobile}}</view> <view class="sz_30 bt_hei">{{detail.addr.name}} {{detail.addr.mobile}}</view>
<view class="sz_30 bt_hei mt-10">{{detail.addr.addr}}</view> <view class="sz_30 bt_hei mt-10">{{detail.addr.addr}}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="topbox_20 mt-60 addresone" v-else> <view class="topbox_20 mt-60 addresone" v-else>
<view class="ali-c"> <view class="ali-c">
<view class="weizhiimg"> <view class="weizhiimg">
<image class="imgs" src="/static/news/storeicon.png"></image> <image class="imgs" src="/static/news/storeicon.png"></image>
</view> </view>
<view class="flex1 ml-20"> <view class="flex1 ml-20">
<view class="sz_30 bt_hei">到店支付</view> <view class="sz_30 bt_hei">到店支付</view>
</view> </view>
</view> </view>
</view> </view>
<view class="topbox_20 mt-20"> <view class="topbox_20 mt-20">
<view class="ali-c"> <view class="ali-c">
<view class="tubiimg mr-20"> <view class="tubiimg mr-20">
<image class="imgs" src="/static/news/storeicon.png"></image> <image class="imgs" src="/static/news/storeicon.png"></image>
</view> </view>
<view class="bt_min flex1">{{detail.shop_name}}</view> <view class="bt_min flex1">{{detail.shop_name}}</view>
</view> </view>
<view class="flex mt-30" v-for='(item,index) in detail.products' :key='index' > <view class="flex mt-30" v-for='(item,index) in detail.products' :key='index'>
<view class="tuimg br_10 ov"> <view class="tuimg br_10 ov">
<image class="imgs" :src="staticUrl+item.photo" v-if="item.photo"></image> <image class="imgs" :src="staticUrl+item.photo" v-if="item.photo"></image>
<image class="imgs" :src="staticUrl+detail.photo" v-else ></image> <image class="imgs" :src="staticUrl+detail.photo" v-else></image>
</view> </view>
<view class="flex1 ml-25 goodsboxs"> <view class="flex1 ml-25 goodsboxs">
<view class="sz_30 bt_hei twoline names" style="height:65upx">{{item.goods_name}}</view> <view class="sz_30 bt_hei twoline names" style="height:65upx">{{item.goods_name}}</view>
<view class="sz_26 bt_hei mt-10 prices">价格{{item.fprice}} <view class="sz_26 bt_hei mt-10 prices">价格{{item.fprice}}
<!-- <text class="ml-20 prices" v-if="detail.buytype==0 && item.recprice >0">充值价{{item.recprice}}</text> --> <!-- <text class="ml-20 prices" v-if="detail.buytype==0 && item.recprice >0">充值价{{item.recprice}}</text> -->
</view> </view>
<view class="sz_26 inp_hui mt-10 skunames">规格:{{item.sku_name}}<text class="ml-20"></text> <view class="sz_26 inp_hui mt-10 skunames">规格:{{item.sku_name}}<text class="ml-20"></text>
</view> </view>
<view class="sz_26 inp_hui mt-10 sumns">数量: x {{item.goodsnum}}</view> <view class="sz_26 inp_hui mt-10 sumns">数量: x {{item.goodsnum}}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="topbox_20 mt-20 "> <view class="topbox_20 mt-20 ">
<view class="ali-z sz_30 bt_hei flex ali-c jus-b"> <view class="ali-z sz_30 bt_hei flex ali-c jus-b">
<view>已优惠:</view> <view>已优惠:</view>
<view style="color: red;font-size: 20upx;">{{detail.cprice}}</view> <view style="color: red;font-size: 20upx;">{{detail.cprice}}</view>
</view> </view>
</view> </view>
<view class="topbox_20 mt-20 "> <view class="topbox_20 mt-20 ">
<view class="ali-z sz_30 bt_hei flex ali-c jus-b"> <view class="ali-z sz_30 bt_hei flex ali-c jus-b">
<view>总计:</view> <view>总计:</view>
<view style="color: red;">¥{{detail.total}}</view> <view style="color: red;">¥{{detail.total}}</view>
</view> </view>
</view> </view>
<!-- 第二排 --> <!-- 第二排 -->
<view class="cellboxs cellboxstow" v-if='logs'> <view class="cellboxs cellboxstow" v-if='logs'>
<view class="subsbox cellitems flex ali-c jus-b"> <view class="subsbox cellitems flex ali-c jus-b">
<view class="name">订单信息</view> <view class="name">订单信息</view>
</view> </view>
<view class="cellitems flex ali-c jus-b"> <view class="cellitems flex ali-c jus-b">
<view class="name">订单编号</view> <view class="name">订单编号</view>
<view class="vlas">{{logs.order_sn}}</view> <view class="vlas">{{logs.order_sn}}</view>
</view> </view>
<view class="cellitems flex ali-c jus-b">
<view class="name">创建时间</view> <view class="cellitems flex ali-c jus-b">
<view class="vlas">{{logs.createtime}}</view> <view class="name">创建时间</view>
</view> <view class="vlas">{{logs.createtime}}</view>
<view class="cellitems flex ali-c jus-b" v-if="detail.status==4"> </view>
<view class="name">退款原因</view> <view class="cellitems flex ali-c jus-b" v-if="detail.status==4">
<view class="vlas">{{detail.refund_details}}</view> <view class="name">退款原因</view>
</view> <view class="vlas">{{detail.refund_details}}</view>
</view>
</view> <view class="cellitems flex ali-c jus-b" >
<!-- 订单信息 --> <view class="name" style="width: 30%;">订单备注:</view>
<view class="vlas" style="text-align: left;">{{detail.message==''?'':detail.message}}</view>
<!-- 联系客服 --> </view>
<view class="ordertelbox flex "> </view>
<view class="itemboxss flex1 flex flexc" @tap="xlsj" :data-tel='detail.addr.mobile'> <!-- 订单信息 -->
<image class="img" src="/static/news/telicon1.png" mode=""></image>
<view class="name">联系客户</view>
</view> <!-- 联系客服 -->
<view class="itemboxss flex1 flex flexc" @tap="lxpt"> <view class="ordertelbox flex ">
<image class="img" src="/static/news/kefuicon.png" mode=""></image> <view class="itemboxss flex1 flex flexc" @tap="xlsj" :data-tel='detail.addr.mobile'>
<view class="name">联系平台</view> <image class="img" src="/static/news/telicon1.png" mode=""></image>
</view> <view class="name">联系客户</view>
</view> </view>
<view class="itemboxss flex1 flex flexc" @tap="lxpt">
<!-- 猜你会买 --> <image class="img" src="/static/news/kefuicon.png" mode=""></image>
</view> <view class="name">联系平台</view>
</view>
</view>
</view>
</template> <!-- 猜你会买 -->
</view>
<script>
import { orderDetails } from "@/utils/api/api.js";
export default { </view>
data(){ </template>
return {
order_id:"", <script>
detail:{addr:{mobile:""}}, import {
logs:{}, orderDetails
} } from "@/utils/api/api.js";
}, export default {
computed: { data() {
staticUrl () {//静态资源地址 return {
return this.$store.state.staticUrl; order_id: "",
} detail: {
}, addr: {
onLoad(options) { mobile: ""
this.order_id = options.order_id; }
this.initializedata(); },
}, logs: {},
methods:{ }
xlsj(){//联系客户 },
uni.makePhoneCall({ computed: {
phoneNumber: this.detail.addr.mobile //仅为示例 staticUrl() { //静态资源地址
}); return this.$store.state.staticUrl;
}, }
//联系平台 },
lxpt(){ onLoad(options) {
uni.makePhoneCall({ this.order_id = options.order_id;
phoneNumber: '15907083784' //仅为示例 this.initializedata();
}); },
}, methods: {
initializedata() { xlsj() { //联系客户
var that = this; uni.makePhoneCall({
let params = { phoneNumber: this.detail.addr.mobile //仅为示例
order_id: that.order_id, });
}; },
orderDetails(params).then(res => { //联系平台
console.log(res); lxpt() {
if(res.code<0){ uni.makePhoneCall({
// app.showToast({title: res.msg}); phoneNumber: '15907083784' //仅为示例
this.$api.msg(res.msg); });
}else{ },
// that.setData({ initializedata() {
// detail: res.data.detail, var that = this;
// logs:res.data.logs, let params = {
// CONFIG: app.globalData.CONFIG order_id: that.order_id,
// }) };
orderDetails(params).then(res => {
this.detail = res.data.detail; console.log(res);
this.logs = res.data.logs; if (res.code < 0) {
//this.CONFIG = // app.showToast({title: res.msg});
} this.$api.msg(res.msg);
}) } else {
}, // that.setData({
callTel: function (e) { // detail: res.data.detail,
uni.makePhoneCall({ // logs:res.data.logs,
phoneNumber: e.currentTarget.dataset.tel // 仅为示例,并非真实的电话号码 // CONFIG: app.globalData.CONFIG
}) // })
},
this.detail = res.data.detail;
}, this.logs = res.data.logs;
//this.CONFIG =
}
} })
</script> },
callTel: function(e) {
<style lang="scss"> uni.makePhoneCall({
/* pages/shop//order/weidianorder/weidianLine_item/weidianLine_item.wxss */ phoneNumber: e.currentTarget.dataset.tel // 仅为示例,并非真实的电话号码
.ml-20{ })
margin-left: 20upx; },
}
.mt-20{ },
margin-top: 20upx;
}
.mr-20{ }
margin-right: 20upx; </script>
}
.mt-30{ <style lang="scss">
margin-top: 30upx; /* pages/shop//order/weidianorder/weidianLine_item/weidianLine_item.wxss */
} .ml-20 {
.ml-25{ margin-left: 20upx;
margin-left: 25upx; }
}
.sz_30{ .mt-20 {
font-size: 30upx; margin-top: 20upx;
} }
.beijingimg {
background: linear-gradient(#FF5A03,#FF4216); .mr-20 {
width: 100%; margin-right: 20upx;
height: 300upx; }
position: absolute;
top: 0; .mt-30 {
z-index: 1; margin-top: 30upx;
padding-left: 20upx; }
padding-top: 25px;
.onetitle{ .ml-25 {
color:#FFFFFF; margin-left: 25upx;
font-size: 30upx; }
} .sz_30 {
.twotitle{ font-size: 30upx;
color:#FFFFFF; }
font-size: 28upx;
} .beijingimg {
} background: linear-gradient(#FF5A03, #FF4216);
width: 100%;
.addresone{ height: 300upx;
margin-top: 20px; position: absolute;
} top: 0;
.boxs { z-index: 1;
position: relative; padding-left: 20upx;
z-index:2; padding-top: 25px;
width: 100%;
padding: 24upx; .onetitle {
box-sizing: border-box; color: #FFFFFF;
font-size: 30upx;
}
.bt_min{ }
font-size: 30upx;
} .twotitle {
.addrnamesv{ color: #FFFFFF;
font-size: 30upx; font-size: 28upx;
} }
.topbox_20 { }
width: 100%;
background: rgba(255,255,255,1); .addresone {
border-radius: 14rpx; margin-top: 20px;
padding: 20upx; }
box-sizing: border-box;
font-size: 30upx; .boxs {
} position: relative;
z-index: 2;
.skunames{ width: 100%;
font-size: 24upx; padding: 24upx;
} box-sizing: border-box;
page{ }
position: relative;
padding-bottom: 100upx; .bt_min {
background: #F5F5F5; font-size: 30upx;
} }
.weizhiimg{
width: 30upx; .addrnamesv {
height: 46upx; font-size: 30upx;
.imgs{ }
width: 30upx;
height: 46upx; .topbox_20 {
} width: 100%;
} background: rgba(255, 255, 255, 1);
.shuwuimg{ border-radius: 14rpx;
width:67upx; padding: 20upx;
height:67upx; box-sizing: border-box;
border-radius:4upx; font-size: 30upx;
overflow: hidden; }
}
.btbox{ .skunames {
width:190upx; font-size: 24upx;
height:77upx; }
background:rgba(255,255,255,1);
border-radius:4upx; page {
} position: relative;
.xiangyouimg{ padding-bottom: 100upx;
width:14upx; background: #F5F5F5;
height:24upx; }
}
.dianhuimg{ .weizhiimg {
width:42upx; width: 30upx;
height:42upx; height: 46upx;
}
.kuai{ .imgs {
width:40upx; width: 30upx;
height:40upx; height: 46upx;
text-align: center; }
line-height: 40upx; }
font-size:24upx;
font-weight:500; .shuwuimg {
color:rgba(255,255,255,1); width: 67upx;
} height: 67upx;
border-radius: 4upx;
.dibu_qr{ overflow: hidden;
position: fixed; }
bottom: 0;
width:100%; .btbox {
background:rgba(255,255,255,1); width: 190upx;
padding: 10upx 24upx; height: 77upx;
box-sizing: border-box; background: rgba(255, 255, 255, 1);
} border-radius: 4upx;
.beizhu{ }
width: 150upx;
text-align: right; .xiangyouimg {
} width: 14upx;
.tubiimg{ height: 24upx;
width:27upx; }
height:24upx;
.imgs{ .dianhuimg {
width:27upx; width: 42upx;
height:24upx; height: 42upx;
} }
}
.tuimg{ .kuai {
width:183upx; width: 40upx;
height:183upx; height: 40upx;
.imgs{ text-align: center;
width:183upx; line-height: 40upx;
height:183upx; font-size: 24upx;
} font-weight: 500;
} color: rgba(255, 255, 255, 1);
view{ }
line-height: 112%;
letter-spacing:3upx .dibu_qr {
} position: fixed;
.dianhuimg{ bottom: 0;
width:43upx; width: 100%;
height:43upx; background: rgba(255, 255, 255, 1);
} padding: 10upx 24upx;
.shuxian{ box-sizing: border-box;
width:1px; }
height:100upx;
background:rgba(242,242,242,1); .beizhu {
} width: 150upx;
.duanxian{ text-align: right;
width:45upx; }
height:1px;
background: rgba(181,181,181,1); .tubiimg {
} width: 27upx;
.cptjimg{ height: 24upx;
width:100%;
height:310upx; .imgs {
} width: 27upx;
/* 取消弹窗 */ height: 24upx;
.zan-dialog__mask { }
position: fixed; }
top: 0;
left: 0; .tuimg {
right: 0; width: 183upx;
bottom: 0; height: 183upx;
z-index: 10;
background: rgba(0, 0, 0, .5); .imgs {
display: none; width: 183upx;
} height: 183upx;
}
.zan-dialog__container { }
position: fixed;
bottom: 400upx; view {
width: 650upx; line-height: 112%;
height: 350upx; letter-spacing: 3upx
margin-left: 50upx; }
background: #f8f8f8;
transform: translateY(300%); .dianhuimg {
transition: all 0.4s ease; width: 43upx;
z-index: 12; height: 43upx;
border-radius: 20upx; }
/* box-shadow: 0px 3px 3px 2px gainsboro; */
} .shuxian {
width: 1px;
.zan-dialog--show .zan-dialog__container { height: 100upx;
transform: translateY(0); background: rgba(242, 242, 242, 1);
} }
.zan-dialog--show .zan-dialog__mask { .duanxian {
display: block; width: 45upx;
} height: 1px;
background: rgba(181, 181, 181, 1);
.goodsboxs{ }
font-size: 30upx;
.names{ .cptjimg {
font-size: 30upx; width: 100%;
} height: 310upx;
.prices{ }
font-size: 30upx;
} /* 取消弹窗 */
.sumns{ .zan-dialog__mask {
color:rgb(192, 190, 190); position: fixed;
} top: 0;
} left: 0;
right: 0;
bottom: 0;
//联系kefu 客服 z-index: 10;
.ordertelbox{ background: rgba(0, 0, 0, .5);
margin: 0 24upx; display: none;
margin-top: 20upx; }
height:89upx;
background:rgba(255,255,255,1); .zan-dialog__container {
border-radius:0px 0px 14upx 14upx; position: fixed;
.itemboxss{ bottom: 400upx;
position: relative; width: 650upx;
height: 89upx; height: 350upx;
line-height: 89upx; margin-left: 50upx;
.img{ background: #f8f8f8;
width:43upx; transform: translateY(300%);
height:43upx; transition: all 0.4s ease;
margin-right: 20upx; z-index: 12;
} border-radius: 20upx;
.name{ /* box-shadow: 0px 3px 3px 2px gainsboro; */
font-size:30upx; }
color:rgba(0,0,0,1);
} .zan-dialog--show .zan-dialog__container {
} transform: translateY(0);
}
.itemboxss:nth-child(1):after{
content: ""; .zan-dialog--show .zan-dialog__mask {
width:1px; display: block;
height:89px; }
background:rgba(242,242,242,1);
position: absolute; .goodsboxs {
top:0; font-size: 30upx;
right: 0;
} .names {
} font-size: 30upx;
//客服end }
//价格明细列表 .prices {
.cellboxs{ font-size: 30upx;
margin: 20upx 0; }
margin-top: 20upx;
.cellitems{ .sumns {
padding: 0 20upx; color: rgb(192, 190, 190);
height: 88upx; }
line-height: 88upx; }
border-bottom: 1px solid #F5F1F1;
background: #FFFFFF;
.name{ //联系kefu 客服
font-size:30upx; .ordertelbox {
color:rgba(0,0,0,1); margin: 0 24upx;
} margin-top: 20upx;
.vlas{ height: 89upx;
font-size:30upx; background: rgba(255, 255, 255, 1);
color:rgba(0,0,0,1); border-radius: 0px 0px 14upx 14upx;
}
} .itemboxss {
.cellitems:nth-last-child(1){ position: relative;
border:0; height: 89upx;
} line-height: 89upx;
.subsbox{
.name{ .img {
font-size:30upx; width: 43upx;
font-family:PingFang SC; height: 43upx;
font-weight:bold; margin-right: 20upx;
color:rgba(0,0,0,1); }
}
.vlas{ .name {
color:#FF6900; font-size: 30upx;
.fuhao{ color: rgba(0, 0, 0, 1);
font-size: 30upx; }
} }
.shuzi{
font-family:PingFang SC; .itemboxss:nth-child(1):after {
font-weight:bold; content: "";
font-size: 36upx; width: 1px;
} height: 89px;
} background: rgba(242, 242, 242, 1);
} position: absolute;
} top: 0;
right: 0;
// .cellboxstow{ }
// margin-top: 0; }
// margin-bottom: 0;
// } //客服end
//价格明细列表
.cellboxs {
margin: 20upx 0;
margin-top: 20upx;
.cellitems {
padding: 0 20upx;
height: 88upx;
line-height: 88upx;
border-bottom: 1px solid #F5F1F1;
background: #FFFFFF;
.name {
font-size: 30upx;
color: rgba(0, 0, 0, 1);
}
.vlas {
font-size: 30upx;
color: rgba(0, 0, 0, 1);
}
}
.cellitems:nth-last-child(1) {
border: 0;
}
.subsbox {
.name {
font-size: 30upx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(0, 0, 0, 1);
}
.vlas {
color: #FF6900;
.fuhao {
font-size: 30upx;
}
.shuzi {
font-family: PingFang SC;
font-weight: bold;
font-size: 36upx;
}
}
}
}
// .cellboxstow{
// margin-top: 0;
// margin-bottom: 0;
// }
</style> </style>
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<!-- 商家查看自己店铺的售后订单详情 --> <!-- 商家查看自己店铺的售后订单详情 -->
<!-- 订单 order --> <!-- 订单 order -->
<view class="shoporderdetale xiangq yocode"> <view class="shoporderdetale xiangq yocode">
<view class="beijingimg" style="height:80px"> <view class="beijingimg">
<!-- <view class="onetitle">{{detail.orderstatus}}</view> <image src="https://luma.jxdsy.cn/static/applet5/2020/index/group_img/defeated.png" mode="" style="width: 100%;height: 240upx;"></image>
<view class="twotitle">{{detail.statusdesc}}</view> --> <view class="twotitle">{{detail.desc}}</view>
</view> </view>
<view class="boxs"> <view class="boxs">
<view class="topbox_20 addresone"> <view class="topbox_20 mt-20">
<view class="ali-c"> <view class="ali-c">
<view class="weizhiimg"><image class="imgs" src="/static/news/address.png"></image></view> <view class="weizhiimg"><image class="imgs" src="/static/news/address.png"></image></view>
<view class="flex1 ml-20 addrnamesv"> <view class="flex1 ml-20 addrnamesv">
...@@ -26,15 +26,15 @@ ...@@ -26,15 +26,15 @@
</view> --> </view> -->
<!-- 售后说明 --> <!-- 售后说明 -->
<view class="topbox_20 mt-20"> <view class="topbox_20 mt-20" v-if="detail.refund_datail != '' || detail.refund_pics.length>0 ">
<view style="font-size: 30upx;font-weight: 500;">售后说明</view> <view style="font-size: 30upx;font-weight: 500;">售后说明</view>
<view class="mt-20">{{ detail.refund_datail ? detail.refund_datail : '暂无说明' }}</view> <view class="mt-20 refund_datail">{{ detail.refund_datail }}</view>
<view v-if="detail.refund_pics.length>0"> <view class="datail_img">
<image <image
:src="staticUrl + item" :src="staticUrl + item"
mode="" mode=""
v-for="(item, index) in detail.refund_pics" v-for="(item, index) in detail.refund_pics"
style="width: 244upx;height: 220upx;padding: 0 20upx 0 0;margin: 10upx 0upx;" style="width: 220upx;height: 196upx;flex-grow: 1;padding: 4upx;"
></image> ></image>
</view> </view>
</view> </view>
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
data() { data() {
return { return {
refund_id: '', refund_id: '',
detail: '' //售后详情 detail: {adress:{}} //售后详情
// logs:{}, // logs:{},
}; };
}, },
...@@ -200,24 +200,21 @@ export default { ...@@ -200,24 +200,21 @@ export default {
font-size: 30upx; font-size: 30upx;
} }
.beijingimg { .beijingimg {
background: linear-gradient(#ff5a03, #ff4216); // background: linear-gradient(#ff5a03, #ff4216);
width: 100%; width: 100%;
height: 300upx; // padding: 30upx 24upx;
position: absolute; position: relative;
top: 0;
z-index: 1;
padding-left: 20upx;
padding-top: 25px;
.onetitle {
color: #ffffff;
font-size: 30upx;
}
.twotitle { .twotitle {
color: #ffffff; position: absolute;
font-size: 28upx; z-index: 99;
top: 60upx;
color: rgba(255, 255, 255, 1);
font-size: 38upx;
font-weight: 500;
line-height: 40upx;
margin-left: 40upx;
} }
} }
.addresone { .addresone {
margin-top: 20px; margin-top: 20px;
} }
...@@ -225,7 +222,8 @@ export default { ...@@ -225,7 +222,8 @@ export default {
position: relative; position: relative;
z-index: 2; z-index: 2;
width: 100%; width: 100%;
padding: 24upx; padding: 0upx 24upx;
// margin-top: 60upx;
box-sizing: border-box; box-sizing: border-box;
} }
.bt_min { .bt_min {
...@@ -463,9 +461,15 @@ view { ...@@ -463,9 +461,15 @@ view {
} }
} }
} }
.datail_img{
// .cellboxstow{ // width: 100%;
// margin-top: 0; display: flex;
// margin-bottom: 0; flex-direction: row;
// } justify-content: start;
align-items: center;
flex-wrap: wrap;
}
.refund_datail{
margin-top: 20upx;
}
</style> </style>
<template> <template>
<view> <view>
<view class="">
<view class="" style="text-align: center;height: 120upx;line-height: 120upx;font-weight: bold;font-size: 32upx;"> <view class="projuctTab flex">
已有 <text style="color: #21B94C;font-size: 60upx;">{{receivePeopleNumber}}</text>人领取 还剩{{unreceivePeopleNumber}}人未核销 <view class="tabitems flex1" :class="{active:tabactive==1}" @tap="taggletab(1)">
<view class="tabtitle">参与人员</view>
<!-- ({{count[0]}}) -->
</view>
<view class="tabitems flex1" :class="{active:tabactive==2}" @tap="taggletab(2)">
<view class="tabtitle">核销人员</view>
<!-- ({{count[1]}}) -->
</view> </view>
</view> </view>
<view class="" style="height: 160upx;padding: 0 24upx;background-color: rgb(255, 255, 255);margin-bottom: 20upx;" v-if="getDetail.length > 0 " v-for="(item,index) in getDetail">
<view class="fx " style="justify-content: space-between;background-color: #fff; align-items: center;
height: 100%">
<view class="fx" style="width: 75%;align-items: center;" >
<view style="height: 120upx;width: 120upx;border-radius: 120upx;text-align: center;line-height: 80upx;overflow: hidden;"> <view class="" style="margin-top:90upx ;" :hidden="!(tabactive==1)">
<image :src="item.face" style="display: inline;"></image> <view class="">
<view class="" style="text-align: center;height: 120upx;line-height: 120upx;font-weight: bold;font-size: 32upx;">
已有 <text style="color: #21B94C;font-size: 60upx;">{{receivePeopleNumber}}</text>人参与
</view>
</view>
<view class="" style="height: 100upx;padding: 0 24upx;background-color: rgb(255, 255, 255);margin-bottom: 2upx;"v-for="(item,index) in getAllDetail">
<view class="fx " style="justify-content: space-between;background-color: #fff; align-items: center;height: 100%">
<view class="fx" style="width: 75%;align-items: center;">
<view style="height: 80upx;width: 80upx;border-radius: 120upx;text-align: center;line-height: 80upx;overflow: hidden;">
<image :src="item.face" style="display: inline;"></image>
</view>
<view style="margin:0 0 0 10upx;width: 75%;padding: 20upx 10upx;">
<view style="font: 34upx 微软雅黑;padding-bottom:10upx ;" class="oneline">{{item.nickname}}</view>
<view style="font-size:20upx;color:rgb(116, 113, 113);padding-top: 10upx;">{{item.create_time}}</view>
</view>
</view> </view>
<view style="margin:0 0 0 10upx;width: 75%;padding: 20upx 10upx;">
<view style="font: 34upx 微软雅黑;padding-bottom:10upx ;" class="oneline">{{item.nickname}}</view> <view style="width: 15%;height: 104upx;">
<view style="font-size:20upx;color:rgb(116, 113, 113);padding-top: 10upx;">{{item.verification_time}}</view> <!-- <image src="/static/lingqu.png" mode="" style="width:100% ;height: 100%;display: inline;"></image> -->
</view> </view>
<!-- 关注插槽 -->
<!-- <slot name="before"></slot> -->
</view> </view>
<view style="width: 15%;height: 104upx;"> <!-- <slot name="content"> </slot> -->
<!-- <text style="color:#DC143C;padding: 0 12upx;border-radius: 10upx;font-size: 32upx;"> </view>
<view v-if="getAllDetail.length <= 0" style="text-align: center;width: 100%;height:1000upx;line-height: 1000upx;font-size: 50upx;color:#8C8C8C ;">
</text> --> <image src="https://luma.jxdsy.cn//static/applet5/images/uts/meiyoule.png" mode=""></image>
<image src="/static/lingqu.png" mode="" style="width:100% ;height: 100%;display: inline;"></image> </view>
</view> </view>
<!-- 关注插槽 -->
<!-- <slot name="before"></slot> -->
<view class="" style="margin-top:90upx ;" :hidden="tabactive==1">
<view class="">
<view class="" style="text-align: center;height: 120upx;line-height: 120upx;font-weight: bold;font-size: 32upx;">
已有 <text style="color: #21B94C;font-size: 60upx;">{{enterPeopleNumber}}</text>人核销
</view>
</view> </view>
<!-- <slot name="content"> </slot> --> <view class="" style="height: 100upx;padding: 0 24upx;background-color: rgb(255, 255, 255);margin-bottom: 2upx;"
</view> v-for="(item,index) in getScanDetail">
<view class="fx " style="justify-content: space-between;background-color: #fff; align-items: center;
height: 100%">
<view v-if="getDetail.length <= 0" style="text-align: center;width: 100%;height:1000upx;line-height: 1000upx;font-size: 50upx;color:#8C8C8C ;"> <view class="fx" style="width: 75%;align-items: center;">
还没有人领取~~ <view style="height: 80upx;width: 80upx;border-radius: 120upx;text-align: center;line-height: 80upx;overflow: hidden;">
<image :src="item.face" style="display: inline;"></image>
</view>
<view style="margin:0 0 0 10upx;width: 75%;padding: 20upx 10upx;">
<view style="font: 34upx 微软雅黑;padding-bottom:10upx ;" class="oneline">{{item.nickname}}</view>
<view style="font-size:20upx;color:rgb(116, 113, 113);padding-top: 10upx;">{{item.verification_time}}</view>
</view>
</view>
<view style="width: 10%;height: 70upx;">
<image src="/static/lingqu.png" mode="" style="width:100% ;height: 100%;display: inline;"></image>
</view>
<!-- 关注插槽 -->
<!-- <slot name="before"></slot> -->
</view>
<!-- <slot name="content"> </slot> -->
</view>
<view v-if="getScanDetail.length <= 0" style="text-align: center;width: 100%;height:1000upx;line-height: 1000upx;font-size: 50upx;color:#8C8C8C ;">
<image src="https://luma.jxdsy.cn//static/applet5/images/uts/meiyoule.png" mode=""></image>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -46,51 +105,22 @@ ...@@ -46,51 +105,22 @@
activity_user activity_user
} from '@/utils/api/merchant.js'; } from '@/utils/api/merchant.js';
export default { export default {
data(){ data() {
return { return {
shop_id:'', shop_id: '',
activity_id:'', activity_id: '',
getDetail:[], getAllDetail: [], // 参与人员列表
page:1, getScanDetail: [], //核销人员列表
receivePeopleNumber:0, allpage: 0, // 参与人员分页数
unreceivePeopleNumber:0, scanpage: 0, //核销人员分页数
enterPeopleNumber:0,//核销人数
receivePeopleNumber: 0, //参与人数
// unreceivePeopleNumber: 0,
tabactive: 1,
} }
}, },
onReachBottom() {
activity_user({
shop_id:this.shop_id,
activity_id:this.activity_id,
nucleus:1,
page:this.page
}).then(res=>{
if(res.code==0&&res.data.list.length>0){
this.page++
this.getDetail = res.data.list;
this.receivePeopleNumber=res.data.receivePeopleNumber;
this.unreceivePeopleNumber=res.data.unreceivePeopleNumber;
uni.stopPullDownRefresh();
}else{
uni.$api.msg('没有更多数据了')
}
})
},
onPullDownRefresh() {
this.page = 1
activity_user({
shop_id:this.shop_id,
activity_id:this.activity_id,
nucleus:1
}).then(res=>{
if(res.code==0){
this.getDetail = res.data.list
this.receivePeopleNumber=res.data.receivePeopleNumber;
this.unreceivePeopleNumber=res.data.unreceivePeopleNumber;
uni.stopPullDownRefresh();
}
})
},
onLoad(options) { onLoad(options) {
let that = this let that = this
that.activity_id = options.activity_id that.activity_id = options.activity_id
...@@ -100,28 +130,238 @@ ...@@ -100,28 +130,238 @@
that.shop_id = res.data.shop_id that.shop_id = res.data.shop_id
} }
}) })
activity_user({ this.activityUserAll(that.shop_id, that.activity_id); //获取参与人员
shop_id:that.shop_id, },
activity_id:that.activity_id, /**
nucleus:1 * 触底事件
}).then(res=>{ */
if(res.code==0){ onReachBottom() {
this.getDetail = res.data.list; // console.log('触底了',this.tabactive)
this.receivePeopleNumber=res.data.receivePeopleNumber; if (this.tabactive == 1) {
this.unreceivePeopleNumber=res.data.unreceivePeopleNumber; this.allpage++
// this.activityUserAll(this.shop_id, this.activity_id, 0, this.allpage)
activity_user({
shop_id: shop_id,
activity_id: activity_id,
nucleus: 0,
page: this.allpage
}).then(res => {
if (res.code == 0) {
this.getScanDetail =[...this.getScanDetail,...res.data.list]
this.receivePeopleNumber = res.data.receivePeopleNumber;
// this.unreceivePeopleNumber = res.data.unreceivePeopleNumber;
}
})
} else if (this.tabactive == 2) {
this.scanpage++
activity_user({
shop_id: shop_id,
activity_id: activity_id,
nucleus: 1,
page: this.scanpage
}).then(res => {
if (res.code == 0) {
this.getScanDetail =[this.getScanDetail,...res.data.list]
this.enterPeopleNumber = res.data.receivePeopleNumber;
// this.unreceivePeopleNumber = res.data.unreceivePeopleNumber;
}
})
// this.activityUserScan(this.shop_id, this.activity_id, 1, this.scanpage)
} else {
return false;
}
},
/**
* 下拉刷新
*/
onPullDownRefresh() {
this.allpage = 1
this.scanpage = 1
this.activityUserAll(this.shop_id, this.activity_id, )
this.activityUserScan(this.shop_id, this.activity_id)
uni.stopPullDownRefresh();
},
methods: {
taggletab(index) {
this.tabactive = index;
if (index == 1) {
this.activityUserAll(this.shop_id, this.activity_id, )
} else if (index == 2) {
this.activityUserScan(this.shop_id, this.activity_id)
} }
})
},
/**
* @param {Number} nucleus
* @param {Number} activity_id
* @param {Number} shop_id
*/
activityUserAll(shop_id, activity_id, nucleus = 0, pages = 0) {
activity_user({
shop_id: shop_id,
activity_id: activity_id,
nucleus: nucleus,
page: pages
}).then(res => {
if (res.code == 0) {
this.getAllDetail =res.data.list
this.receivePeopleNumber = res.data.receivePeopleNumber;
// this.unreceivePeopleNumber = res.data.unreceivePeopleNumber;
}
})
},
/**
* @param {Number} nucleus
* @param {Number} activity_id
* @param {Number} shop_id
*/
activityUserScan(shop_id, activity_id, nucleus = 1, pages = 0) {
activity_user({
shop_id: shop_id,
activity_id: activity_id,
nucleus: nucleus,
page: pages
}).then(res => {
if (res.code == 0) {
this.getScanDetail =res.data.list
this.enterPeopleNumber = res.data.receivePeopleNumber;
// this.unreceivePeopleNumber = res.data.unreceivePeopleNumber;
}
})
}
}, },
} }
</script> </script>
<style> <style lang="scss">
page{ .projuctlist {
background-color: #EEEEEE; margin: 130upx 24upx;
padding-top: 18upx;
background: rgba(255, 255, 255, 1);
border-radius: 14upx;
.itempro {
position: relative;
border-bottom: 1px solid rgba(220, 220, 220, 1);
padding: 20upx;
.thumbnail {
width: 170upx;
height: 170upx;
border-radius: 6upx;
margin-right: 27upx;
margin-left: 20upx;
}
.infobox {
.title {
font-size: 34upx;
color: rgba(51, 51, 51, 1);
//margin-bottom: 5upx;
}
.time {
//margin-bottom: 5upx;
}
.time,
.price {
font-size: 30upx;
color: rgba(153, 153, 153, 1);
}
}
.btnbox {
position: absolute;
bottom: 5px;
right: 5px;
.btns {
width: 100upx;
height: 60upx;
line-height: 60upx;
text-align: center;
border: 1upx solid rgba(160, 160, 160, 1);
border-radius: 4upx;
font-size: 30upx;
color: rgba(0, 0, 0, 1);
}
.btnboxdel {
margin-left: 16upx;
}
.btnboxxj {
background: #FF6900;
color: #FFFFFF;
border: 0;
margin-left: 16upx;
}
}
}
}
.projuctTab {
background: #FFFFFF;
width: 100%;
height: 98upx;
line-height: 98upx;
position: fixed;
top: 0;
/* #ifdef H5 */
top: 86upx;
/* #endif */
left: 0;
z-index: 99;
.tabitems {
text-align: center;
.tabtitle {
text-align: center;
height: 98upx;
line-height: 98upx;
font-size: 30upx;
display: inline-block;
box-sizing: border-box;
color: #333333;
}
}
.tabitems.active {
.tabtitle {
font-family: PingFang SC;
font-weight: bold;
color: #FF6900;
border-bottom: 1px solid #FF6900;
}
}
} }
.fx { .fx {
display: flex; display: flex;
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<view class="projuctlist" :hidden="!(tabactive==1)"> <view class="projuctlist" :hidden="!(tabactive==1)">
<view class="" v-if="start_activity.length>0"> <view class="" v-if="start_activity.length>0">
<checkbox-group > <checkbox-group>
<!-- 单个商品 --> <!-- 单个商品 -->
<view class="itempro flex " v-for="(item,index) in start_activity" :key="index" @click="jumpDetail(item.activity_id)"> <view class="itempro flex " v-for="(item,index) in start_activity" :key="index" @click="jumpDetail(item.activity_id)">
<!-- <label class="ali-c"> <!-- <label class="ali-c">
...@@ -23,40 +23,43 @@ ...@@ -23,40 +23,43 @@
</label> --> </label> -->
<image class="thumbnail" :src="staticUrl + item.picture" mode=""></image> <image class="thumbnail" :src="staticUrl + item.picture" mode=""></image>
<view class="infobox" style="width: 70%;"> <view class="infobox" style="width: 70%;">
<view class="title oneline" style="height:45upx ;">{{item.goods_name}}</view> <view class="title oneline" style="height:45upx ;">{{item.goods_name}}</view>
<!-- <view class="time">上架时间:{{item.create_time}}</view> --> <!-- <view class="time">上架时间:{{item.create_time}}</view> -->
<view> <view>
<view style="font-size:26rpx;font-weight:bold;">领取时间:</view> <view style="font-size:26rpx;font-weight:bold;">领取时间:</view>
<view style="font-size:24rpx;color:#656565">{{item.start}}{{item.end}}</view> <view style="font-size:24rpx;color:#656565">{{item.start}}{{item.end}}</view>
</view> </view>
</view> </view>
<view class="btnbox flex" > <view class="btnbox flex">
<!-- <view class="btns btnboxdel" @tap="deleteEleProductfun(item,index)">删 除</view> --> <!-- <view class="btns btnboxdel" @tap="deleteEleProductfun(item,index)">删 除</view> -->
<!-- <view class="btns btnboxxj" @tap="Selectiondata(item)" v-if="tabactive==1 && isselect==1">加入活动</view> --> <!-- <view class="btns btnboxxj" @tap="Selectiondata(item)" v-if="tabactive==1 && isselect==1">加入活动</view> -->
<!-- <view class="btns btnboxxj" @tap="sold_outfun(item.id,1,index)" v-else-if="tabactive==1">下 架</view> --> <!-- <view class="btns btnboxxj" @tap="sold_outfun(item.id,1,index)" v-else-if="tabactive==1">下 架</view> -->
<!-- <view class="btns btnboxxj" @tap="sold_outfun(item.id,0,index)" v-show="tabactive==2">上 架</view> --> <!-- <view class="btns btnboxxj" @tap="sold_outfun(item.id,0,index)" v-show="tabactive==2">上 架</view> -->
<!-- <view class="btns btnboxxj" @click="setSpecs(item.product_id)" >规格</view> --> <!-- <view class="btns btnboxxj" @click="setSpecs(item.product_id)" >规格</view> -->
<view > <view>
<view class="btnboxdel flex" style="align-items: center;" @click.stop="switch1Change"> <view class="btnboxdel flex" style="align-items: center;" @click.stop="switch1Change">
活动开关:<switch :data-activity_id="item.activity_id" :checked="item.state==1" @change="switch1Change" /> 活动开关:
<view class="btns btnboxdel" @tap.stop="tochanges(item,index)">修 改</view> <switch :data-activity_id="item.activity_id" :checked="item.state==1" @change="switch1Change" />
<view class="btns btnboxdel" @tap.stop="tochanges(item,index)">修 改</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</checkbox-group> </checkbox-group>
</view> </view>
<view v-if="start_activity.length <= 0" style="text-align: center;width: 100%;height:1000upx;line-height: 1000upx;font-size: 50upx;color:#8C8C8C ;"> <view v-if="start_activity.length <= 0" style="text-align: center;width: 100%;height:1000upx;line-height: 1000upx;font-size: 50upx;color:#8C8C8C ;">
还没有人领取~~ <image src="https://luma.jxdsy.cn//static/applet5/images/uts/meiyoule.png" mode=""></image>
</view> </view>
</view> </view>
<view class="projuctlist" :hidden="!(tabactive==2)"> <view class="projuctlist" :hidden="!(tabactive==2)">
<view class="" v-if="end_activity.length > 0"> <view class="" v-if="end_activity.length > 0">
<checkbox-group > <checkbox-group>
<!-- 单个商品 --> <!-- 单个商品 -->
<view class="itempro flex " v-for="(item,index) in end_activity" :key="index" @click="jumpDetail(item.activity_id)"> <view class="itempro flex " v-for="(item,index) in end_activity" :key="index" @click="jumpDetail(item.activity_id)">
<!-- <label class="ali-c"> <!-- <label class="ali-c">
...@@ -86,7 +89,7 @@ ...@@ -86,7 +89,7 @@
</checkbox-group> </checkbox-group>
</view> </view>
<view v-if="end_activity.length <= 0" style="text-align: center;width: 100%;height:1000upx;line-height: 1000upx;font-size: 50upx;color:#8C8C8C ;"> <view v-if="end_activity.length <= 0" style="text-align: center;width: 100%;height:1000upx;line-height: 1000upx;font-size: 50upx;color:#8C8C8C ;">
还没有人领取~~ <image src="https://luma.jxdsy.cn//static/applet5/images/uts/meiyoule.png" mode=""></image>
</view> </view>
</view> </view>
...@@ -109,8 +112,8 @@ ...@@ -109,8 +112,8 @@
page: 0, page: 0,
start_activity: [], start_activity: [],
end_activity: [], end_activity: [],
endpages:0, endpages: 0,
startpages:0 startpages: 0
} }
}, },
...@@ -130,8 +133,8 @@ ...@@ -130,8 +133,8 @@
}) })
}, },
//下拉刷新 //下拉刷新
onPullDownRefresh(){ onPullDownRefresh() {
if(this.tabactive == 1){ if (this.tabactive == 1) {
this.startpages = 0 this.startpages = 0
activity_select({ activity_select({
shop_id: this.shop_id, shop_id: this.shop_id,
...@@ -143,8 +146,8 @@ ...@@ -143,8 +146,8 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
}) })
}else if(this.tabactive == 2){ } else if (this.tabactive == 2) {
this.endpages = 0 this.endpages = 0
activity_select({ activity_select({
shop_id: this.shop_id, shop_id: this.shop_id,
...@@ -156,34 +159,34 @@ ...@@ -156,34 +159,34 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
}) })
} }
}, },
//上拉触底 //上拉触底
onReachBottom(){ onReachBottom() {
if (this.tabactive == 1) { if (this.tabactive == 1) {
activity_select({ activity_select({
shop_id: this.shop_id, shop_id: this.shop_id,
page: ++this.startpages, page: ++this.startpages,
is_date: 2 is_date: 2
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.start_activity = [...this.start_activity,...res.data.data] this.start_activity = [...this.start_activity, ...res.data.data]
} }
}) })
} else if (this.tabactive == 2) { } else if (this.tabactive == 2) {
activity_select({ activity_select({
shop_id: this.shop_id, shop_id: this.shop_id,
page: ++this.endpages, page: ++this.endpages,
is_date: 1 is_date: 1
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.end_activity = [...this.this.end_activity,...res.data.data] this.end_activity = [...this.end_activity, ...res.data.data]
} }
}) })
} }
}, },
onShow() { onShow() {
...@@ -214,10 +217,10 @@ ...@@ -214,10 +217,10 @@
}, },
methods: { methods: {
jumpDetail(activity_id){ jumpDetail(activity_id) {
uni.navigateTo({ uni.navigateTo({
url:`/pages/publishActivities/activityDetail/activityDetail?activity_id=${activity_id}` url: `/pages/publishActivities/activityDetail/activityDetail?activity_id=${activity_id}`
}) })
}, },
//修改活动 //修改活动
...@@ -227,14 +230,14 @@ ...@@ -227,14 +230,14 @@
url: `/pages/publishActivities/publishActivity/publishActivity?id=${data.activity_id}&type=edit`, url: `/pages/publishActivities/publishActivity/publishActivity?id=${data.activity_id}&type=edit`,
}) })
}, },
// 查找产品 // 查找产品
findEleProduct(){ findEleProduct() {
}, },
switch1Change(e) { switch1Change(e) {
if(e.type=='change'){ if (e.type == 'change') {
console.log(e) console.log(e)
if (e.detail.value) { if (e.detail.value) {
activity_close({ activity_close({
...@@ -258,10 +261,10 @@ ...@@ -258,10 +261,10 @@
} }
}) })
} }
}else{ } else {
return ; return;
} }
}, },
//交互end //交互end
taggletab(index) { taggletab(index) {
......
<template> <template >
<!-- 商家二维码 --> <view :style="{height:windowHeight+'px',background:show?'#EC6919':''}">
<!-- 商家码 --> <!-- 只要他得高度 -->
<view class="content yocode"> <image :src="avaterSrc" class="w1005 posf" style="left: -1000px;" mode="widthFix" @load='imgH'></image>
<view class="submitbtn active" @tap="shareQrcode" v-if="!qrShow">生成</view>
<!-- <view class="submitbtn active" @tap="shareFc" v-if="!qrShow">生成</view> -->
<!-- @tap=" saveImage()" --> <view class="w1005">
<view class="flex_row_c_c modalView" v-if="qrShow" :class="qrShow?'show':''" > <canvas :style="{height:bgHeight+'px',width:'100%'}" class="bgf" canvas-id="myCanvas"></canvas>
<view class="flex_column"> </view>
<!-- backgroundColor-white -->
<view class=" padding1vh border_radius_10px">
<image :src="poster.finalPath" mode="widthFix" class="posterImage"></image>
<image class="bctpbtns" v-if='show' src="/static/bctp.png" @tap.prevent.stop="saveImage()"></image>
<image class="bctpbtns" src="/static/bctp.png" mode="" @tap.prevent.stop="saveImage()"></image> <image class="fxhbbtns" v-if='show' src="/static/fxhb.png" @tap.prevent.stop="share()"></image>
<image class="fxhbbtns" src="/static/fxhb.png" mode="" @tap.prevent.stop="share()"></image>
</view> <uni-popup type='bottom' :show='popupShow' @change="change" style="z-index: 999999999 !important;">
<view class="flex_row marginTop2vh"> <view class="bgf mb-10" style="border-radius: 20upx;z-index: 999999999 !important;">
<!-- <button type="primary" class="buttons" size="mini" @tap.prevent.stop="saveImage()">保存图片</button> <view class="tc s30 lh90 br-b" @tap.stop="shareToFriend(1)">微信好友</view>
<button type="primary" class="buttons" size="mini" @tap.prevent.stop="hideQr()">关闭</button> --> <view class="tc s30 lh90 br-b" @tap.stop="shareToFriend(2)">微信朋友圈</view>
<!-- <button type="primary" class="buttons" size="mini" @tap.prevent.stop="share()">分享图片</button> --> <view class="tc s30 lh90" @tap.stop="shareToFriend(3)">微信收藏</view>
</view> </view>
</view> </uni-popup>
</view>
<!-- <button type="primary" class="buttons mt-40 ml-20 mr-20" @tap="shareFc()">生成店铺二维码</button> --> </view>
<view class="hideCanvasView"> </template>
<canvas class="hideCanvas"
canvas-id="default_PosterCanvasId" <script>
:style="{width: (poster.width||0) + 'px', height: (poster.height||0) + 'px'}"></canvas> import {createQrcode as shareQrcode} from "@/utils/api/api.js";
</view> import uniPopup from '@/components/uni-popup/uni-popup.vue';
</view> export default {
</template> components:{
uniPopup
<script> },
import _app from '@/utils/QS-SharePoster/app.js'; data() {
import getSharePoster from '@/utils/QS-SharePoster/QS-SharePoster.js'; return {
// import {usersEquity} from "@/utils/api/partner_center.js"; show:false,//是否显示隐藏
// import {shareQrcode} from "@/utils/api/user.js" qrcode_url:'',//二维码路径
avaterSrc:'',//本地背景图片
import {createQrcode as shareQrcode} from "@/utils/api/api.js"; qrcodeurl:'',//生成的二维码
export default { bgHeight:667,//背景图的高度
data() { windowHeight:0,//可视区域高度
return { windowWidth:375,//屏幕宽度
poster: {}, imgUrl:'',//生成的canvas图片
qrShow: false, popupShow:false,//底部弹窗
canvasId: 'default_PosterCanvasId', rpx:0,
type:"1", shopname:''
url:"", }
shopInfo:{}, },
shop_name:"", computed: {
shop_id:0,//url传过来的 staticUrl () {//静态资源地址 正式
} return this.$store.state.staticUrl;
}, },
computed: { staticUrl1 () {//静态资源地址 测试
staticUrl () {//静态资源地址 正式 return this.$store.state.staticUrl1;
return this.$store.state.staticUrl; },
}, statictowUrl(){
staticUrl1 () {//静态资源地址 测试 return this.$store.state.statictowUrl;
return this.$store.state.staticUrl1; },
}, userInfo () {
statictowUrl(){ return this.$store.state.userInfo;
return this.$store.state.statictowUrl; },
}, uploadurl(){
userInfo () { return this.$store.state.uploadurl;
return this.$store.state.userInfo; }
}, },
uploadurl(){ onLoad(opdata) {
return this.$store.state.uploadurl; this.windowWidth=uni.getSystemInfoSync().windowWidth;
} this.windowHeight=uni.getSystemInfoSync().windowHeight;
}, this.rpx=uni.getSystemInfoSync().windowWidth/375;
onLoad(opdata) { this.shop_id = opdata.shop_id;
this.type = opdata.type; this.shopname = opdata.shop_name;//商品名称
this.shop_id = opdata.shop_id; this.createGoodsQrcode();
},
//this.shareFc();//自动生成 methods: {
filePath(type,wxType){
this.shopInfo = uni.getStorageSync('userInfo'); if(this.imgUrl==''){ ///没保存
this.shop_name = this.shopInfo.shop_name; uni.showLoading({title:'正在保图片...'});
uni.canvasToTempFilePath({ //保存canvas
this.shareQrcode(); canvasId:'myCanvas',
}, success:(res)=>{
methods: { uni.hideLoading();
//生成二维码 this.imgUrl=res.tempFilePath;
async shareQrcode(){
// uni.showLoading({ //#ifdef APP-PLUS
// title: '加载中' uni.showLoading({title:'请稍后...',mask:true});
// }); uni.share({ //分享给朋友圈
provider: 'weixin',
let res = await shareQrcode({ scene: wxType, //WXSceneSession聊天界面 WXSenceTimeline朋友圈
type: 3,//固定的 type: 2,
//shareid: app.globalData.storeInfo.shop_id imageUrl: res.tempFilePath,
shareid: this.$store.state.userInfo.shop_id,//店铺id success: ret => {
}) uni.hideLoading();
},
if(res.code==0){ fail:err=>{
console.log(err)
}
this.url = res.data.file; });
// let qrcodeurl = window.location.port=="8080"?this.staticUrl1+this.url:this.staticUrl+this.url; //#endif
// let qrcodeurl = window.location.port=="8080"?this.staticUrl1+this.url:this.staticUrl1+this.url; },
fail:(err)=>{
// let qrcodeurl = this.staticUrl1+this.url; uni.hideLoading();
let qrcodeurl = this.staticUrl1+this.url; this.$api.msg('图片保存失败');
this.url = qrcodeurl; },
},this)
// https://zxluma.jxdsy.cn/attachs/ }else{ //保存过了
//#ifdef APP-PLUS
//console.info(res.data.file,"路径"); uni.showLoading({title:'请稍后...',mask:true});
uni.share({ //分享给朋友圈
// uni.showLoading({ provider: 'weixin',
// title: '生成成功' scene: wxType, //WXSceneSession聊天界面 WXSenceTimeline朋友圈
// }); type: 2,
imageUrl: this.imgUrl,
this.shareFc(); success: ret => {
uni.hideLoading();
}else{ },
fail:err=>{
uni.showLoading({ console.log(err)
title: '生成失败' }
}); });
this.$api.msg(res.msg); //#endif
} }
setTimeout(function () { },
uni.hideLoading(); shareToFriend(type){
}, 2000); let wxType='';
if(type==3){//收藏
wxType='WXSceneFavorite';
}, }else{ //1聊天界面 2朋友圈
//生成海报 if(type==1){
async shareFc() { wxType='WXSceneSession';
//debugger }else{
try { wxType='WXSenceTimeline';
if (!this.poster.finalPath) { }
let backgroundImage; }
let rqcodeobj = {}
// 二维码 this.filePath(type,wxType);
rqcodeobj = { },
text: '开发测试', change(e) {
size: 150,//bgObj.width*0.2 if (!e.show) {
dx: 380,//bgObj.width*0.05 this.popupShow = false
dy: 765//bgObj.height - bgObj.width*0.25 }
} },
share() { //分享到
//计算名称的x轴 this.popupShow=true;
},
let len = this.shop_name.length; saveImage(){ //保存图片
let cha = 0;//差值 uni.showLoading({title:'正在保存图片...',mask:true});
let dxsss = 0;//xy 坐标 if(this.imgUrl==''){
if(len<=10){ uni.canvasToTempFilePath({ //保存canvas
//小于 canvasId:'myCanvas',
cha = 10-len; success:(res)=>{
dxsss = 160 + cha*12; uni.hideLoading();
}else{ this.imgUrl=res.tempFilePath;
//大于 console.log(this.imgUrl)
cha = len-10; uni.saveImageToPhotosAlbum({ //保存到相册
dxsss = 160 - cha*12; filePath:res.tempFilePath,
} success:(res)=>{
uni.showToast({title:'图片保存成功',icon:'none'});
console.log("计算出来的dx",dxsss); },
fail:function(err){
console.log(err)
const d = await getSharePoster({ this.$api.msg('图片保存失败');
// backgroundImage:"/static/news/sjrwm.png", }
})
backgroundImage:this.statictowUrl+"static/applet5/images/uts/sjrwm.png", },
fail:(err)=>{
//暂时使用这个 uni.hideLoading();
// backgroundImage:"http://q37tb0wtc.bkt.clouddn.com/sjrwm.png", this.$api.msg('图片保存失败');
},
},this)
// backgroundImage:"https://www.baidu.com/img/superlogo_c4d7df0a003d3db9b65e9ef0fe6da1ec.png?where=super", }else{
// backgroundImage:"https://luma.jxdsy.cn/attachs/2019/07/29/thumb_5d3ecaa81b681.jpg", uni.saveImageToPhotosAlbum({ //保存到相册
filePath:this.imgUrl,
type: 'testShareType', success:(res)=>{
posterCanvasId: this.canvasId, uni.hideLoading();
// qrCodeArray: ({bgObj, type, bgScale}) => { uni.showToast({title:'图片保存成功',icon:'none',duration:2000});
// return [rqcodeobj] },
// }, fail:function(res){
imagesArray: ({bgObj, type, bgScale}) => { //接收的第一个参数为背景图片的信息, 第二个参数是自定义标识(感觉这里用不到), 图片为示例图片 uni.hideLoading();
const dx = bgObj.width*0.3; this.$api.msg('图片保存失败');
return [ }
//二维码 })
//二维码放进去 }
{
url: this.url,// //"https://www.baidu.com/img/superlogo_c4d7df0a003d3db9b65e9ef0fe6da1ec.png?qua=high&where=super",// },
dx: 155,//bgObj.width*0.05 imgH(e){
dy: 350,//bgObj.height - bgObj.width*0.25 this.bgHeight=e.detail.height/2; //得到背景图高度
dWidth: 250, // 因为设置了圆形图片 所以要乘以2 },
dHeight: 250 createGoodsQrcode(){//生成二维码
}, uni.showLoading({title:'二维码生成中...',mask:true});
] shareQrcode({
}, type:3, //店铺二维码
textArray: ({bgObj, type, bgScale}) => { shareid: this.shop_id,//店铺id
const fontSize = bgObj.width*0.045; }).then(res=>{
const lineHeight = bgObj.height*0.04; uni.hideLoading();
return [ if(res.code==0){
/** this.qrcodeurl= this.staticUrl1+res.data.file;
* 商家名称居中 10个字 160/640 刚刚好 this.avater();
* 11个字 }else{
* this.qrcodeurl= '';
* 10个以后 每多加一个字 大概要 160- 多出来的个数- 12 this.$api.msg("生成二维码失败");
* this.avater();
* }
* 10个以下 每少一个字 大概要 160 + 12
* })
* ***/ },
avater(){ //主图下载
console.log(this.statictowUrl+"static/applet5/images/uts/sjrwm.png",)
// 文字 先干了 uni.showLoading({title:'图片下载中...',mask:true});
{ uni.downloadFile({ //下载图片到本地
text: this.shop_name,//,`测试商家名称测试商家是遭`,//10个字正好 url:this.statictowUrl+"static/applet5/images/uts/sjrwm.png",//背景主图片, //主图
fontWeight: 'bold', success:res=>{
size: 24, uni.hideLoading();
color: '#ffffff', if(res.statusCode==200){ //下载成功
alpha: 1, this.avaterSrc=res.tempFilePath;
textAlign: 'left', this.drawPosters(this.avaterSrc)
textBaseline: 'middle', }else{
infoCallBack(textLength) { this.avaterSrc='';
//dx 160是侧面对齐 this.drawPosters(this.avaterSrc)
return { }
dx: dxsss,//136,//bgObj.width - textLength - fontSize },
dy:635 //bgObj.height - lineHeight*2 fail:err=>{
} uni.hideLoading();
} this.avaterSrc='';
}, this.drawPosters(avaterSrc);
this.$api.msg("图片下载失败");
}
})
},
drawPosters(avaterSrc){
] let rpx=this.rpx;
}, uni.showLoading({title:'正在绘制海报...',mask:true});
setCanvasWH: ({bgObj, type, bgScale}) => { // 为动态设置画布宽高的方法, const ctx = uni.createCanvasContext('myCanvas',this);//创建画布
this.poster = bgObj; ctx.setFillStyle('#FFFFFF');
}, ctx.fillRect(0,0,this.windowWidth,this.bgHeight);
setDraw: ({Context, bgObj, type, bgScale}) => {
// Context.setFillStyle('black'); if(avaterSrc){//主图
// Context.setGlobalAlpha(0.3); ctx.drawImage(avaterSrc,0,0,this.windowWidth,this.bgHeight);
// Context.fillRect(0, bgObj.height - bgObj.height*0.2, bgObj.width, bgObj.height*0.2); }
} if(this.qrcodeurl){//二维码
}); ctx.drawImage(this.qrcodeurl, (this.windowWidth-210*rpx)/2, 220, 210*rpx, 220*rpx);
console.log('海报生成成功, 临时路径: ' + d.poster.tempFilePath) }
this.poster.finalPath = d.poster.tempFilePath; if(this.shopname){//店铺名字
}
this.qrShow = true; ctx.setFillStyle('#ffffff');
} catch (e) { ctx.setFontSize((18*rpx).toFixed(0));
_app.hideLoading(); ctx.fillText(this.shopname,(this.windowWidth-ctx.measureText(this.shopname).width)/2,470);
_app.showToast(JSON.stringify(e)); }
console.log(JSON.stringify(e)); uni.hideLoading();
} ctx.draw();
}, this.show=true;
saveImage() { },
// #ifndef H5 }
uni.saveImageToPhotosAlbum({
filePath: this.poster.finalPath, }
success(res) { </script>
_app.showToast('保存成功');
}
}) <style>
// #endif .posf{
// #ifdef H5 position: fixed;
_app.showToast('保存了'); }
// #endif .bctpbtns{
}, position: absolute;
share() { z-index:10000;
// #ifdef APP-PLUS right: 0;
_app.getShare(false, false, 2, '', '', '', this.poster.finalPath, false, false); bottom:240px;
// #endif width: 57upx;
height: 189upx;
// #ifndef APP-PLUS }
_app.showToast('分享了'); .fxhbbtns{
// #endif position: absolute;
}, z-index:10000;
hideQr() { right: 0;
this.qrShow = false; bottom:130px;
} width: 57upx;
} height: 189upx;
} }
</script> .br-b{
border-bottom: 1px solid #BCBCBC;
<style lang="scss"> }
.hideCanvasView {
position: relative; </style>
}
.hideCanvas {
position: fixed;
top: -99999upx;
left: -99999upx;
z-index: -99999;
}
.flex_row_c_c {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.modalView {
width: 100%;
height: 100%;
// position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
outline: 0;
transform: scale(3);
perspective: 2500upx;
// background: rgba(0, 0, 0, 0.6);
transition: all .3s ease-in-out;
pointer-events: none;
backface-visibility: hidden;
z-index: 999;
}
.modalView.show {
opacity: 1;
transform: scale(1);
pointer-events: auto;
}
.flex_column {
display: flex;
flex-direction: column;
}
.backgroundColor-white {
background-color: white;
}
.border_radius_10px {
border-radius: 10px;
position: relative;
.bctpbtns{
position: absolute;
z-index:10000;
right: 0;
bottom:200px;
width: 57upx;
height: 189upx;
}
.fxhbbtns{
position: absolute;
z-index:10000;
right: 0;
bottom:100px;
width: 57upx;
height: 189upx;
}
}
.padding1vh {
/* padding: 1vh; */
}
.posterImage {
/* width: 60vw; */
width: 100vw;
height: 100vh;
}
.flex_row {
display: flex;
flex-direction: row;
}
.marginTop2vh {
margin-top: 2vh;
}
.buttons{
background: #ff6900!important;
line-height: 40px !important;
}
</style>
<template>
<!-- 商家二维码 -->
<!-- 商家码 -->
<view class="content yocode">
<view class="submitbtn active" @tap="shareQrcode" v-if="!qrShow">生成</view>
<!-- <view class="submitbtn active" @tap="shareFc" v-if="!qrShow">生成</view> -->
<!-- @tap=" saveImage()" -->
<view class="flex_row_c_c modalView" v-if="qrShow" :class="qrShow?'show':''" >
<view class="flex_column">
<!-- backgroundColor-white -->
<view class=" padding1vh border_radius_10px">
<image :src="poster.finalPath" mode="widthFix" class="posterImage"></image>
<image class="bctpbtns" src="/static/bctp.png" mode="" @tap.prevent.stop="saveImage()"></image>
<image class="fxhbbtns" src="/static/fxhb.png" mode="" @tap.prevent.stop="share()"></image>
</view>
<view class="flex_row marginTop2vh">
<!-- <button type="primary" class="buttons" size="mini" @tap.prevent.stop="saveImage()">保存图片</button>
<button type="primary" class="buttons" size="mini" @tap.prevent.stop="hideQr()">关闭</button> -->
<!-- <button type="primary" class="buttons" size="mini" @tap.prevent.stop="share()">分享图片</button> -->
</view>
</view>
</view>
<!-- <button type="primary" class="buttons mt-40 ml-20 mr-20" @tap="shareFc()">生成店铺二维码</button> -->
<view class="hideCanvasView">
<canvas class="hideCanvas"
canvas-id="default_PosterCanvasId"
:style="{width: (poster.width||0) + 'px', height: (poster.height||0) + 'px'}"></canvas>
</view>
</view>
</template>
<script>
import _app from '@/utils/QS-SharePoster/app.js';
import getSharePoster from '@/utils/QS-SharePoster/QS-SharePoster.js';
// import {usersEquity} from "@/utils/api/partner_center.js";
// import {shareQrcode} from "@/utils/api/user.js"
import {createQrcode as shareQrcode} from "@/utils/api/api.js";
export default {
data() {
return {
poster: {},
qrShow: false,
canvasId: 'default_PosterCanvasId',
type:"1",
url:"",
shopInfo:{},
shop_name:"",
shop_id:0,//url传过来的
}
},
onLoad(opdata) {
this.type = opdata.type;
this.shop_id = opdata.shop_id;
//this.shareFc();//自动生成
this.shopInfo = uni.getStorageSync('userInfo');
this.shop_name = this.shopInfo.shop_name;
this.shareQrcode();
},
methods: {
//生成二维码
async shareQrcode(){
// uni.showLoading({
// title: '加载中'
// });
let res = await shareQrcode({
type: 3,//固定的
//shareid: app.globalData.storeInfo.shop_id
shareid: this.$store.state.userInfo.shop_id,//店铺id
})
if(res.code==0){
this.url = res.data.file;
// let qrcodeurl = window.location.port=="8080"?this.staticUrl1+this.url:this.staticUrl+this.url;
// let qrcodeurl = window.location.port=="8080"?this.staticUrl1+this.url:this.staticUrl1+this.url;
// let qrcodeurl = this.staticUrl1+this.url;
let qrcodeurl = this.staticUrl1+this.url;
this.url = qrcodeurl;
// https://zxluma.jxdsy.cn/attachs/
//console.info(res.data.file,"路径");
// uni.showLoading({
// title: '生成成功'
// });
this.shareFc();
}else{
uni.showLoading({
title: '生成失败'
});
this.$api.msg(res.msg);
}
setTimeout(function () {
uni.hideLoading();
}, 2000);
},
//生成海报
async shareFc() {
//debugger
try {
if (!this.poster.finalPath) {
let backgroundImage;
let rqcodeobj = {}
// 二维码
rqcodeobj = {
text: '开发测试',
size: 150,//bgObj.width*0.2
dx: 380,//bgObj.width*0.05
dy: 765//bgObj.height - bgObj.width*0.25
}
//计算名称的x轴
let len = this.shop_name.length;
let cha = 0;//差值
let dxsss = 0;//xy 坐标
if(len<=10){
//小于
cha = 10-len;
dxsss = 160 + cha*12;
}else{
//大于
cha = len-10;
dxsss = 160 - cha*12;
}
console.log("计算出来的dx",dxsss);
const d = await getSharePoster({
// backgroundImage:"/static/news/sjrwm.png",
backgroundImage:this.statictowUrl+"static/applet5/images/uts/sjrwm.png",
//暂时使用这个
// backgroundImage:"http://q37tb0wtc.bkt.clouddn.com/sjrwm.png",
// backgroundImage:"https://www.baidu.com/img/superlogo_c4d7df0a003d3db9b65e9ef0fe6da1ec.png?where=super",
// backgroundImage:"https://luma.jxdsy.cn/attachs/2019/07/29/thumb_5d3ecaa81b681.jpg",
type: 'testShareType',
posterCanvasId: this.canvasId,
// qrCodeArray: ({bgObj, type, bgScale}) => {
// return [rqcodeobj]
// },
imagesArray: ({bgObj, type, bgScale}) => { //接收的第一个参数为背景图片的信息, 第二个参数是自定义标识(感觉这里用不到), 图片为示例图片
const dx = bgObj.width*0.3;
return [
//二维码
//二维码放进去
{
url: this.url,// //"https://www.baidu.com/img/superlogo_c4d7df0a003d3db9b65e9ef0fe6da1ec.png?qua=high&where=super",//
dx: 155,//bgObj.width*0.05
dy: 350,//bgObj.height - bgObj.width*0.25
dWidth: 250, // 因为设置了圆形图片 所以要乘以2
dHeight: 250
},
]
},
textArray: ({bgObj, type, bgScale}) => {
const fontSize = bgObj.width*0.045;
const lineHeight = bgObj.height*0.04;
return [
/**
* 商家名称居中 10个字 160/640 刚刚好
* 11个字
*
* 10个以后 每多加一个字 大概要 160- 多出来的个数- 12
*
*
* 10个以下 每少一个字 大概要 160 + 12
*
* ***/
// 文字 先干了
{
text: this.shop_name,//,`测试商家名称测试商家是遭`,//10个字正好
fontWeight: 'bold',
size: 24,
color: '#ffffff',
alpha: 1,
textAlign: 'left',
textBaseline: 'middle',
infoCallBack(textLength) {
//dx 160是侧面对齐
return {
dx: dxsss,//136,//bgObj.width - textLength - fontSize
dy:635 //bgObj.height - lineHeight*2
}
}
},
]
},
setCanvasWH: ({bgObj, type, bgScale}) => { // 为动态设置画布宽高的方法,
this.poster = bgObj;
},
setDraw: ({Context, bgObj, type, bgScale}) => {
// Context.setFillStyle('black');
// Context.setGlobalAlpha(0.3);
// Context.fillRect(0, bgObj.height - bgObj.height*0.2, bgObj.width, bgObj.height*0.2);
},
});
console.log('海报生成成功, 临时路径: ' + d.poster.tempFilePath)
this.poster.finalPath = d.poster.tempFilePath;
console.log(this.poster.finalPath)
}
this.qrShow = true;
} catch (e) {
_app.hideLoading();
_app.showToast(JSON.stringify(e));
console.log(JSON.stringify(e));
console.log('海报生成成功, 临时路径: ' + d.poster.tempFilePath)
}
},
saveImage() {
// #ifndef H5
uni.saveImageToPhotosAlbum({
filePath: this.poster.finalPath,
success(res) {
_app.showToast('保存成功');
}
})
// #endif
// #ifdef H5
_app.showToast('保存了');
// #endif
},
share() {
// #ifdef APP-PLUS
_app.getShare(false, false, 2, '', '', '', this.poster.finalPath, false, false);
// #endif
// #ifndef APP-PLUS
_app.showToast('分享了');
// #endif
},
hideQr() {
this.qrShow = false;
}
}
}
</script>
<style lang="scss">
.hideCanvasView {
position: relative;
}
.hideCanvas {
position: fixed;
top: -99999upx;
left: -99999upx;
z-index: -99999;
}
.flex_row_c_c {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.modalView {
width: 100%;
height: 100%;
// position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
outline: 0;
transform: scale(3);
perspective: 2500upx;
// background: rgba(0, 0, 0, 0.6);
transition: all .3s ease-in-out;
pointer-events: none;
backface-visibility: hidden;
z-index: 999;
}
.modalView.show {
opacity: 1;
transform: scale(1);
pointer-events: auto;
}
.flex_column {
display: flex;
flex-direction: column;
}
.backgroundColor-white {
background-color: white;
}
.border_radius_10px {
border-radius: 10px;
position: relative;
.bctpbtns{
position: absolute;
z-index:10000;
right: 0;
bottom:200px;
width: 57upx;
height: 189upx;
}
.fxhbbtns{
position: absolute;
z-index:10000;
right: 0;
bottom:100px;
width: 57upx;
height: 189upx;
}
}
.padding1vh {
/* padding: 1vh; */
}
.posterImage {
/* width: 60vw; */
width: 100vw;
height: 100vh;
}
.flex_row {
display: flex;
flex-direction: row;
}
.marginTop2vh {
margin-top: 2vh;
}
.buttons{
background: #ff6900!important;
line-height: 40px !important;
}
</style>
...@@ -38,12 +38,12 @@ export function getActivityList(data){ ...@@ -38,12 +38,12 @@ export function getActivityList(data){
//判断商家类型 商品入库 //判断商家类型 商品入库
export function getskipShop(data){ export function getskipShop(data){
return request.post("/user/skipShop", data, { noAuth: true}); return request.post("user/skipShop", data, { noAuth: true});
} }
//获取分类 列表 //获取分类 列表
export function getshopclass(data){ export function getshopclass(data){
return request.post("/ele/weigh", data, { noAuth: true}); return request.post("ele/weigh", data, { noAuth: true});
} }
...@@ -52,7 +52,7 @@ export function getshopclass(data){ ...@@ -52,7 +52,7 @@ export function getshopclass(data){
*/ */
//获取分类 列表 //获取分类 列表
export function activity_nucleus(data){ export function activity_nucleus(data){
return request.post("/ele/activity_nucleus", data, { noAuth: true}); return request.post("ele/activity_nucleus", data, { noAuth: true});
} }
/** /**
...@@ -60,7 +60,7 @@ export function activity_nucleus(data){ ...@@ -60,7 +60,7 @@ export function activity_nucleus(data){
* @param {Object} data * @param {Object} data
*/ */
export function activity_add(data){ export function activity_add(data){
return request.post("/ele/activity_add", data, { noAuth: true}); return request.post("ele/activity_add", data, { noAuth: true});
} }
/** /**
...@@ -68,7 +68,7 @@ export function activity_add(data){ ...@@ -68,7 +68,7 @@ export function activity_add(data){
* @param {Object} data * @param {Object} data
*/ */
export function activity_select(data){ export function activity_select(data){
return request.post("/ele/activity_select", data, { noAuth: true}); return request.post("ele/activity_select", data, { noAuth: true});
} }
/** /**
...@@ -76,7 +76,7 @@ export function activity_select(data){ ...@@ -76,7 +76,7 @@ export function activity_select(data){
* @param {Object} data * @param {Object} data
*/ */
export function activity_close(data){ export function activity_close(data){
return request.post("/ele/activity_close", data, { noAuth: true}); return request.post("ele/activity_close", data, { noAuth: true});
} }
/** /**
...@@ -84,7 +84,7 @@ export function activity_close(data){ ...@@ -84,7 +84,7 @@ export function activity_close(data){
* @param {} data * @param {} data
*/ */
export function activity_find(data){ export function activity_find(data){
return request.post("/ele/activity_find", data, { noAuth: true}); return request.post("ele/activity_find", data, { noAuth: true});
} }
...@@ -93,7 +93,7 @@ export function activity_find(data){ ...@@ -93,7 +93,7 @@ export function activity_find(data){
* @param {} data * @param {} data
*/ */
export function activity_user(data){ export function activity_user(data){
return request.post("/ele/activity_user", data, { noAuth: true}); return request.post("ele/activity_user", data, { noAuth: true});
} }
...@@ -102,5 +102,5 @@ export function activity_user(data){ ...@@ -102,5 +102,5 @@ export function activity_user(data){
* @param {} data * @param {} data
*/ */
export function activity_update(data){ export function activity_update(data){
return request.post("/ele/activity_update", data, { noAuth: true}); return request.post("ele/activity_update", data, { noAuth: true});
} }
\ No newline at end of file
...@@ -4,18 +4,14 @@ module.exports = { ...@@ -4,18 +4,14 @@ module.exports = {
//是否为开发调试环境 true为本地环境 false 为正式环境 //是否为开发调试环境 true为本地环境 false 为正式环境
// isdebug:false,//正式 isdebug:false,//正式
isdebug:true,//测试 // isdebug:true,//测试
// xqdebug:false,//正式权限 // xqdebug:false,//正式权限
xqdebug:true,//发布审核权限 也是测试环境的 主要用于ios xqdebug:true,//发布审核权限 也是测试环境的 主要用于ios
// #ifdef APP-PLUS
/** // isdebug:false,//正式 APP里面绝对是正式
* PS // #endif
*
* 正式环境 选 false !
* 本地开发环境 选 true
*
* */
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment