4619关注14264浏览
var server = require('../../../utils/server');
var app = getApp();
var WxParse = require('../../../wxParse/wxParse.js');
Page({
data: {
goods: {},
sc: [],
status: 0,
current: 0,
tabStates: [true, false, false],
tabClasss: ["text-select", "text-normal", "text-normal"],
galleryHeight: getApp().screenWidth,
tab: 0,
goods_num: 1,
textStates: ["view-btns-text-normal", "view-btns-text-select"],
article: '<div>我是HTML代码</div>',
},
// onLoad: function (options) {
// var that = this;
// var goodsId = options.objectId;
// this.getGoodsById(goodsId);
// },
onLoad: function (options) {
var that = this;
var goodsId = options.objectId;
console.log(options.objectId)
that.getGoodsById(goodsId);
console.log(goodsId)
// wx.request({
// url: 'https://csc.sxxee.com/index.php/WXAPI/pages/goods/detail/detail?id=1',
// //'https://api.it120.cc/'+ app.globalData.subDomain +'/shop/goods/detail',
// data: {
// id: options.id
// },
// // https://csc.sxxee.com/ActivityController.class.php/WXAPI
// success: function (res) {
// that.setData({
// id: res.data.result.goods.goods_id,
// });
// WxParse.wxParse('article', 'html', that.data.goods.goods.goods_content, that, 5);
// },
// fail: function () {
// wx.showToast({
// title: '加载失败',
// })
// }
// })
},
getInviteCode: function (options) {
if (options.uid != undefined) {
wx.showToast({
title: '来自用户:' + options.uid + '的分享',
icon: 'success',
duration: 2000
})
}
},
propClick: function (e) {
var pos = e.currentTarget.dataset.pos;
var index = e.currentTarget.dataset.index;
var goods = this.data.goods
for (var i = 0; i < goods.goods.goods_spec_list[index].length; i++) {
if (i == pos)
goods.goods.goods_spec_list[index][pos].isClick = 1;
else
goods.goods
-
至过去的我
2044人对此回答表示赞同
我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>