添加:订单支付赠送权重值

This commit is contained in:
wuhui_zzw 2023-09-27 12:02:55 +08:00
parent ac10986a65
commit 5377a1fff4
9 changed files with 150 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(function(){var b={};var a={};a.PADCHAR="=";a.ALPHA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";a.makeDOMException=function(){var f,d;try{return new DOMException(DOMException.INVALID_CHARACTER_ERR)}catch(d){var c=new Error("DOM Exception 5");c.code=c.number=5;c.name=c.description="INVALID_CHARACTER_ERR";c.toString=function(){return"Error: "+c.name+": "+c.message};return c}};a.getbyte64=function(e,d){var c=a.ALPHA.indexOf(e.charAt(d));if(c===-1){throw a.makeDOMException()}return c};a.decode=function(f){f=""+f;var j=a.getbyte64;var h,e,g;var d=f.length;if(d===0){return f}if(d%4!==0){throw a.makeDOMException()}h=0;if(f.charAt(d-1)===a.PADCHAR){h=1;if(f.charAt(d-2)===a.PADCHAR){h=2}d-=4}var c=[];for(e=0;e<d;e+=4){g=(j(f,e)<<18)|(j(f,e+1)<<12)|(j(f,e+2)<<6)|j(f,e+3);c.push(String.fromCharCode(g>>16,(g>>8)&255,g&255))}switch(h){case 1:g=(j(f,e)<<18)|(j(f,e+1)<<12)|(j(f,e+2)<<6);c.push(String.fromCharCode(g>>16,(g>>8)&255));break;case 2:g=(j(f,e)<<18)|(j(f,e+1)<<12);c.push(String.fromCharCode(g>>16));break}return c.join("")};a.getbyte=function(e,d){var c=e.charCodeAt(d);if(c>255){throw a.makeDOMException()}return c};a.encode=function(f){if(arguments.length!==1){throw new SyntaxError("Not enough arguments")}var g=a.PADCHAR;var h=a.ALPHA;var k=a.getbyte;var e,j;var c=[];f=""+f;var d=f.length-f.length%3;if(f.length===0){return f}for(e=0;e<d;e+=3){j=(k(f,e)<<16)|(k(f,e+1)<<8)|k(f,e+2);c.push(h.charAt(j>>18));c.push(h.charAt((j>>12)&63));c.push(h.charAt((j>>6)&63));c.push(h.charAt(j&63))}switch(f.length-d){case 1:j=k(f,e)<<16;c.push(h.charAt(j>>18)+h.charAt((j>>12)&63)+g+g);break;case 2:j=(k(f,e)<<16)|(k(f,e+1)<<8);c.push(h.charAt(j>>18)+h.charAt((j>>12)&63)+h.charAt((j>>6)&63)+g);break}return c.join("")};b.pay=function(d){var c=encodeURIComponent(a.encode(d));location.href="./../sgmobile/sz_yi/template/mobile/default/order/pay.htm?goto="+c};b.decode=function(c){return a.decode(decodeURIComponent(c))};window._AP=b})();
(function(){var b={};var a={};a.PADCHAR="=";a.ALPHA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";a.makeDOMException=function(){var f,d;try{return new DOMException(DOMException.INVALID_CHARACTER_ERR)}catch(d){var c=new Error("DOM Exception 5");c.code=c.number=5;c.name=c.description="INVALID_CHARACTER_ERR";c.toString=function(){return"Error: "+c.name+": "+c.message};return c}};a.getbyte64=function(e,d){var c=a.ALPHA.indexOf(e.charAt(d));if(c===-1){throw a.makeDOMException()}return c};a.decode=function(f){f=""+f;var j=a.getbyte64;var h,e,g;var d=f.length;if(d===0){return f}if(d%4!==0){throw a.makeDOMException()}h=0;if(f.charAt(d-1)===a.PADCHAR){h=1;if(f.charAt(d-2)===a.PADCHAR){h=2}d-=4}var c=[];for(e=0;e<d;e+=4){g=(j(f,e)<<18)|(j(f,e+1)<<12)|(j(f,e+2)<<6)|j(f,e+3);c.push(String.fromCharCode(g>>16,(g>>8)&255,g&255))}switch(h){case 1:g=(j(f,e)<<18)|(j(f,e+1)<<12)|(j(f,e+2)<<6);c.push(String.fromCharCode(g>>16,(g>>8)&255));break;case 2:g=(j(f,e)<<18)|(j(f,e+1)<<12);c.push(String.fromCharCode(g>>16));break}return c.join("")};a.getbyte=function(e,d){var c=e.charCodeAt(d);if(c>255){throw a.makeDOMException()}return c};a.encode=function(f){if(arguments.length!==1){throw new SyntaxError("Not enough arguments")}var g=a.PADCHAR;var h=a.ALPHA;var k=a.getbyte;var e,j;var c=[];f=""+f;var d=f.length-f.length%3;if(f.length===0){return f}for(e=0;e<d;e+=3){j=(k(f,e)<<16)|(k(f,e+1)<<8)|k(f,e+2);c.push(h.charAt(j>>18));c.push(h.charAt((j>>12)&63));c.push(h.charAt((j>>6)&63));c.push(h.charAt(j&63))}switch(f.length-d){case 1:j=k(f,e)<<16;c.push(h.charAt(j>>18)+h.charAt((j>>12)&63)+g+g);break;case 2:j=(k(f,e)<<16)|(k(f,e+1)<<8);c.push(h.charAt(j>>18)+h.charAt((j>>12)&63)+h.charAt((j>>6)&63)+g);break}return c.join("")};b.pay=function(d){var c=encodeURIComponent(a.encode(d));location.href="./../addons/sz_yi/template/mobile/default/order/pay.htm?goto="+c};b.decode=function(c){return a.decode(decodeURIComponent(c))};window._AP=b})();

View File

@ -22,6 +22,25 @@ function DoWithYDBGPS (la,lo){
function Sharesback(state) {
YDB.GoBack();
}
function scanCodeParams(val){
if(val){
var url = val;
var groupId = extractGroupId(url);
var newUrl = appendGroupIdToUrl(url, groupId);
window.location.replace(newUrl);
window.location.reload();
}
}
function extractGroupId(url) {
var startIndex = url.indexOf("group_id=") + 9;
var groupId = url.substring(startIndex);
return groupId;
}
function appendGroupIdToUrl(url, groupId) {
var encodedGroupId = encodeURIComponent(groupId);
var newUrl = url.replace(/group_id=.*$/, `group_id=${encodedGroupId}`);
return newUrl;
}
//是否为app打开
function isApp(){
@ -87,6 +106,12 @@ function wxPayIOS(data) {
function toUrlAndroid(json) {
cps.toUrlAndroid(json);
}
// 聚合app 支付宝周期扣款
function aliPayToPay(json,orderId,url) {
console.log(json,orderId);
console.log(url);
cps.aliPayToPay(json,orderId,url);
}
function toUrlIOS(data) {
window.webkit.messageHandlers.toUrlIOS.postMessage(data);
}
@ -163,4 +188,50 @@ function sharePoster(data) {
if(window.webkit && window.webkit.messageHandlers) {
window.webkit.messageHandlers.sharePoster.postMessage(data);
}
}
// 全屏时是否横屏true 横屏||false 竖屏
function switchLandscapeAndroid(data) {
cps.switchLandscape(data);
}
//Android cps聚合页跳转抖音app
function androidToTikTok(data){
cps.androidToTikTok(data);
}
//IOS cps聚合页跳转抖音app
function IOStoTikTok(data){
window.webkit.messageHandlers.IOStoTikTok.postMessage(data)
}
//Android cps聚合页跳转拼多多、淘宝、京东app
function androidToPDD(deep_link,coupon_click_url,item_id){
console.log(deep_link,coupon_click_url,item_id,"拼多多");
cps.androidToPDD(deep_link,coupon_click_url,item_id);
}
function androidToJD(deep_link,coupon_click_url,item_id){
console.log(deep_link,coupon_click_url,item_id,"京东");
cps.androidToJD(deep_link,coupon_click_url,item_id);
}
function androidTB(deep_link,coupon_click_url,item_id){
console.log(deep_link,coupon_click_url,item_id,"天猫、淘宝");
cps.androidTB(deep_link,coupon_click_url,item_id);
}
//IOS cps聚合页跳转拼多多、淘宝、京东app
function IOStoPDD(data){
window.webkit.messageHandlers.IOStoPDD.postMessage(data)
}
function IOStoJD(data){
window.webkit.messageHandlers.IOStoJD.postMessage(data)
}
function IOStoTB(data){
window.webkit.messageHandlers.IOStoTB.postMessage(data)
}
// 聚合CPS的登录跳转
function toQRAndroid() {
// 由于对象映射所以调用cps对象等于调用Android映射的对象
cps.toQR();
}
function toQRIOS() {
window.webkit.messageHandlers.toQR.postMessage();
}

View File

@ -13,8 +13,7 @@
function routeBackUrlIOS(data = {body:'routeBackUrlIOS'}) {
window.webkit.messageHandlers.routeBackUrlIOS.postMessage(data);
}
function getKeyIIOS(data='{"i":"9","token":"F737BE654E92409CAF67354D53B8CD8B","domain":""}') {
//https://dev2.yunzmall.com
function getKeyIIOS(data='{"i":"9","token":"F737BE654E92409CAF67354D53B8CD8B","domain":"https://bztang.cdlfjy.com"}') {
console.log(JSON.parse(data))
console.log(JSON.parse(data).token)
document.write(data)

View File

@ -1,4 +1,5 @@
:root {
--themeBaseColor:#ffc11e;
--themeBaseColor:#ffffff;
--themeBgColor: linear-gradient(var(--themeBaseColor),#f5f5f5);
--themeLoadingColor: #aaaab3;
}

View File

@ -40,6 +40,7 @@ class Sale extends BaseModel
'ed_areas' => '',
'push_goods_ids' => 0,
'is_push' => 0,
'weight_value_user' => 1,
'weight_value_type' => 0,
'weight_value_num' => 0,
'weight_value_ladder' => [],

View File

@ -51,6 +51,28 @@ class MemberAddressController extends ApiController
return $this->successJson($msg, $addressList);
}
public function page()
{
$memberId = \YunShop::app()->getMemberId();
// dd(get_class($this->memberAddressRepository->makeModel()));
// exit;
$addressList = $this->memberAddressRepository->getAddressList($memberId);
// dd($addressList);
//获取省市ID
if ($addressList) {
app('db')->cacheSelect = true;
$address = Address::getAllAddress();
app('db')->cacheSelect = false;
$addressList = $this->addressServiceForIndex($addressList, $address);
}
$msg = "获取列表成功";
return $this->successJson($msg, $addressList);
}
//获取下单页要编辑的地址信息 &route=member.member-address.get-one-address
public function getOneAddress()
{

View File

@ -10,6 +10,7 @@ namespace Yunshop\TeamDividend\jobs;
use app\common\models\Member;
use app\common\models\Order;
use app\common\models\weightValue\WeightValue;
use app\common\services\credit\ConstService;
use app\common\services\finance\PointService;
use Illuminate\Contracts\Queue\ShouldQueue;
@ -67,6 +68,12 @@ class NewUpgrateJob implements ShouldQueue
// 循环等级
$this->eachLevelHandle($agent);
}
// 订单支付成功 处理权重值相关内容
if($this->order_status == TeamDividendLevelUpgrade::ORDER_PAY && $this->order){
(new WeightValue())->giveInit($this->order);
}
}
/**

View File

@ -55,6 +55,12 @@ define({
<div class="vue-main-title-content">权重值设置</div>
</div>
<div style="margin:0 auto;width:80%;">
<el-form-item label="受赠用户类型" label-width="155px">
<el-radio v-model="json.weight_value_user" :label="0" :disabled="json.weight_value_type == 1">全部用户</el-radio>
<el-radio v-model="json.weight_value_user" :label="1">仅经销商</el-radio>
<div class="form-item_tips">全部用户普通所有用户购买后都会赠送权重值</div>
<div class="form-item_tips">仅经销商只有经销商用户会赠送权重值阶梯赠送必须为仅经销商</div>
</el-form-item>
<el-form-item label="赠送方式" label-width="155px">
<el-radio v-model="json.weight_value_type" :label="0">普通赠送</el-radio>
<el-radio v-model="json.weight_value_type" :label="1">阶梯赠送</el-radio>
@ -591,12 +597,24 @@ define({
push_goods_ids: [],
is_store:0,
// 权重值设置
weight_value_user: 1,
weight_value_type: 0,
weight_value_num: 0,
weight_value_ladder: {},
},
};
},
watch: {
json: {
deep: true,//深度监听
handler: function () {
// 开启阶梯价的情况下 受赠用户类型必须为仅经销商
if(this.json.weight_value_type == 1) {
this.json.weight_value_user = 1;
}
}
}
},
mounted() {
if (this.form && this.form.sale) {
let sale = this.form.sale;
@ -625,6 +643,7 @@ define({
this.json.is_push = sale.is_push ? sale.is_push : 0;
this.json.push_goods_ids = sale.push_goods_ids ? sale.push_goods_ids : [];
// 权重值
this.json.weight_value_user = sale.weight_value_user ? sale.weight_value_user : 1;
this.json.weight_value_type = sale.weight_value_type ? sale.weight_value_type : 0;
this.json.weight_value_num = sale.weight_value_num ? sale.weight_value_num : 0;
this.json.weight_value_ladder = sale.weight_value_ladder ? JSON.parse(sale.weight_value_ladder) : {};