Commit df698d07 authored by zhangjianguo's avatar zhangjianguo

1

parent a52407a0
......@@ -313,9 +313,10 @@ export default {
this.setting = uni.getStorageSync("basedata").mall.setting
},
onShareAppMessage(res) {
let u = uni.getStorageSync("mall_UserInfo");
return {
title:this.g.app_share_title!=null && this.g.app_share_title!=''? this.g.app_share_title: this.g.name,
path: "/pages/goods/goods?id=" + this.id,
path: "/pages/goods/goods?id=" + this.id+"&user_id=" + u.UserId?u.UserId:0,
imageUrl: this.g.app_share_pic!=null && this.g.app_share_pic!=''? this.g.app_share_pic:this.g.pic_url[0].pic_url,
};
},
......
<template>
<view class="content">
<view class="content" :style="{ 'padding-bottom': showtabs==ture? '100rpx':0 }">
<u-tabs
v-if="myPageData.home_pages.navs.length > 1"
name="name"
......@@ -153,15 +153,10 @@ export default {
if(options&&options.user_id){
uni.setStorageSync("pid", {pid:options.user_id});
}
if(options&&options.scene){//兼容之前小程序的调转
if(options.scene == 'share' && options.params){
setTimeout(()=>{
uni.navigateTo({
url:options.params.path+'?id='+options.params.id,
});
},500)
}
this.getjump(options.scene)
}
......@@ -180,7 +175,7 @@ export default {
onShareAppMessage(res) {
return {
title:this.setting.share_title?this.setting.share_title:uni.getStorageSync("basedata").mall.name,
path: "/pages/index/index?user_id=" + uni.getStorageSync('mall_UserInfo') ?uni.getStorageSync('mall_UserInfo').UserId:'',
path: "/pages/index/index?user_id=" + uni.getStorageSync('mall_UserInfo') ?uni.getStorageSync('mall_UserInfo').UserId:0,
imageUrl: this.setting.share_pic?this.setting.share_pic:'',
};
},
......@@ -193,6 +188,33 @@ export default {
},
methods: {
getjump(scene){
let a= 'YZnsGuRojCKBkb1siP3VwkhkPFvh-D' //测试数据
this.request(
{
url: "",
data: {
r: "api/default/qr-code-parameter",
token: scene,
}
},
res => {
console.log(res.data.detail.path)
uni.setStorageSync("pid", {pid:res.data.detail.user_id?res.data.detail.user_id:0}); //存储上级的id
let objurl= this.ObjectToUrl(res.data.detail.data)
uni.navigateTo({
url:'/'+res.data.detail.path+'?'+objurl,
});
}
);
},
ObjectToUrl(e, t) {
var n = "";
for (var i in e)
n += "&" + i + "=" + (t ? encodeURIComponent(e[i]) : e[i]);
return n.substr(1);
},
init() {
this.request2(
{
......@@ -273,7 +295,7 @@ export default {
flex-direction: column;
/* align-items: center;
justify-content: center; */
padding-bottom:100rpx;
}
.content .tips_t{
position: fixed;
......
......@@ -195,7 +195,7 @@ export default {
let that = this
let totelPrice = that.good.Final_Price
if(val.target.value>totelPrice){
console.log('进入')
that.forms.Refund= totelPrice
}
......@@ -219,7 +219,7 @@ export default {
if (!that.submitStatus) {
that.submitStatus = true;
let msg = "";
console.log(that.forms)
if (that.forms.Remark == "") {
msg = "亲,请描述一下你遇到的问题吧";
} else if(that.forms.Refund<0){
......@@ -235,7 +235,7 @@ export default {
data: that.forms
},
(res) => {
console.log(res);
if (res.resultCode == 1) {
uni.showModal({
content: "提交售后申请成功,稍后客服专员将与您取得联系。",
......
......@@ -144,13 +144,13 @@
v-if="item.OrderStatus == '4'"
>评价晒单</u-button
> -->
<u-button
<!-- <u-button
shape="circle"
size="medium"
:custom-style="customStyle"
v-if="item.OrderStatus == '6'"
>待处理</u-button
>
> -->
<u-button
shape="circle"
size="medium"
......@@ -492,7 +492,7 @@ export default {
},
confirm() { //取消订单
let that = this
that.showModal = false;
// that.showModal = false;
if(that.Cancelmsg.Type==2 && that.Cancelmsg.Remark==''){
uni.showToast({
title:'备注不能为空',
......
......@@ -440,7 +440,7 @@ export default {
},
confirm() {
let that = this
that.showModal = false;
// that.showModal = false;
if(that.Cancelmsg.Type==2 && that.Cancelmsg.Remark==''){
uni.showToast({
title:'备注不能为空',
......
export default {
install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// Vue.prototype.host2 = "http://192.168.0.110:8200"
Vue.prototype.host2 = "https://mallApi.oytour.com"
// Vue.prototype.host2 = "http://192.168.2.16:8088"
// Vue.prototype.host2 = "http://192.168.2.65"
Vue.prototype.request = function(param, success, failed) {
//网络请求
uni.request({
url: this.host + "&r=" + param.data.r,
method: param.method || "GET",
header: param.header || {
'content-type': "application/json"
},
data: param.data,
success: res => {
if (res.data.code != 0 && res.data.msg != "商品未上架") {
}
typeof success == "function" && success(res.data);
},
fail: (e) => {
console.log("网络请求fail:" + JSON.stringify(e));
uni.showModal({
content: "" + res.errMsg
});
typeof failed == "function" && failed(res.data);
}
});
}
Vue.prototype.request2 = function(param, success, failed) {
//网络请求
uni.request({
......
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