Commit 8610a0d2 authored by zhangjianguo's avatar zhangjianguo

修改小程序

parent 981f0a45
...@@ -20,9 +20,10 @@ ...@@ -20,9 +20,10 @@
<view class="ticket"> <view class="ticket">
<view class="miane"> <view class="miane">
<view class="money"> <view class="money">
<text class="small" v-if="x.coupon_data.type==2"></text> <text class="small" v-if="x.coupon_data.type==1"></text>
<text style="font-size: 44px;">{{x.sub_price.toString().split('.')[0]}}</text> <text style="font-size: 44px;">{{x.sub_price.toString().split('.')[0]}}</text>
<text class="small" v-if="x.coupon_data.type==1"></text> <text class="small" v-if="x.coupon_data.type==2"></text>
</view> </view>
<view class="tiaojian">{{x.coupon_min_price}}元可用</view> <view class="tiaojian">{{x.coupon_min_price}}元可用</view>
</view> </view>
......
...@@ -480,6 +480,9 @@ export default { ...@@ -480,6 +480,9 @@ export default {
this.expressPrice = 0.0; this.expressPrice = 0.0;
this.goodPrice = 0.0; this.goodPrice = 0.0;
this.couponPrice = 0.0; this.couponPrice = 0.0;
if(res.data.total_price<0){
this.ds.total_price =0
}
this.integral = { this.integral = {
can_use: false, can_use: false,
use: false, use: false,
......
...@@ -70,27 +70,25 @@ export default { ...@@ -70,27 +70,25 @@ export default {
}, },
methods: { methods: {
initRecommend() { initRecommend() {
this.request( this.request2(
{ {
url: "", url: "/api/AppletGoods/GetAppletGoodsRecommendListForZY",
data: { data: {
r: "api/goods/new-recommend", RecommendType: 1,
goods_id: 0, },
type: "goods", },
},
},
(res) => { (res) => {
this.recommend = res.data.list; this.recommend = res.data.List;
} }
); );
}, },
redictToOrders() { redictToOrders() {
uni.redirectTo({ uni.reLaunch({
url: "/pages/order/index/index?status=2", url: "/pages/order/index/index?status=2",
}); });
}, },
goHome() { goHome() {
uni.redirectTo({ uni.reLaunch({
url: "/pages/index/index", url: "/pages/index/index",
}); });
}, },
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<view <view
style="margin-top: 40rpx;" style="margin-top: 40rpx;"
class="block" class="block"
v-if="d.ReOrderStatus=='3' || d.ReOrderStatus=='4'" v-if="d.ReOrderStatus=='3' || d.ReOrderStatus=='4'|| d.ReOrderStatus=='5'"
> >
<view class="good-title">{{d.ReOrderStatus==3?'退货物流':'换货物流'}} </view> <view class="good-title">{{d.ReOrderStatus==3?'退货物流':'换货物流'}} </view>
<view class="filed"> <view class="filed">
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<u-number-box :disabled="forms.Type==1" :min="1" :max="good.Number" v-model="forms.ReNumber" @change="valChange"></u-number-box> <u-number-box :disabled="forms.Type==1" :min="1" :max="good.Number" v-model="forms.ReNumber" @change="valChange"></u-number-box>
</view> </view>
</view> --> </view> -->
<view class="num-box"> <view class="num-box" v-if='forms.Type==1'>
<view class="left">退款金额</view> <view class="left">退款金额</view>
<view class="right" style="display: flex;flex-direction: row;align-items: center;"> <view class="right" style="display: flex;flex-direction: row;align-items: center;">
<input <input
...@@ -193,7 +193,7 @@ export default { ...@@ -193,7 +193,7 @@ export default {
}, },
inputnum(val){ inputnum(val){
let that = this let that = this
let totelPrice = that.good.Final_Price - that.good.FreightMoney let totelPrice = that.good.Final_Price
if(val.target.value>totelPrice){ if(val.target.value>totelPrice){
console.log('进入') console.log('进入')
that.forms.Refund= totelPrice that.forms.Refund= totelPrice
...@@ -219,10 +219,11 @@ export default { ...@@ -219,10 +219,11 @@ export default {
if (!that.submitStatus) { if (!that.submitStatus) {
that.submitStatus = true; that.submitStatus = true;
let msg = ""; let msg = "";
console.log(that.forms)
if (that.forms.Remark == "") { if (that.forms.Remark == "") {
msg = "亲,请描述一下你遇到的问题吧"; msg = "亲,请描述一下你遇到的问题吧";
} else if(that.forms.Refund==''){ } else if(that.forms.Refund<0){
msg = "亲,退款金额不能为空"; msg = "亲,退款金额为正数";
}else if (that.forms.VoucherList.length == 0) { }else if (that.forms.VoucherList.length == 0) {
msg = "亲,请上传一张说明截图吧"; msg = "亲,请上传一张说明截图吧";
} }
...@@ -242,7 +243,7 @@ export default { ...@@ -242,7 +243,7 @@ export default {
confirmText: "查看记录", confirmText: "查看记录",
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
uni.navigateTo({ uni.reLaunch({
url: "/pages/order/after-sale/refunds-list", url: "/pages/order/after-sale/refunds-list",
}); });
} }
......
...@@ -23,7 +23,9 @@ ...@@ -23,7 +23,9 @@
</view> </view>
<view class="status" :style="[headStyle]"> <view class="status" :style="[headStyle]">
<view class="status-title">{{ orders.OrderStatusName }}</view> <view class="status-title">{{ orders.OrderStatusName }}</view>
<view class="sub-title"> <view class="sub-title"
v-if='orders.OrderStatus==1 || orders.OrderStatus==2 ||orders.OrderStatus==3||orders.OrderStatus==4 '
>
<u-icon <u-icon
style="display: inline-block; vertical-align: middle;" style="display: inline-block; vertical-align: middle;"
name="warning-o" name="warning-o"
...@@ -31,7 +33,7 @@ ...@@ -31,7 +33,7 @@
size="28" size="28"
></u-icon> ></u-icon>
<!-- TODO返回字段 不能写死 --> <!-- TODO返回字段 不能写死 -->
<text style="margin-left: 5px;">交易成功14天,系统自动确认完成</text> <text style="margin-left: 5px;">交易成功{{delivery_time}}天,系统自动确认完成</text>
<!-- TODO 交易情况说明 --> <!-- TODO 交易情况说明 -->
</view> </view>
</view> </view>
...@@ -370,6 +372,7 @@ export default { ...@@ -370,6 +372,7 @@ export default {
}, },
showAfter: false, showAfter: false,
showModal: false, showModal: false,
delivery_time:14,//时间
}; };
}, },
onLoad(option) { onLoad(option) {
...@@ -380,6 +383,7 @@ export default { ...@@ -380,6 +383,7 @@ export default {
let nav = uni.getMenuButtonBoundingClientRect(); let nav = uni.getMenuButtonBoundingClientRect();
this.headStyle.paddingTop = nav.top + "px"; this.headStyle.paddingTop = nav.top + "px";
this.contentStyle.paddingTop = nav.top + 44 + "px"; this.contentStyle.paddingTop = nav.top + 44 + "px";
this.delivery_time = uni.getStorageSync('basedata') ? uni.getStorageSync('basedata').mall.setting.delivery_time : 14;
let p = getCurrentPages(); let p = getCurrentPages();
if (p.length > 1) { if (p.length > 1) {
......
...@@ -85,12 +85,15 @@ ...@@ -85,12 +85,15 @@
uni.getImageInfo({ uni.getImageInfo({
src: that.qrcode.PosterBgImg, src: that.qrcode.PosterBgImg,
success: function (image) { success: function (image) {
console.log('绘制')
ctx.drawImage(image.path, 0, 0, 750, 1344);//绘制图 ctx.drawImage(image.path, 0, 0, 750, 1344);//绘制图
if(that.qrcode.IsShowHead==0){
that.drawTitle(ctx); //绘制文字
}
if(that.qrcode.IsShowNick==0){ if(that.qrcode.IsShowNick==0){
console.log('绘制文字')
that.drawTitle(ctx); //绘制文字
}
if(that.qrcode.IsShowHead==0){
console.log('绘制头像')
uni.getImageInfo({//头像 uni.getImageInfo({//头像
src: that.UserInfo.Photo, src: that.UserInfo.Photo,
success: function (image) { success: function (image) {
...@@ -107,7 +110,7 @@ ...@@ -107,7 +110,7 @@
if(that.qrcode.IsShowQrCode==0){ //二维码 if(that.qrcode.IsShowQrCode==0){ //二维码
console.log('绘制二维码')
uni.getImageInfo({ uni.getImageInfo({
// src: that.UserInfo.Photo, // src: that.UserInfo.Photo,
src: that.fenxqrcode, src: that.fenxqrcode,
...@@ -117,12 +120,15 @@ ...@@ -117,12 +120,15 @@
that.drawQrCode(ctx) that.drawQrCode(ctx)
}, },
}); });
}else{
that.drawQrCode(ctx)
} }
}, },
}); });
}else{ }else{
if(that.qrcode.IsShowQrCode==0){ if(that.qrcode.IsShowQrCode==0){
console.log('绘制二维码')
uni.getImageInfo({//头像 uni.getImageInfo({//头像
src: that.fenxqrcode, src: that.fenxqrcode,
success: function (image) { success: function (image) {
...@@ -131,6 +137,8 @@ ...@@ -131,6 +137,8 @@
that.drawQrCode(ctx) that.drawQrCode(ctx)
}, },
}); });
}else{
that.drawQrCode(ctx)
} }
} }
......
...@@ -195,11 +195,7 @@ console.log(wx.getStorageSync('basedata')) ...@@ -195,11 +195,7 @@ console.log(wx.getStorageSync('basedata'))
}, },
goUrl(url) { goUrl(url) {
if(url =='/pages/order/refund/index'){ if(url =='/pages/balance/balance'){
uni.navigateTo({
url: '/pages/order/after-sale/refunds-list'
});
}else if(url =='/pages/balance/balance'){
uni.navigateTo({ uni.navigateTo({
url: '/pages/balance/balance?balance='+this.user_info.balance url: '/pages/balance/balance?balance='+this.user_info.balance
}); });
......
export default { export default {
install(Vue, options) { 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 = "https://mallApi.oytour.com"
//Vue.prototype.host2 = "http://192.168.2.16:8088" // Vue.prototype.host2 = "http://192.168.2.16:8088"
Vue.prototype.host2 = "https://mallApi.oytour.com" // 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) { Vue.prototype.request2 = function(param, success, failed) {
//网络请求 //网络请求
uni.request({ uni.request({
...@@ -48,7 +23,10 @@ export default { ...@@ -48,7 +23,10 @@ export default {
}, },
success: res => { success: res => {
if (res.data.resultCode != 1) { if (res.data.resultCode != 1) {
uni.showToast({
title: res.data.message,
icon: "none",
});
} else { } else {
typeof success == "function" && success(res.data); typeof success == "function" && success(res.data);
} }
......
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