Browse Source

修改bug

master
gaoxs 5 years ago
parent
commit
67d134473c
  1. 20
      README.md
  2. 37
      components/ProductWindow.vue
  3. 1
      pages/order/OrderSubmission/index.vue
  4. 9
      pages/user/signIn/Integral/index.vue

20
README.md

@ -21,6 +21,26 @@
- 如需修改样式问题,请编辑.less的文件,请勿编辑.css的文件 - 如需修改样式问题,请编辑.less的文件,请勿编辑.css的文件
## git issuse 地址
https://gitee.com/guchengwuyue/yshopmall
### 请按照以下模板提交 issuse
标题:
H5/uni/后端代码/后台管理系统+简单描述
问题端:
H5/uni/后端代码/后台管理系统
代码版本:
v3.0
代码运行环境:
windows/macOS/Linux
问题描述:
Ps:如果是uni出现问题,请具体描述是运行那个端小程序/android/ios
## 声明 ## 声明
- app测试版已上,请通过 `https://www.pgyer.com/yRYf` 安装测试。 - app测试版已上,请通过 `https://www.pgyer.com/yRYf` 安装测试。
- 运行app项目ios需要安装xcode,安卓需要装安卓的sdk以及安卓模拟器,建议安卓安装genymotion https://www.genymotion.com/ 登录时可选择私人使用,勾选后无需付费 - 运行app项目ios需要安装xcode,安卓需要装安卓的sdk以及安卓模拟器,建议安卓安装genymotion https://www.genymotion.com/ 登录时可选择私人使用,勾选后无需付费

37
components/ProductWindow.vue

@ -9,7 +9,7 @@
<view class="line1">{{ attr.productSelect.store_name }}</view> <view class="line1">{{ attr.productSelect.store_name }}</view>
<view class="money font-color-red"> <view class="money font-color-red">
<text class="num">{{ attr.productSelect.price }}</text> <text class="num">{{ attr.productSelect.price+'' }}</text>
<text class="stock">库存: {{ attr.productSelect.stock }}</text> <text class="stock">库存: {{ attr.productSelect.stock }}</text>
</view> </view>
</view> </view>
@ -55,54 +55,51 @@ export default {
props: { props: {
attr: { attr: {
type: Object, type: Object,
default: () => {} default: () => {},
}, },
cartNum: { cartNum: {
type: Number, type: Number,
default: () => 1 default: () => 1,
} },
}, },
data: function() { data: function () {
return {}; return {};
}, },
mounted: function() { mounted: function () {
console.log(this); console.log(this);
}, },
methods: { methods: {
closeAttr: function() { closeAttr: function () {
this.$emit("changeFun", { action: "changeattr", value: false }); this.$emit("changeFun", { action: "changeattr", value: false });
}, },
CartNumDes: function() { CartNumDes: function () {
this.$emit("changeFun", { action: "ChangeCartNum", value: false }); this.$emit("changeFun", { action: "ChangeCartNum", value: false });
}, },
CartNumAdd: function() { CartNumAdd: function () {
this.$emit("changeFun", { action: "ChangeCartNum", value: 1 }); this.$emit("changeFun", { action: "ChangeCartNum", value: 1 });
}, },
tapAttr: function(indexw, indexn) { tapAttr: function (indexw, indexn) {
// //
// H5attrH5 // H5attrH5
// props // props
// //
this.attr.productAttr[indexw].index = indexn; this.attr.productAttr[indexw].index = indexn;
let that = this; let that = this;
let value = that let value = that.getCheckedValue().sort().join(",");
.getCheckedValue()
.sort()
.join(",");
that.$emit("changeFun", { that.$emit("changeFun", {
action: "ChangeAttr", action: "ChangeAttr",
value: { value: {
value, value,
indexw, indexw,
indexn indexn,
} },
}); });
}, },
// //
getCheckedValue: function() { getCheckedValue: function () {
let productAttr = this.attr.productAttr; let productAttr = this.attr.productAttr;
let value = []; let value = [];
console.log(productAttr) console.log(productAttr);
for (let i = 0; i < productAttr.length; i++) { for (let i = 0; i < productAttr.length; i++) {
for (let j = 0; j < productAttr[i].attrValueArr.length; j++) { for (let j = 0; j < productAttr[i].attrValueArr.length; j++) {
if (productAttr[i].index === j) { if (productAttr[i].index === j) {
@ -111,7 +108,7 @@ export default {
} }
} }
return value; return value;
} },
} },
}; };
</script> </script>

1
pages/order/OrderSubmission/index.vue

@ -486,6 +486,7 @@ export default {
}, },
changeAddress(addressInfo) { changeAddress(addressInfo) {
this.addressInfo = addressInfo; this.addressInfo = addressInfo;
this.getCartInfo()
}, },
createOrder() { createOrder() {
let shipping_type = this.shipping_type; let shipping_type = this.shipping_type;

9
pages/user/signIn/Integral/index.vue

@ -44,9 +44,7 @@
> >
<view> <view>
<text class="state">{{ item.title }}</text> <text class="state">{{ item.title }}</text>
<view> <div>{{ dataFormat(item.addTime) }}</div>
<data-format :date="item.addTime"></data-format>
</view>
</view> </view>
<text class="num" v-if="item.pm == 1">+{{ item.number }}</text> <text class="num" v-if="item.pm == 1">+{{ item.number }}</text>
<text class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</text> <text class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</text>
@ -74,12 +72,12 @@
<script> <script>
import { getIntegralList, postSignUser } from "@/api/user"; import { getIntegralList, postSignUser } from "@/api/user";
import Loading from "@/components/Loading"; import Loading from "@/components/Loading";
import DataFormat from "@/components/DataFormat"; import { dataFormat } from "@/utils";
export default { export default {
name: "Integral", name: "Integral",
components: { components: {
Loading, Loading,
DataFormat
}, },
props: {}, props: {},
data: function() { data: function() {
@ -112,6 +110,7 @@ export default {
!this.loading && this.getInfo(); !this.loading && this.getInfo();
}, },
methods: { methods: {
dataFormat,
goSignIn() { goSignIn() {
this.$yrouter.push("/pages/user/signIn/Sign/index"); this.$yrouter.push("/pages/user/signIn/Sign/index");
}, },

Loading…
Cancel
Save