Commit b567fefb by 冷斌

fix bug

parent 73797d81
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</div> </div>
<script> <script>
new Vue({ new Vue({
el: "#app", el: "#app",
data: function() { data: function() {
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
address: "" address: ""
} }
}, },
created:function(){ created:function(){
let d = {:json_encode($data)}; let d = {:json_encode($data)};
let ad = {:json_encode($address)}; let ad = {:json_encode($address)};
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
console.log(d) console.log(d)
console.log(ad) console.log(ad)
}, },
computed: { computed: {
hasAddress: function() { hasAddress: function() {
return this.address != "" && this.address != undefined return this.address != "" && this.address != undefined
...@@ -94,19 +94,20 @@ ...@@ -94,19 +94,20 @@
return "(运费:¥" + this.info.fare + ")" return "(运费:¥" + this.info.fare + ")"
} }
}, },
methods: { methods: {
onMinus: function() { onMinus: function() {
if(this.count - 1 > 1) { if(this.count - 1 > 1) {
this.count += 1 this.count -= 1
} }
this.totalPrice = 1;
}, },
onPlus: function() { onPlus: function() {
this.count += 1 this.count += 1
}, },
onBuy: function() { onBuy: function() {
if(MID <= 0) { if(MID <= 0) {
ui.confirm('请先登录', { ui.confirm('请先登录', {
...@@ -139,14 +140,14 @@ ...@@ -139,14 +140,14 @@
success: function(res) { success: function(res) {
console.log(res) console.log(res)
if(res.status == 1) { if(res.status == 1) {
} else { } else {
ui.error(res.info ? res.info : res.data) ui.error(res.info ? res.info : res.data)
} }
} }
}) })
}, },
checkPayStatus: function(num) { checkPayStatus: function(num) {
let that = this let that = this
$.ajax({ $.ajax({
...@@ -170,15 +171,15 @@ ...@@ -170,15 +171,15 @@
} }
}) })
}, },
onAddress: function() { onAddress: function() {
let url = "{:U('home/User/address',['param'=>$_GET['vst']])}" let url = "{:U('home/User/address',['param'=>$_GET['vst']])}"
window.location.href = url window.location.href = url
} }
} }
}) })
</script> </script>
<include file="__THEME__/public_footer_w3g" /> <include file="__THEME__/public_footer_w3g" />
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